兄弟非表示時にパーティクルの非表示に対応
This commit is contained in:
parent
14cb1e1fd7
commit
f05f439fcf
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue