コード例 #1
0
 public void DeActivate() {
   if (effect == null) {
     effect = GetComponent<EffectPlayer>();
   }
   if (pool == null) {
     pool = GetComponentInParent<ObjectPool>();
   }
   isActive = false;
   effect.Stop();
   pool.ReturnObject(gameObject);
 }
コード例 #2
0
 void Start() {
   effect = GetComponent<EffectPlayer>();
   pool = GetComponentInParent<ObjectPool>();
 }