public DeadMario(Game game) { myGame = game; marioState = myGame.marioState; texture = myGame.marioSprites; myGame.marioState.bat = false; myGame.gameOver.SetDelay(); currentFrame = 12; marioState.curStat = MarioStateClass.marioStatus.dead; myGame.gameover = true; myGame.soundEffect.MarioDies(); visible = true; }
public Fireball(MarioStateClass mainState, Texture2D spriteSheet) { texture = spriteSheet; if (mainState.facingLeft) { ballPhys = new Physics(mainState.XCoor - eight, mainState.YCoor); ballPhys.xVel = -1; left = true; } else { ballPhys = new Physics(mainState.XCoor + eight, mainState.YCoor); ballPhys.xVel = 1; } offset = mainState.offset; deleted = false; }
public BatMario(Game game) { myGame = game; marioState = myGame.marioState; textureLeft = myGame.marioBatLeft; textureRight = myGame.marioBatRight; texture = textureRight; rightFacingCurrentFrame = 1; leftFacingCurrentFrame = 4; marioState.star = false; animMod = 0; sourceBat = new BatMarioDic(); marioState.bat = true; batTimer = 300; visible = true; }
public SmallMario(Game game) { myGame = game; marioState = myGame.marioState; texture = myGame.marioSprites; rightFacingCurrentFrame = 1; leftFacingCurrentFrame = 7; marioState.curStat = MarioStateClass.marioStatus.small; marioState.star = false; invCtr = 0; animMod = 0; drawMar = new DrawSmallMario(myGame, this); myGame.marioState.bat = false; visible = true; }
public FireMario(Game game) { myGame = game; marioState = myGame.marioState; texture = myGame.marioSprites; leftFacingCurrentFrame = 36; rightFacingCurrentFrame = 28; marioState.curStat = MarioStateClass.marioStatus.fire; marioState.star = false; animMod = 0; drawMar = new DrawFireMario(myGame, this); myGame.marioState.bat = false; invCtr = 0; visible = true; }
protected override void Initialize() { hud = new HUD(this); begin = true; infinite = false; normal = false; soundEffect = new SoundEffects(this); sound = new Sounds(this); contrl = new ArrayList(); camera = new Camera(this); camObj = new CameraObjectDetector(this); itemSpawn = new ItemSpawn(this); start = new startScreen(this); lvCtrl = new LevelControl(this); infLvl = new InfiniteLevel(this); marioColDetector = new MarioCollisionDetector(this); enemyColDetector = new EnemyCollisionDetector(this); itemColDetector = new ItemCollisionDetector(this); keyboard = new KeyboardController(); gmPad = new GamepadController(); KeyBind keyB = new KeyBind(this); keyB.BindKey(); contrl.Add(keyboard); contrl.Add(gmPad); paused = new Pause(this); gameOver = new GameOver(this); gameover = false; marioState = new MarioStateClass(false, false, false, false); fireBalls = new List <Fireball>(); fbDelay = 0; countOfPopItem = 0; projColDet = new ProjectileCollisionDetector(this, fireBalls); animationModifier = 0; starDuration = 500; base.Initialize(); }
public void Unstable(MarioStateClass marState) { System.Random dummy = new System.Random(); if (dummy.Next() % 4 == 0 && !marState.move) { marState.XCoor -= 3; } else if (dummy.Next() % 3 == 0) { if (marState.YCoor - 3 > 0) { marState.YCoor -= 5; } } else if (dummy.Next() % 5 == 0) { marState.YCoor += 5; } }
public LargeStarMario(Game game) { myGame = game; marioState = myGame.marioState; texture = myGame.marioSprites; leftFacingCurrentFrame = 63; rightFacingCurrentFrame = 56; marioState.star = true; marioState.curStat = MarioStateClass.marioStatus.large; duration = 10; altColor = false; animMod = 0; drawMar = new DrawLargeStarMario(this); myGame.marioState.bat = false; myGame.sound.Starman(); visible = true; }