Exemplo n.º 1
0
    public override void OnLeave()
    {
        base.OnLeave();
        LogicEntityFSM fsm = m_entiyView.GetFSM("LogicEntityFSM") as LogicEntityFSM;

        if (fsm != null)
        {
            fsm.OnCommand(EActionType.EAction_Idle, null);
        }
    }
Exemplo n.º 2
0
    public override void OnEnter()
    {
        base.OnEnter();
        if (m_entiyView == null)
        {
            m_bFinished = true;
        }
        startPos = m_entiyView.position;
        LogicEntityFSM fsm = m_entiyView.GetFSM("LogicEntityFSM") as LogicEntityFSM;

        if (fsm != null)
        {
            fsm.OnCommand(EActionType.EAction_Move, null);
        }
    }
Exemplo n.º 3
0
    public override BaseFSM Clone()
    {
        LogicEntityFSM cfsm = new LogicEntityFSM();

        cfsm.name = m_name;

        foreach (BaseState snode in m_stateNodes)
        {
            BaseState cnode = snode.Clone();
            cnode.curFSM = cfsm;
            cfsm.states.Add(snode);
        }
        BaseState defaultNode = cfsm.FindChildState(m_defaultNode.name);

        if (defaultNode != null)
        {
            cfsm.defaultNode  = defaultNode;
            cfsm.currentState = defaultNode;
        }

        return(cfsm);
    }