Example #1
0
 public Cat(ICatState state)
 {
     State = state;
 }
Example #2
0
 public void ChangeState(ICatState newState)
 {
     this.currentState = newState;
 }
Example #3
0
 public override void Start()
 {
     base.Display("Oh hai!  Starting up......");
     this.currentState = new CatSleepState();  // start in sleep state
 }
Example #4
0
 public Cat(string inputName)
 {
     base.Name = inputName;
     this.currentState = new CatSleepState();  // default to sleep state
 }