public void GetEnemyHit() { sound.HitSound(); life = life - 1; //if(life <= 0) { // gameObject.SetActive(false); life = 1; } }
public void GetPlayerHit() { life = life - 1; sound.HitSound(); if (life == 0) { { thegamemanager.Restartgame(); // meghívja a metódust speedIncreaseMilestone = speedIncreaseMilestoneStore; movespeed = movespeedstore; speedMilestoneCounte = speedmilestonecountstore; tempMoveSpeedDown = tempMoveSpeedDownstore; tempMoveSpeedUp = tempMoveSpeedUpstore; life = 3f; sound.DeathSound(); } } }
public void GetEnemyHit() { sound.HitSound(); }