public void OpenThumbnail(IGameScreenManager screenManager) { if (info != null) { screenManager.PushScreen(new ThumbnailScreen(screenManager, info, exePath, this)); } }
public TestScreen(IGameScreenManager screenManager) : base(screenManager) { //objectManager.AddObject(new NormalPlant()); TouchPanel.EnabledGestures = GestureType.Tap | GestureType.Hold; // Init game data initSpriteBank(); gameBoard = new PZBoard(9, 5); gameBoard.Board = new int[,]{ {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0} }; // Gen object for (int i = 0; i < 5; i++) for (int j = 0; j < 9; j++) { int type = gameBoard.Board[i, j]; if (type == 1) { objectManager.AddObject(PZObjectFactory.Instance.createPlant(gameBoard.GetPositonAt(i, j))); } else if (type == 2) { objectManager.AddObject(PZObjectFactory.Instance.createIcePlant(gameBoard.GetPositonAt(i, j))); } } }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); activePlayerTexture = Content.Load <Texture2D>("Player/player01_Front"); activePlayer_FightTexture = Content.Load <Texture2D>("Player/player01_Fight"); // Set The Traveling Content activeCompanionTexture = Content.Load <Texture2D>("NPCs/carl"); activeCompanion_FightTexture = Content.Load <Texture2D>("NPCs/Carl_Fight"); worldMapBGM = Content.Load <SoundEffect>("Music/WorldMapLoop"); // Player Textures charaOne_World = Content.Load <Texture2D>("Player/player01_Front"); charaTwo_World = Content.Load <Texture2D>("Player/player02_Front"); charaThree_World = Content.Load <Texture2D>("Player/player03_Front"); // Player Fight Textures charaOne_Fight = Content.Load <Texture2D>("Player/player01_Fight"); charaTwo_Fight = Content.Load <Texture2D>("Player/player02_Fight"); charaThree_Fight = Content.Load <Texture2D>("Player/player03_Fight"); //Set m_screenManager m_screenManager = new GameScreenManager(spriteBatch, Content); m_screenManager.OnGameExit += Exit; // Start Game By Loading Menu Screen m_screenManager.ChangeScreen(new MenuScreen(m_screenManager)); }
//Overloaded Constructor public FightScreen(IGameScreenManager gameScreenManager, string m_currentWord, string m_questionWord) { m_ScreenManager = gameScreenManager; currentWord = m_currentWord; questionWord = m_questionWord; }
//Overloaded Constructor public FightScreen(IGameScreenManager gameScreenManager, string stage_ID) { m_ScreenManager = gameScreenManager; //SET STAGE ID stageID = stage_ID; //SET THE STAGE DATA stageData.SetStageData(stageID); //SET BATTLE SPRITES, QUESTIONS, TIMER, ETC cdTimer = stageData.Timer; enemyHealth = stageData.EnemyHP; enemyMaxHealth = stageData.EnemyHP; bgName = "BGs/" + stageData.StageBG; SetNewQuestion(); #region Various Timer Initalization // SET ANSWER DELAY TIMER + START canAnswerTimer.Interval = 400; canAnswerTimer.Start(); // SET DAMAGE DISPLAY TIMER displayDamageImageTimer.Interval = 500; // SET FIGHTWON TIMER fightWonTimer.Interval = 3000; #endregion }
public GameOverScreen(IGameScreenManager gameScreenManager, ContentManager contentManager, int score) { _gameScreenManager = gameScreenManager; _contentManager = contentManager; _inputManager = new InputManager(_gameScreenManager); _score = score; }
void Reset() { MediaPlayer.Stop(); screenManager.Dispose(); LoadConfig(); int width = (int.TryParse(ConfigurationManager.AppSettings["ScreenWidth"], out width) ? width : GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width); int height = (int.TryParse(ConfigurationManager.AppSettings["ScreenHeight"], out height) ? height : GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height); screenSize = new Vector2(width, height); graphics.PreferredBackBufferWidth = (int)screenSize.X; graphics.PreferredBackBufferHeight = (int)screenSize.Y; graphics.SynchronizeWithVerticalRetrace = false; graphics.ApplyChanges(); particleSystem = new ParticleSystem(); currentPlatform = 0; currentThumbnail = 0; screenManager = new GameScreenManager(spriteBatch, Content); screenManager.OnGameExit += Exit; screenManager.ChangeScreen(new MainScreen(screenManager, GraphicsDevice)); }
public GameModeScene(IGameScreenManager manager) : base(manager) { services = (SCSServices)manager.Game.Services.GetService(typeof(SCSServices)); resourceManager = (IResourceManager)manager.Game.Services.GetService(typeof(IResourceManager)); }
/// <summary> /// UnloadContent will be called once per game and is the place to unload /// game-specific content. /// </summary> protected override void UnloadContent() { if (gameScreenManager != null) { gameScreenManager.Dispose(); gameScreenManager = null; } }
/// <summary> /// UnloadContent will be called once per game and is the place to unload /// game-specific content. /// </summary> protected override void UnloadContent() { if (m_screenManager != null) { m_screenManager.Dispose(); m_screenManager = null; } }
public ThumbnailScreen(IGameScreenManager screenManager, string infoText, string exePath, Thumbnail currentThumbnail) { this.screenManager = screenManager; this.infoText = infoText; this.exePath = exePath; this.currentThumbnail = currentThumbnail; MainScreen.SignInvert = true; }
protected override void UnloadContent() { if(m_screenManager != null) { m_screenManager.Dispose(); m_screenManager = null; } }
//This Method Begins the game by Changing Screens to the World Map public void StartGame(IGameScreenManager m_screenManager) { if (Game1.m_audioState == Game1.AudioState.PLAYING) { Game1.currentInstance.Stop(); } m_screenManager.ChangeScreen(new WorldMapScreen(m_screenManager)); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. m_spriteBatch = new SpriteBatch(GraphicsDevice); m_screenManager = new GameScreenManager(m_spriteBatch, Content, m_screenBounds); m_screenManager.OnGameExit += Exit; m_screenManager.ChangeScreen(new IntroScreen(m_screenManager)); }
//Loads Up the Load File Screen. public void LoadGame(IGameScreenManager m_screenManager) { //Turn Off Music if (Game1.m_audioState == Game1.AudioState.PLAYING) { Game1.currentInstance.Stop(); } //Load Load File Screen m_screenManager.ChangeScreen(new LoadFileScreen(m_screenManager)); //Load File Screen Appears }
// Menu Screen Methods #region Menu Screen #region New Game //Loads a new game by transferring the player to character selection. public void NewGame(IGameScreenManager m_screenManager) { //Turn Off Music if (Game1.m_audioState == Game1.AudioState.PLAYING) { Game1.currentInstance.Stop(); } //Load Character Selection Screen m_screenManager.ChangeScreen(new CharacterSelectionScreen(m_screenManager)); }
public ScoreScreen(IGameScreenManager gameScreenManager, ContentManager contentManager) { _gameScreenManager = gameScreenManager; _contentManager = contentManager; _inputManager = new InputManager(_gameScreenManager); _azureStorageService = new AzureStorageService(); _globalScoreIsLoaded = false; _playerScoreContainer = new ScoreContainer(GetPlayerScores(), CommonScreenTextConstants.Score.PlayerScores, true, new Rectangle(0, 0, _gameScreenManager.GameScreenWidth, _gameScreenManager.GameScreenHeight)); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. m_spriteBatch = new SpriteBatch(GraphicsDevice); m_screenManager = new GameScreenManager(m_spriteBatch, Content); m_screenManager.OnGameExit += Exit; m_screenManager.changeScreen(new IntroScreen(m_screenManager)); // TODO: use this.Content to load your game content here }
public TBGamePlayScene(IGameScreenManager manager) : base(manager) { services = (SCSServices)manager.Game.Services.GetService(typeof(SCSServices)); resourceManager = (IResourceManager)manager.Game.Services.GetService(typeof(IResourceManager)); GameManager = new GameManagerImpl(manager.Game); Components.Add(GameManager); InputLayer = new DefaultInputLayer(manager.Game); InputLayer.onInit(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); whitePixel = Content.Load <Texture2D>("Images/WhitePixel"); defaultFont = Content.Load <SpriteFont>("Fonts/DefaultFont"); gameScreenManager = new GameScreenManager(spriteBatch, Content, GraphicsDevice, whitePixel, defaultFont); gameScreenManager.Initialize(); gameScreenManager.GameScreenWidth = graphics.PreferredBackBufferWidth; gameScreenManager.GameScreenHeight = graphics.PreferredBackBufferHeight; gameScreenManager.OnGameExit += Exit; gameScreenManager.ChangeScreen(new MenuScreen(gameScreenManager, Content)); }
public GamePlayScreen(IGameScreenManager screenManager, IGestureManager gm) : base(screenManager) { gameBoard = new PZBoard(9, 4, objectManager); gameBoard.Board = new int[,] { {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0} }; this.gm = gm; this.playBacground = new PlayBackground(this.Game, SCSServices.Instance.ResourceManager.GetResource<Texture2D>(backgroundNames[GRandom.RandomInt(backgroundNames.Length)])); ResetGame(0); }
protected override void LoadContent() { _font = Content.Load <SpriteFont>("font/File"); song = Content.Load <Song>("sounds/bgm_1"); MediaPlayer.Volume = Singleton.Instance.MasterBGMVolume; MediaPlayer.Play(song); MediaPlayer.IsRepeating = true; m_spriteBatch = new SpriteBatch(GraphicsDevice); m_screenManager = new GameScreenManager(m_spriteBatch, Content); m_screenManager.ChangeScreen(new MenuScreen(m_screenManager)); m_screenManager.OnGameExit += Exit; }
public LevelOneScreen(IGameScreenManager gameScreenManager) { m_ScreenManager = gameScreenManager; #region Timer Stuff enemyMovementLeftRight = random1.Next(1, 21); enemyMovementUpDown = random2.Next(1, 21); timer.AutoReset = true; timer.Interval = 400; timer.Start(); fightStartTimer.AutoReset = false; fightStartTimer.Interval = 800; fightStartTimer.Start(); #endregion }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); spriteFont = Content.Load <SpriteFont>(@"font"); buttons = Content.Load <Texture2D>(@"buttons"); rect = new Texture2D(graphics.GraphicsDevice, 1, 1); Color[] data = new Color[1]; for (int i = 0; i < data.Length; ++i) { data[i] = Color.White; rect.SetData(data); } screenManager = new GameScreenManager(spriteBatch, Content); screenManager.OnGameExit += Exit; screenManager.ChangeScreen(new MainScreen(screenManager, GraphicsDevice)); }
public GamePlayScreen(IGameScreenManager screenManager, IGestureManager gm, PvZGrowSystem growSys) : base(screenManager, "PlayScreen") { gameBoard = new PZBoard(9, 4, objectManager); gameBoard.Board = new int[,] { {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0} }; this.gm = gm; level = PZLevelManager.Instance.GetLevel(); level.OnBeginWave += level_OnBeginWave; this.playBacground = new PlayBackground(this.Game, SCSServices.Instance.ResourceManager.GetResource<Texture2D>(level.Background)); this.playBacground.Initialize(); this.playBacground.OnAnimatingCompleted += this.OnBackgroundAnimatingCompleted; this.playBacground.StartAnimate(); _messageCenter = new MessageCenter(this.Game); this.growSystem = growSys; }
public MiniGameLimitBombFactory(IGameScreenManager manager) { this.manager = manager; }
public IntroductionScreen(IGameScreenManager sm) : base(sm, "Introduction") { }
public MessageGameScreen(IGameScreenManager screenManager, string name) : base(screenManager, name) { spriteBatch = SCSServices.Instance.SpriteBatch; }
public InputManager(IGameScreenManager gameScreenManager) { _gameScreenManager = gameScreenManager; }
public ExitScreen(IGameScreenManager sm, IGestureManager gm) : base(sm, "Exit") { this.gm = gm; }
public BasicGameSceneFactory(IGameScreenManager manager) { this.manager = manager; }
public AboutSceneFactory(IGameScreenManager manager) { this.manager = manager; }
//Constructor public WorldKeyDisplay(IGameScreenManager gameScreenManager) { m_ScreenManager = gameScreenManager; m_command = new Command(m_ScreenManager); }
// Add variables that need to be updated in update here public StandardGameScreen(IGameScreenManager gameScreenManager) { m_ScreenManager = gameScreenManager; }
public BasicGameScene(IGameScreenManager manager) : base(manager) { }
public MainMenuScreen(IGameScreenManager screenManager, IGestureManager gMan) : base(screenManager, "MainMenu") { this.gestureManager = gMan; }
public UpgradeScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public IntroScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public ControlsScreen(IGameScreenManager gameScreenManager, ContentManager contentManager) { _gameScreenManager = gameScreenManager; _contentManager = contentManager; _inputManager = new InputManager(_gameScreenManager); }
public ExitScreenFactory(IGameScreenManager sMan, IGestureManager gMan) { this.screenMan = sMan; this.gesMan = gMan; }
public HelpScreen(IGameScreenManager sm, IGestureManager gm) : base(sm, "Help") { this.gm = gm; }
public WinScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public CharacterScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public MessageGameScreenFactory(IGameScreenManager sMan, string backgroundName, string screenName) { this.screenMan = sMan; this.backgroundName = backgroundName; this.screenName = screenName; }
public PauseSceneFactory(IGameScreenManager manager) { this.manager = manager; }
public LoseScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public GamePlayScreenFactory(IGameScreenManager screenManager, IGestureManager gMan) { this.gesMan = gMan; this.manager = screenManager; }
public MiniGameTime(IGameScreenManager manager) : base(manager) { }
public OptionScreen(IGameScreenManager sm, IGestureManager gm) : base(sm, "Option") { this.gm = gm; }
public MiniGameLimitBomb(IGameScreenManager manager) : base(manager) { }
//Constructors public CharacterSelectionScreen(IGameScreenManager gameScreenManager) { m_ScreenManager = gameScreenManager; m_command = new Command(m_ScreenManager); }
public AboutScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public ChooseGameFactory(IGameScreenManager manager) { this.manager = manager; }
public GameScreen(Game game) : base(game) { ScreenManager = (IGameScreenManager)game.Services.GetService(typeof(IGameScreenManager)); }
public IntroScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public PlayScreen(IGameScreenManager screenManager) { m_screenManager = screenManager; }
public IntroductionScreenFactory(IGameScreenManager sMan) { this.screenMan = sMan; }
public TestScreenFactory(IGameScreenManager screenManager) { this.manager = screenManager; }
public MiniGameTimeFactory(IGameScreenManager manager) { this.manager = manager; }