Example #1
0
 public static GoToNewRegionOgreState GetInstance()
 {
     if (instance == null)
     {
         instance = new GoToNewRegionOgreState();
     }
     return(instance);
 }
Example #2
0
    public override void FixedUpdate(Ogre owner)
    {
        base.FixedUpdate(owner);

        if (owner.GetCurrentRegion != null)
        {
            if (owner.GetCurrentRegion.resourceCount <= 0)
            {
                owner.GetFSM.ChangeState(GoToNewRegionOgreState.GetInstance());
            }
        }
    }
Example #3
0
 // Initialize state in Start (Called after all objects are Awake)
 private void Start()
 {
     stateMachine.SetGlobalState(GlobalOgreState.GetInstance());
     stateMachine.ChangeState(GoToNewRegionOgreState.GetInstance());
 }