public UndergroundBrickBlock(Vector2 location) { state = new UndergroundBrickBlockStateMachine(); Location = location; initialLocation = location; fallingSpeed = new Vector2(0, 0); fallingAcce = new Vector2(0, 0.5f); destinationRect = state.MakeDestinationRectangle(Location); }
public CoinBrickBlock(Vector2 location) { state = new CoinBrickBlockStateMachine(); Location = location; initialLocation = location; fallingSpeed = new Vector2(0, 0); fallingAcce = new Vector2(0, 0.5f); destinationRect = state.MakeDestinationRectangle(Location); coinAnimation = new CoinOutOfBlockAnimation(new Vector2(Location.X, Location.Y - Destination.Height)); }
public CoinBrickBlock(Vector2 location) { state = new CoinBrickBlockStateMachine(); Location = location; initialLocation = location; fallingSpeed = new Vector2(GameUtilities.StationaryVelocity, GameUtilities.StationaryVelocity); fallingAcce = new Vector2(GameUtilities.StationaryAcceleration, GameUtilities.BrickBlockFallingSpeed); destinationRect = state.MakeDestinationRectangle(Location); coinAnimation = new CoinCollectedFromBlockAnimation[coinNum]; for (int i = 0; i < coinNum; i++) { coinAnimation[i] = new CoinCollectedFromBlockAnimation(new Vector2(Location.X, Location.Y - Destination.Height)); } }