Exemplo n.º 1
0
 void OnTriggerCreep(Collider2D _col)
 {
     if (timeUndying > 0)
     {
         return;
     }
     if (timeShield > 0)
     {
         TurnShield(0);
         TurnUndying(1);
         return;
     }
     velocity = new Vector2(0, 0);
     if (GSGamePlay.Instance.isPlay)
     {
         ObjectValue _creep = _col.gameObject.GetComponent <ObjectValue>();
         GameConstants.PlaySoundDead();
         Utils.Spawn(GSGamePlay.Instance.explodeDie).transform.position = transform.position;
         GSGamePlay.Instance.OnOverGame(1, _creep.Getvalue());
     }
 }