Execute() public abstract method

public abstract Execute ( SA.StateManager states ) : void
states SA.StateManager
return void
Beispiel #1
0
 public override void Execute(StateManager state)
 {
     if (state.rb || state.lb || state.rt || state.lt)
     {
         inpButtonVariable.Set(state);
         attackResponse.Execute(state);
     }
 }
Beispiel #2
0
 public override void Execute(StateManager states)
 {
     if (boolVariable.value)
     {
         stateActionTrue.Execute(states);
     }
     else
     {
         stateActionFalse.Execute(states);
     }
 }
Beispiel #3
0
        private void Start()
        {
            mTransform = this.transform;

            Init();

            if (initAction != null)
            {
                initAction.Execute(this);
            }
        }
        private void Start()
        {
            InitReferences();
            if (isOfflineController)
            {
                LoadCharacterModelFromProfile();

                if (offlineActions != null)
                {
                    offlineActions.Execute(this);
                }
            }
        }
Beispiel #5
0
 public override void Execute(StateManager states)
 {
     if (states.canRotate)
     {
         if (states.isLockingOn)
         {
             lockonRotation.Execute(states);
         }
         else
         {
             normalRotation.Execute(states);
         }
     }
 }
Beispiel #6
0
        public override void Execute(StateManager states)
        {
            states.mTransform            = states.transform;
            states.anim                  = states.mTransform.GetComponentInChildren <Animator>();
            states.rigidbody             = states.mTransform.GetComponent <Rigidbody>();
            states.rigidbody.drag        = 4;
            states.rigidbody.angularDrag = 999;
            states.rigidbody.constraints = RigidbodyConstraints.FreezeRotation;
            states.ignoreLayers          = ~(1 << 9 | 1 << 3);


            if (initActionsBatch != null)
            {
                initActionsBatch.Execute(states);
            }
        }
 public override void Execute(StateManager states)
 {
     if (targetBool.value)
     {
         if (onTrueActions != null)
         {
             onTrueActions.Execute(states);
         }
     }
     else
     {
         if (onFalseActions != null)
         {
             onFalseActions.Execute(states);
         }
     }
 }
Beispiel #8
0
        public void OnPhotonInstantiate(PhotonMessageInfo info)
        {
            states = GetComponent <StateManager>();
            states.InitReferences();
            mTransform = this.transform;
            object[] data = photonView.InstantiationData;

            states.photonId = (int)data[0];
            string modelId = (string)data[2];

            states.LoadCharacterModel(modelId);

            MultiplayerManager m = MultiplayerManager.singleton;

            this.transform.parent = m.GetMRef().referencesParent;

            PlayerHolder playerHolder = m.GetMRef().GetPlayer(states.photonId);

            playerHolder.states = states;

            string weaponId = (string)data[1];

            Debug.Log("Weapon ID: " + weaponId);
            states.inventory.weaponID = weaponId;

            if (photonView.IsMine)
            {
                states.isLocal = true;
                states.SetCurrentState(local);
                initLocalPlayer.Execute(states);
            }
            else
            {
                states.isLocal = false;
                states.SetCurrentState(client);
                initClientPlayer.Execute(states);
                states.multiplayerListener = this;
            }
        }
Beispiel #9
0
        public override bool CheckCondition(StateManager state)
        {
            //checks if jumping inout is received from the state manager
            bool result = state.isJumping;

            if (state.isJumping)
            {
                state.isJumping = false;
                if (state.movementVariables.moveAmount > 0.2f)
                {
                    onTrueAction.Execute(state);
                }
                else
                {
                    result = false;
                    state.anim.SetBool(state.hashes.isInteracting, true);
                    state.anim.CrossFade(state.hashes.jumpIdle, 0.2f);
                    state.currentState = waitForAnimation;
                }
            }
            return(result);
        }