public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } StateTransitions.CheckGround(actor.GetAbstractFighter()); StateTransitions.MoveState(actor.GetAbstractFighter()); if (current_frame > 0) { if (actor.GetInputBuffer().DirectionHeld("Backward")) { PassVariable("direction", -1 * GetIntVar("direction")); PassVariable("accel", false); } else if (actor.GetInputBuffer().DirectionHeld("Forward")) { PassVariable("direction", GetIntVar("direction")); PassVariable("accel", false); } } //Check for dashing if (current_frame > last_frame) { current_frame -= 1; } }
public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } StateTransitions.NeutralState(actor.GetAbstractFighter()); StateTransitions.CheckGround(actor.GetAbstractFighter()); }
public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } StateTransitions.StopState(actor.GetAbstractFighter()); StateTransitions.CheckGround(actor.GetAbstractFighter()); //(key, invkey) = _actor.getForwardBackwardKeys() //if (self.direction == 1 and _actor.sprite.flip == "left") or(self.direction == -1 and _actor.sprite.flip == "right"): // _actor.sprite.flipX() AbstractFighter fighter = actor.GetAbstractFighter(); if (current_frame == last_frame) { if (fighter.KeyHeld("Forward")) { if (fighter.CheckSmash("ForwardSmash")) { actor.SendMessage("doAction", "Dash"); } else { actor.SendMessage("doAction", "Move"); } } else if (fighter.KeyHeld("Backward")) { actor.SendMessage("flip"); if (fighter.CheckSmash("BackwardSmash")) { actor.SendMessage("doAction", "Dash"); } else { actor.SendMessage("doAction", "Move"); } } else { actor.SendMessage("doAction", "NeutralAction"); } } }
public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } StateTransitions.StopState(actor.GetAbstractFighter()); StateTransitions.CheckGround(actor.GetAbstractFighter()); //TODO more moonwalking if (current_frame >= last_frame) { actor.BroadcastMessage("DoAction", "NeutralAction"); } }
public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } if (current_frame >= last_frame) { actor.SetVar("landing_lag", 0); actor.BroadcastMessage("DoAction", "NeutralAction"); //platform phase reset actor.BroadcastMessage("ChangeXPreferred", 0.0f, SendMessageOptions.RequireReceiver); } StateTransitions.CheckGround(actor.GetAbstractFighter()); }
public override void stateTransitions() { base.stateTransitions(); //These classes will be phased out as time goes on. Until then, we need to just exit early if we're in the builder since these don't actually use Subactions if (isInBuilder) { return; } StateTransitions.CrouchState(actor.GetAbstractFighter()); StateTransitions.CheckGround(actor.GetAbstractFighter()); //Platform Phase? See if it's better as it's own thing or better off here. /* Python code: * if self.frame > 0 and _actor.keyBuffered('down', _state = 1): * blocks = _actor.checkGround() * if blocks: #Turn it into a list of true/false if the block is solid * blocks = map(lambda x:x.solid,blocks) #If none of the ground is solid * if not any(blocks): * _actor.doAction('PlatformDrop') */ }