コード例 #1
0
        public override void OnInspectorGUI()
        {
            if (!bClass)
            {
                bClass = (AIStateMachine)target;
            }
            DrawType();
            GUILayout.Space(10f);

            base.OnInspectorGUI();
        }
コード例 #2
0
 /// <summary>
 ///     Assign the state machine that is handling this script
 /// </summary>
 /// <param name="_statemachine"></param>
 public override void SetStateMachine(AIStateMachine _statemachine)
 {
     if (_statemachine.GetType() == typeof(AIRandomStateMachine))
     {
         stateMachine = (AIRandomStateMachine)_statemachine;
         base.SetStateMachine(stateMachine);
     }
     else
     {
         Debug.LogError("[AIRandomState.SetStateMachine()] Wrong state machine passed");
     }
 }
コード例 #3
0
        /// <summary>
        ///     Determines if this object can be shoot at
        /// </summary>

        public virtual void SetStateMachine(AIStateMachine _statemachine)
        {
            baseStateMachine = _statemachine;
        }