private void UsePowerUp(PlayerBase parent, Powerups.Powers power) { switch (power) { case Powerups.Powers.none: break; case Powerups.Powers.bomb: GameObject bomb = GameObject.Instantiate(parent.TempPowerItem, parent.transform.position, parent.transform.rotation); bomb.GetComponent <Bomb>().SetParent(parent); break; case Powerups.Powers.speedup: parent.StartCoroutine(TempStat(parent, parent.MoveSpeed, 20, 5)); break; default: break; } parent.StateMachine.ChangeState(IdleState.Instance); }
public void SetPowerUp(Powerups.Powers power) { CurrentPowerup = power; }