public override void HandleCollision(SwagObject other) { DBG.Log("Bullet : HandleCollision " + other.ToString() + ", eval: " + (other.entityType == Type.ASTEROID)); if(other.entityType == Type.ASTEROID) { int otherIndex = other.index; if (otherIndex == this.index) { GameObject effect = Main.GetInstance().Pools.Get_Effect_Bullet_Hit_Asteroid(); if (effect != null) { effect.transform.position = transform.position; } DBG.Log("Object Destroyed " + this.name); OnDestroy(); } } }
public override void HandleCollision(SwagObject other) { if (_alive == true) { DBG.Log("PrayerOffering : HandleCollision : " + other.ToString()); if (other.entityType == Type.BULLET) { _alive = false; // _GiveMorePrayerChance(); _RollChanceAnswerPrayer(); // Main.GetInstance().Game._bPrayerUp = false; // DBG.Log("Object Destroyed " + this.name); OnDestroy(); } } }
public virtual void HandleCollision(SwagObject other) { Debug.LogError("SwagObject : HandleCollision" + other.ToString()); }