public override void OnRabbitEnter(HeroRabbit rab) { Debug.Log("before " + rab.health); if (rab.health == 2) { rab.removeHealth(1); Debug.Log("not dead?" + rab.health); rab.onHealthChange(); this.hideCollectable(); } else if (rab.health < rab.MaxHealth) { Debug.Log("the hell " + rab.health); rabbit = rab; touched = true; rab.dead = true; } }
public override void OnRabbitEnter(HeroRabbit rab) { rab.addHealth(1); rab.onHealthChange(); this.hideCollectable(); }