public override bool Check()
    {
        PlayerState_Walk state = m_CurState as PlayerState_Walk;

        if (state.frame > 50)
        {
            return(true);
        }
        return(false);
    }
Example #2
0
    public override void MakeFsm()
    {
        CurFsm = new PlayerFsm(path);
        CurFsm.m_DoDrawSelected = true;

        PlayerState_Walk walk = new PlayerState_Walk(PlayerStateID.Walk.GetHashCode());

        walk.AddTransition(new Tr_Move_Walk2Run(PlayerStateID.Run.GetHashCode()));
        CurFsm.AddState(walk);

        PlayerState_Run run = new PlayerState_Run(PlayerStateID.Run.GetHashCode());

        run.AddTransition(new Tr_Move_Run2Walk(PlayerStateID.Walk.GetHashCode()));
        CurFsm.AddState(run);
    }
    public override void MakeFsm()
    {
        m_Fsm = new PlayerFsm(path);
        m_Fsm.m_DoDrawSelected = true;

        PlayerState_Walk walk = new PlayerState_Walk();

        walk.AddTransition(new Tr_Move_Walk2Run());
        m_Fsm.AddState(walk);

        PlayerState_Run run = new PlayerState_Run();

        run.AddTransition(new Tr_Move_Run2Walk());
        m_Fsm.AddState(run);
    }