Exemple #1
0
        public void Change()
        {
            IStatus       status1 = NSubstitute.Substitute.For <IStatus>();
            IStatus       status2 = NSubstitute.Substitute.For <IStatus>();
            StatusMachine machine = new Regulus.Utility.StatusMachine();

            machine.Push(status1);
            machine.Update();
            machine.Push(status2);
            machine.Update();
            machine.Termination();

            status1.Received(1).Enter();
            status1.Received(1).Update();
            status1.Received(1).Leave();

            status2.Received(1).Enter();
            status2.Received(1).Update();
            status2.Received(1).Leave();
        }
Exemple #2
0
 protected override void _Update()
 {
     _Machine.Update();
 }
Exemple #3
0
 public override void Update()
 {
     _TcpSet.Agent.Update();
     _Machine.Update();
 }
Exemple #4
0
 protected override void OnApplicationTick(float dt)
 {
     _Machine.Update();
 }