コード例 #1
0
 public static void AirState(AbstractFighter actor)
 {
     StateTransitions.AirControl(actor);
     if (actor.KeyBuffered("Shield") && actor.GetIntVar(TussleConstants.FighterVariableNames.AIR_DODGES_REMAINING) >= 1)
     {
         //actor.doAction("AirDodge");
     }
     if (actor.KeyBuffered("Attack"))
     {
         actor.doAirAttack();
     }
     if (actor.KeyBuffered("Special"))
     {
         actor.doAirSpecial();
     }
     if (actor.KeyBuffered("Jump") && actor.GetIntVar(TussleConstants.FighterVariableNames.JUMPS_REMAINING) > 0)
     {
         actor.doAction("AirJump");
     }
     actor.SendMessage("CheckForGround");
     if (actor.GetBoolVar(TussleConstants.FighterVariableNames.IS_GROUNDED) && actor.ground_elasticity == 0 && actor.GetIntVar("tech_window") == 0)
     {
         actor.BroadcastMessage("ChangeXPreferred", 0.0f, SendMessageOptions.RequireReceiver);
         actor.BroadcastMessage("ChangeYPreferred", actor.GetFloatVar(TussleConstants.FighterAttributes.MAX_FALL_SPEED));
         actor.doAction("Land");
     }
     //TODO fastfal
 }
コード例 #2
0
 public static void CheckGround(AbstractFighter actor)
 {
     actor.SendMessage("CheckForGround");
     if (!actor.GetBoolVar(TussleConstants.FighterVariableNames.IS_GROUNDED))
     {
         actor.doAction("Fall");
     }
 }