public LeftMovingSmallFlipMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.leftMovingMarioFlip); this.mario = mario; }
public RightMovingSmallMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.rightMovingMarioSmall); this.mario = mario; }
public ICollectable build(CollectableType type, Vector2 location) { factory = new SpriteFactory(); if (type == CollectableType.coin) { product = new Coin(location); } if (type == CollectableType.star) { product = new Star(location); } if (type == CollectableType.oneUp) { product = new OneUpMushroom(location); } if (type == CollectableType.fireFlower) { product = new FireFlower(location); } if (type == CollectableType.superMushroom) { product = new SuperMushroom(location); } if (type == CollectableType.ninja) { product = new Ninja(location); } return(product); }
public LeftIdleBigMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.leftIdleMarioBig); this.mario = mario; }
public LeftCrouchingSmallMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.leftCrouchingMarioSmall); this.mario = mario; }
public RightCrouchingBigMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.rightCrouchingMarioBig); this.mario = mario; }
public LeftFireballFireMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.leftFireballMarioFire); this.mario = mario; }
public RightIdleSmallFlipMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.rightIdleMarioFlip); this.mario = mario; }
public RightJumpingFireMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.rightJumpingMarioFire); this.mario = mario; }
public Mario(Vector2 position) { state = new RightIdleSmallMS(this); physState = new GroundState(this); this.position = position; jumpFX = SoundManager.jump.CreateInstance(); factory = new SpriteFactory(); }
public DeadFlipMS(Mario mario) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.deadMario); this.mario = mario; Game1.GetInstance().gameState = new DeadFlipGameState(mario); }
public GUI(Game1 game) { this.game = game; options = new List <KeyValuePair <ICommands, String> >(); font = Game1.gameContent.Load <SpriteFont>(StringHolder.hudPauseFont); factory = new SpriteFactory(); coin = factory.build(SpriteFactory.sprites.coin); }
public TitleScreenGameState() { factory = new SpriteFactory(); logo = factory.build(SpriteFactory.sprites.title); SoundManager.PlaySong(SoundManager.songs.title); game = Game1.GetInstance(); menu = new GUI(game); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadLevelCommand(StringHolder.levelOne), "Level 1")); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadLevelCommand(StringHolder.levelTwo), "Level 2")); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadAchPageCommand(), "Achievements")); menu.options.Add(new KeyValuePair <ICommands, String>(new QuitCommand(), "Quit")); menu.currentCommand = menu.options[0].Key; game.keyboardController = new TitleKeyController(menu); game.gamepadController = new TitlePadController(menu); }
public LeftTallDinoState() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.walkingLeftDino); }
public BrickBlockState() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.brickBlock); }
public LeftWalkingShellessKS() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.leftWalkShellessKoopa); }
public DeadDinoState() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.leftDeadDino); }
public RightSmashedDinoState() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.walkingRightSquishedDino); }
public DeadShellessKS() { ISpriteFactory factory = new SpriteFactory(); sprite = factory.build(SpriteFactory.sprites.deadShellessKoopa); }
public Block build(BlockType type, Vector2 location) { prize = null; factory = new SpriteFactory(); if (type == BlockType.used) { state = new GenericBlockState(SpriteFactory.sprites.usedBlock); } if (type == BlockType.question) { state = new QuestionBlockState(); } if (type == BlockType.exclamation) { state = new ExclamationBlockState(); } if (type == BlockType.brick) { state = new BrickBlockState(); } if (type == BlockType.ground) { state = new GenericBlockState(SpriteFactory.sprites.ground); } if (type == BlockType.leftEdge) { state = new GenericBlockState(SpriteFactory.sprites.leftEdge); } if (type == BlockType.rightEdge) { state = new GenericBlockState(SpriteFactory.sprites.rightEdge); } if (type == BlockType.quesMush) { state = new QuestionBlockState(); prize = new SuperMushroom(location); } if (type == BlockType.quesStar) { state = new QuestionBlockState(); prize = new Star(location); } if (type == BlockType.ques1up) { state = new InvisibleBlockState(); prize = new OneUpMushroom(location); } if (type == BlockType.quesCoin) { state = new QuestionBlockState(); prize = new Coin(location); } if (type == BlockType.quesFlower) { state = new QuestionBlockState(); prize = new FireFlower(location); } if (type == BlockType.quesNinja) { state = new QuestionBlockState(); prize = new Ninja(location); } if (type == BlockType.undergroundRoof) { state = new GenericBlockState(SpriteFactory.sprites.undergroundRoof); } if (type == BlockType.undergroundFloor) { state = new GenericBlockState(SpriteFactory.sprites.undergroundFloor); } if (type == BlockType.undergroundRightTop) { state = new GenericBlockState(SpriteFactory.sprites.undergroundRightTopCorner); } if (type == BlockType.undergroundLeftTop) { state = new GenericBlockState(SpriteFactory.sprites.undergroundLeftTopCorner); } if (type == BlockType.undergroundRightBottom) { state = new GenericBlockState(SpriteFactory.sprites.undergroundRightBottomCorner); } if (type == BlockType.undergroundLeftBottom) { state = new GenericBlockState(SpriteFactory.sprites.undergroundLeftBottomCorner); } if (type == BlockType.undergroundLeftWall) { state = new GenericBlockState(SpriteFactory.sprites.undergroundLeftWall); } if (type == BlockType.undergroundRightWall) { state = new GenericBlockState(SpriteFactory.sprites.undergroundRightWall); } if (type == BlockType.brokenPipe) { state = new GenericBlockState(SpriteFactory.sprites.bluePipe); } Block product = new Block(location, prize, state); return(product); }