Ejemplo n.º 1
0
 void OnCreateStateMachine()
 {
     if (m_CurrentState is editorWaitState)
     {
         editorWaitState waitState = m_CurrentState as editorWaitState;
         waitState.CreateBool = true;
     }
 }
        /// <summary>
        /// Test conditionals are placed here.
        /// </summary>
        /// <param name="state"></param>
        /// <returns>true or false depending if transition conditions are met.</returns>
        public override string UpdateConditionalTest(baseState state)
        {
            string strOut = null;

#if ARTIMECH_THIS_SHOULD_NEVER_BE_TRUE_BUT_IS_AN_EXAMPLE_OF_A_CONDITION_BEING_TRUE
            This is an example of setting a contition to true if the gameobject
            falls below a certain height ingame.
            if (state.m_GameObject.transform.position.y <= 1000)
            {
                strOut = m_ChangeStateName;
            }
#endif
            editorWaitState waitState = state as editorWaitState;
            if (waitState.CreateBool)
            {
                strOut = m_ChangeStateName;
            }


            return(strOut);
        }