Example #1
0
 public override void Reset () {
     color = Color.black;
     time = 2f;
     storeCurrentTime = new ConcreteFloatVar();
     onFinish = new ConcreteFsmEvent();
     guiReady = false;
 }
Example #2
0
        /// <summary>
        /// Class constructor.
        /// <param name="stateTransition">The target transition.</param>
        /// <param name="destination">The target destination.</param>
        /// <param name="index">The transition index.</param>
        /// <param name="blackboard">The state blackboard.</param>
        /// </summary>
        public TransitionGUI (StateTransition stateTransition, InternalStateBehaviour destination, int index, InternalBlackboard blackboard) {
            m_Transition = stateTransition;
            m_Destination = destination;

            // It's a global event?
            if (m_Transition.eventID < 0) {
                 if (InternalGlobalBlackboard.Instance != null)
                     m_FsmEvent = InternalGlobalBlackboard.Instance.GetFsmEvent(m_Transition.eventID);
            }
            // It's a local variable and the blackboard is not null?
            else if (m_Transition.eventID > 0 && blackboard != null)
                m_FsmEvent = blackboard.GetFsmEvent(m_Transition.eventID);

            // Get the transition arrow vertical offset
            m_VerticalOffset = StateGUI.defaultHeight + TransitionGUI.defaultHeight * (index + .35f);
        }
Example #3
0
 public override void Reset () {
     other = new ConcreteGameObjectVar();
     eventToSend = new ConcreteFsmEvent();
     stateName = new ConcreteStringVar();
     storeEventUsed = new ConcreteBoolVar();
 }
        /// <summary> 
        /// Draw a float variable.
        /// <param name="rect">The position to draw the variable.</param>
        /// <param name="fsmEvent">The float variable to be drawn.</param>
        /// </summary>
        static void DrawFsmEvent (Rect rect, FsmEvent fsmEvent) {
            rect.yMin += 3f;
            rect.yMax -= 2f;
            rect.xMin += 6f;
            rect.xMax -= 6f;

            bool oldGUIEnabled = GUI.enabled;
            GUI.enabled = !fsmEvent.isSystem;
            DrawName(new Rect (rect.x, rect.y, c_LargeNameWidth, rect.height), fsmEvent);
            GUI.enabled = oldGUIEnabled;

            rect.xMin += c_LargeNameWidth + c_Space;
            rect.xMax -= c_MinusButtonWidth + c_RightPadding;
            EditorGUI.SelectableLabel(rect, fsmEvent.id.ToString());

            rect.x += rect.width + 2f;
            rect.width = c_MinusButtonWidth;
            rect.yMin -= 2f;
            rect.yMax += 2f;
            oldGUIEnabled = GUI.enabled;
            GUI.enabled = !fsmEvent.isSystem;
            if (GUI.Button(rect, s_Styles.iconToolbarMinus, s_Styles.invisbleButton))
                s_VariableToRemove = fsmEvent;
            GUI.enabled = oldGUIEnabled;
        }
Example #5
0
 public override void Reset () {
     gameObject = new ConcreteGameObjectVar(this.self);
     eventToSend = new ConcreteFsmEvent();
     storeEventUsed = new ConcreteBoolVar();
 }
Example #6
0
 public override void Reset () {
     eventToSend = new ConcreteFsmEvent();
     storeEventUsed = new ConcreteBoolVar();
 }
Example #7
0
 public override void Reset()
 {
     intervalTime     = 1f;
     storeCurrentTime = new ConcreteFloatVar();
     timeOverEvent    = new ConcreteFsmEvent();
 }
Example #8
0
 public override void Reset () {
     eventToSend = new ConcreteFsmEvent();
     delay = new ConcreteFloatVar();
     storeEventUsed = new ConcreteBoolVar();
     storeDelayTime = new ConcreteFloatVar();
 }
Example #9
0
 public override void Reset () {
     gameObject = new ConcreteGameObjectVar(this.self);
     methodName = new ConcreteStringVar();
     options = SendMessageOptions.RequireReceiver;
     floatParameter = new ConcreteFloatVar();
     intParameter = new ConcreteIntVar();
     boolParameter = new ConcreteBoolVar();
     stringParameter = new ConcreteStringVar();
     vector3Parameter = new ConcreteVector3Var();
     rectParameter = new ConcreteRectVar();
     colorParameter = new ConcreteColorVar();
     quaternionParameter = new ConcreteQuaternionVar();
     gameObjectParameter = new ConcreteGameObjectVar(this.self);
     textureParameter = new ConcreteTextureVar();
     materialParameter = new ConcreteMaterialVar();
     fsmEventParameter = new ConcreteFsmEvent();
     objectParameter = new ConcreteObjectVar();
     messageType = MessageType.SendMessage;
 }
Example #10
0
 public override void Reset () {
     intervalTime = 1f;
     storeCurrentTime = new ConcreteFloatVar();
     timeOverEvent = new ConcreteFsmEvent();
 }
 public override void Reset()
 {
     eventToSend    = new ConcreteFsmEvent();
     storeEventUsed = new ConcreteBoolVar();
 }
Example #12
0
 public override void Reset () {
     onSuccess = new ConcreteFsmEvent();
 }
Example #13
0
 public override void Reset () {
     time = 1f;
     speed = new ConcreteFloatVar();
     onStart = new ConcreteFsmEvent();
     onFinish = new ConcreteFsmEvent();
     loop = TweenNode.LoopType.none;
 }