public void Update() { if (this.Location.Y >= initialLocation.Y) { this.Location = initialLocation; fallingSpeed = new Vector2(0, 0); } else { this.Location = new Vector2(this.Location.X, this.Location.Y + fallingSpeed.Y); fallingSpeed = new Vector2(0, fallingSpeed.Y + fallingAcce.Y); } state.Update(); destinationRect = state.MakeDestinationRectangle(Location); }
public void Update() { if (Location.Y >= initialLocation.Y) { Location = initialLocation; fallingSpeed = new Vector2(GameUtilities.StationaryVelocity, GameUtilities.StationaryVelocity); } else { Location = new Vector2(Location.X, Location.Y + fallingSpeed.Y); fallingSpeed = new Vector2(GameUtilities.StationaryVelocity, fallingSpeed.Y + fallingAcce.Y); } state.Update(); destinationRect = state.MakeDestinationRectangle(Location); }