Esempio n. 1
0
 public void Activate(Transform effectTarget) {
   if (effect == null) {
     effect = GetComponent<EffectPlayer>();
   }
   gameObject.transform.position = effectTarget.position;
   gameObject.transform.rotation = effectTarget.rotation;
   effect.Play();
   isActive = true;
 }
Esempio n. 2
0
 public void DeActivate() {
   if (effect == null) {
     effect = GetComponent<EffectPlayer>();
   }
   if (pool == null) {
     pool = GetComponentInParent<ObjectPool>();
   }
   isActive = false;
   effect.Stop();
   pool.ReturnObject(gameObject);
 }
Esempio n. 3
0
 public void Activate(Transform effectTarget)
 {
     if (effect == null)
     {
         effect = GetComponent <EffectPlayer>();
     }
     gameObject.transform.position = effectTarget.position;
     gameObject.transform.rotation = effectTarget.rotation;
     effect.Play();
     isActive = true;
 }
Esempio n. 4
0
 public void DeActivate()
 {
     if (effect == null)
     {
         effect = GetComponent <EffectPlayer>();
     }
     if (pool == null)
     {
         pool = GetComponentInParent <ObjectPool>();
     }
     isActive = false;
     effect.Stop();
     pool.ReturnObject(gameObject);
 }
Esempio n. 5
0
 void Start() {
   effect = GetComponent<EffectPlayer>();
   pool = GetComponentInParent<ObjectPool>();
 }
Esempio n. 6
0
 void Start()
 {
     effect = GetComponent <EffectPlayer>();
     pool   = GetComponentInParent <ObjectPool>();
 }