public void TakeDamageTransition(Peach peach) { var state = new StandardState(this); peach.PowerUpState = state; peach.SwitchToStandardSprite(); }
public void StandardTransition(Peach peach) { var state = new StandardState(this); peach.PowerUpState = state; // Standard peach.Sprite.SwitchAnimation(Constants.ZERO, 6); // Idle anim peach.Sprite.SetFrame(Constants.ZERO); // from start of anim peach.Sprite.LoopFrame = true; // loop anim }
public void DeadTransition(Peach peach) { sound = peach.Content.Load <SoundEffect>("Sound Effects/Peach Dies"); sound.Play(); var state = new StandardState(this); peach.PowerUpState = state; peach.SwitchToStandardSprite(); peach.Sprite.SwitchAnimation(5, 4); }
public void StandardTransition(Peach peach) { var state = new StandardState(this); peach.PowerUpState = state; peach.SwitchToStandardSprite(); if (peach.ActionState is CrouchingState) { peach.ActionState = new IdleState(peach); peach.Sprite = PeachSpriteFactory.Instance.FactoryMethod(peach); } }