Пример #1
0
 protected override void OnRabitHit(HeroController rabit)
 {
     if (rabit.IsBig)
     {
         rabit.IsBig = false;
     }
     else
     {
         rabit.Die();
     }
     this.CollectedHide();
 }
Пример #2
0
    void OnTriggerEnter2D(Collider2D collider)
    {
        HeroController heroController = collider.GetComponentInParent <HeroController> ();

        if (heroController != null)
        {
            GameObject rabbit = heroController.gameObject;
            if (rabbit.transform.position.y > this.transform.position.y + 1)
            {
                this.Die();
                heroController.myBody.AddForce(new Vector2(0, 15));
                if (SoundManager.Instance.isSoundOn())
                {
                    heroController.attackSoundSource.Play();
                }
            }
            else
            {
                this.animator.SetTrigger("attack");
                heroController.Die();
            }
        }
    }
Пример #3
0
 void RPC_DieBeforeMatch()
 {
     heroControllerInstance.Die(false);
     PlayerUI.Instance.TriggerMatchBegin();
 }
Пример #4
0
 public void onRabbitDeath(HeroController hero)
 {
     decrementLifes();
     hero.Die();
 }
Пример #5
0
 public void Die()
 {
     _pv.RPC("RPC_Die", RpcTarget.All);
     PhotonNetwork.Instantiate("DeathExplosion", transform.position, Quaternion.identity);
     heroControllerInstance.Die();
 }