Beispiel #1
0
 public AerialState(StateMachine sm_)
 {
     sm              = sm_;
     exitActions     = new IAction[1];
     exitActions[0]  = new AerialAction(sm);
     entryActions    = new IAction[1];
     entryActions[0] = new AerialAction(sm);
     actions         = new IAction[1];
     actions[0]      = new AerialAction(sm);
     transitions     = new ITransition[1];
     transitions[0]  = new ToInitial(sm);
 }
 public JumpState(StateMachine sm_)
 {
     sm              = sm_;
     exitActions     = new IAction[1];
     exitActions[0]  = new JumpAction(sm);
     entryActions    = new IAction[1];
     entryActions[0] = new JumpAction(sm);
     actions         = new IAction[1];
     actions[0]      = new JumpAction(sm);
     transitions     = new ITransition[2];
     transitions[0]  = new ToInitial(sm);
     transitions[1]  = new ToAerial(sm);
 }
Beispiel #3
0
 public AdvanceState(StateMachine sm_)
 {
     sm              = sm_;
     exitActions     = new IAction[1];
     exitActions[0]  = new AdvanceAction(sm);
     entryActions    = new IAction[1];
     entryActions[0] = new AdvanceAction(sm);
     actions         = new IAction[1];
     actions[0]      = new AdvanceAction(sm);
     transitions     = new ITransition[4];
     transitions[0]  = new ToInitial(sm);
     transitions[1]  = new ToProjectile(sm_);
     transitions[2]  = new ToJump(sm_);
     transitions[3]  = new ToAntiAir(sm_);
 }
    public ProjectileState(StateMachine sm_)
    {
        sm             = sm_;
        transitions    = new ITransition[3];
        transitions[0] = new ToInitial(sm_);
        transitions[1] = new ToAdvance(sm_);
        transitions[2] = new ToRetreat(sm_);

        exitActions     = new IAction[1];
        exitActions[0]  = new ProjectileAction(sm);
        entryActions    = new IAction[1];
        entryActions[0] = new ProjectileAction(sm);
        actions         = new IAction[1];
        actions[0]      = new ProjectileAction(sm);
    }