Beispiel #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     Debug.Log("Collided");
     if (other.gameObject.tag == "TileMap" || other.gameObject.tag == "PCs")
     {
         GR_EffectContainer.Create(Effect, transform);
         isntances.Remove(this);
         Destroy(this.gameObject);
     }
 }
 static public void Create(GR_EffectContainer effect, Transform pos)
 {
     ParticleList.Add(Instantiate(effect, pos.position, new Quaternion()));
     ParticleList[ParticleList.Count - 1].activate();
 }