예제 #1
0
        public void EatPellet(Pacmac pacmac, Pellet pellet)
        {
            pacmac.SetPelletEatenCount(pacmac.GetPelletEatenCount() + 1);
            SetState(pellet);
            int added = pellet.GetEaten();

            AddScore(pacmac, +added);
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public void EatPellet(Pellet pellet)
 {
     _state.EatPellet(this, pellet);
 }
예제 #4
0
 void Start()
 {
     _pellet = new Pellet(_type, _score);
 }