Exemplo n.º 1
0
    public override void FixedUpdate(Ogre owner)
    {
        base.FixedUpdate(owner);

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