public void EatPellet(Pacmac pacmac, Pellet pellet) { pacmac.SetPelletEatenCount(pacmac.GetPelletEatenCount() + 1); SetState(pellet); int added = pellet.GetEaten(); AddScore(pacmac, +added); }
private void SetState(Pellet pellet) { switch (pellet.GetPalletType()) { case PelletType.SUPER: SetType(PacmacStateType.SUPER); break; case PelletType.POWER: SetType(PacmacStateType.POWER); break; case PelletType.DOT: default: break; } }
public void EatPellet(Pellet pellet) { _state.EatPellet(this, pellet); }
void Start() { _pellet = new Pellet(_type, _score); }