兄弟非表示時にパーティクルの非表示に対応

This commit is contained in:
kimura 2022-02-10 18:58:35 +09:00
parent 14cb1e1fd7
commit f05f439fcf
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ public class BrotherBlueView : MonoBehaviour
public void SetActive(bool active) public void SetActive(bool active)
{ {
transform.localScale = active ? initScale : Vector3.zero; animator.speed = active ? 1f : 0f;
animator.transform.localScale = active ? initScale : Vector3.zero;
} }
} }

View File

@ -268,7 +268,9 @@ public class BrotherPinkView : SingletonMonoBehaviour<BrotherPinkView>
{ {
if (animator != null) if (animator != null)
{ {
animator.speed = active ? 1f : 0f;
animator.transform.localScale = active ? Vector3.one : Vector3.zero; animator.transform.localScale = active ? Vector3.one : Vector3.zero;
animator.GetComponentInChildren<ParticleSystem>()?.transform.SetLocalScale(active ? 1f : 0f);
} }
} }
} }