예제 #1
0
파일: Player.cs 프로젝트: Danubian/SwagNito
        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();
                }


            }

		}
예제 #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;
                }
예제 #3
0
파일: Bullet.cs 프로젝트: Danubian/SwagNito
		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();
                }
			}
		}
예제 #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();
                }
            }

        }
예제 #5
0
 public virtual void HandleCollision(SwagObject other)
 {
     Debug.LogError("SwagObject : HandleCollision" + other.ToString());
 }