protected override void OnRabitHit(HeroController rabit) { if (rabit.IsBig) { rabit.IsBig = false; } else { rabit.Die(); } this.CollectedHide(); }
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(); } } }
void RPC_DieBeforeMatch() { heroControllerInstance.Die(false); PlayerUI.Instance.TriggerMatchBegin(); }
public void onRabbitDeath(HeroController hero) { decrementLifes(); hero.Die(); }
public void Die() { _pv.RPC("RPC_Die", RpcTarget.All); PhotonNetwork.Instantiate("DeathExplosion", transform.position, Quaternion.identity); heroControllerInstance.Die(); }