protected override void ChangeState(Dog dog, ActionDogType actionDogType)
        {
            switch (actionDogType)
            {
            case ActionDogType.Call:
            {
                dog.DogState = new NeutralDogState();
                break;
            }

            case ActionDogType.Scare:
            {
                dog.DogState = new OffendDogState();
                break;
            }
            }
        }
        protected override void ChangeState(Dog dog, ActionDogType actionDogType)
        {
            switch (actionDogType)
            {
            case ActionDogType.Call:
            {
                dog.DogState = new JoyDogState();
                break;
            }

            case ActionDogType.Scare:
            {
                dog.DogState = new SadnessDogState();
                break;
            }
            }
        }
Esempio n. 3
0
 internal virtual void ActionDog(Dog dog, ActionDogType actionDogType)
 {
     ChangeState(dog, actionDogType);
 }
Esempio n. 4
0
 protected abstract void ChangeState(Dog dog, ActionDogType actionDogType);
Esempio n. 5
0
 public void Hear(ActionDogType actionDogType)
 {
     DogState.ActionDog(this, actionDogType);
 }