public static StateBank Instance() { if (_instance == null) { _instance = new StateBank(); } return(_instance); }
public override void Execute(Miner t) { t.Tired(); t.MakeGold(); if (t.FullGold()) { t.GetStateMachine().ChangeState(StateBank.Instance()); } }
public override void Execute(Miner t) { if (t.PayBar()) { t.GoBar(); } else { t.GetStateMachine().ChangeState(StateBank.Instance()); } if (t.FullThirsty()) { t.GetStateMachine().ChangeState(StateWork.Instance()); } }
private StateBank(StateBank state) { }