Пример #1
0
    // ------------------------------------------------------------------
    // Desc:
    // ------------------------------------------------------------------

    public virtual void Init()
    {
        if (stateMachine == null)
        {
            stateMachine = new fsm.Machine();
        }
    }
Пример #2
0
    // ------------------------------------------------------------------
    // Desc:
    // ------------------------------------------------------------------
    public void Debug( Object _obj )
    {
        GameObject go = _obj as GameObject;
        if ( go == null ) {
            return;
        }

        //
        fsm.Machine machine = GetStateMachine (go);

        // check if repaint
        if ( curEdit != machine ) {
            curEdit = machine;
            curGO = go;
            Init();

            Repaint ();
            return;
        }
    }
Пример #3
0
    // ------------------------------------------------------------------
    // Desc:
    // ------------------------------------------------------------------

    public void Debug(Object _obj, int _idx = 0)
    {
        GameObject go = _obj as GameObject;

        if (go == null)
        {
            return;
        }

        //
        fsm.Machine machine = GetStateMachine(go, _idx);

        // check if repaint
        if (curEdit != machine)
        {
            curEdit = machine;
            curGO   = go;
            Init();

            Repaint();
            return;
        }
    }
Пример #4
0
    // ------------------------------------------------------------------ 
    // Desc: 
    // ------------------------------------------------------------------ 

    protected void Awake () {
        stateMachine = new fsm.Machine();
        InitStateMachine ();
    }
Пример #5
0
 protected void Awake()
 {
     stateMachine = new fsm.Machine();
     InitStateMachine();
 }