Exemplo n.º 1
0
        public override void HandleCollision(SwagObject other)
		{
            if( bAlive == true )
            {
                Debug.Log("Player : HandleCollision");


                //
                if (other.entityType == Type.ASTEROID)
                {
                    bAlive = false;

                    GameObject effect = Main.GetInstance().Pools.Get_Effect_Player_Hit_Asteroid();
                    if (effect != null)
                    {
                        effect.transform.position = transform.position;
                    }

                    _graphics.SetActive(false);
                    StartCoroutine("GotoResults");

                    //
                    Main.GetInstance().Audio.PlayFX_PlayerDeath();
                }


            }

		}
Exemplo n.º 2
0
		public override void HandleCollision(SwagObject other)
        {
            int otherIndex = other.index;
            if (otherIndex == this.index && other.entityType == Type.BULLET || other.entityType == Type.PLAYER)
            {
                if (Main.GetInstance().Game != null && other.entityType == Type.BULLET)
                {
					Main.GetInstance().Progress.xp += GlobalVars.ASTEROID_LEVEL;
                }
Exemplo n.º 3
0
		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();
                }
			}
		}
Exemplo n.º 4
0
        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();
                }
            }

        }
Exemplo n.º 5
0
 public virtual void HandleCollision(SwagObject other)
 {
     Debug.LogError("SwagObject : HandleCollision" + other.ToString());
 }