public void setNextState(Tutorial next) { this.nxtState = next; }
public void setTutorialState(Tutorial tutorial, TutorialType type) { this.currentTutorial = tutorial; switch (type) { case (TutorialType.GUIDE): this.currentTutorial.setRightAnimation(guideAnimationRight); this.currentTutorial.setLeftAnimation(guideAnimationLeft); break; case (TutorialType.SPAWN): this.currentTutorial.setRightAnimation(spawnAnimationRight); this.currentTutorial.setLeftAnimation(spawnAnimationLeft); break; case (TutorialType.DESPAWN): this.currentTutorial.setRightAnimation(despawnAnimationRight); this.currentTutorial.setLeftAnimation(despawnAnimationLeft); break; default : break; } }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { tutorial = new Tutorial(Content, GAME_WIDTH, GAME_HEIGHT, GUARD_Y, sGuard, sPunch); combination = new Combination(Content, GAME_WIDTH, GAME_HEIGHT, GUARD_Y, sGuard, sPunch); startScreen = new StartScreen(GAME_HEIGHT, GAME_WIDTH, Content); if (combination != null) { combination.getFirstPunch(); } //rand = new Random(DateTime.Now.Millisecond); //currentPunch = getNextPunch(); rPunchLine = new Rectangle(0, 450, 1280, 5); graphics.PreferredBackBufferWidth = GAME_WIDTH; graphics.PreferredBackBufferHeight = GAME_HEIGHT; graphics.IsFullScreen = true; graphics.ApplyChanges(); base.Initialize(); }