public TextboxPopup(string info, int charLimit) { infoText = new Text(); text = new Text(); this.info = info; this.charLimit = charLimit; }
public HighscoreScreen() { backgroundImage = new Image(); header = new Text(); highscores = new Text[5]; backButton = new TextButton(); cursor = new Cursor(); }
public SinglePlayerGame(Settings settings) { playerOneField = new Playfield(GameType.Time, new Vector2(500f, 325f), settings.PlayfieldSize); backgroundImage = new Image(); pauseImage = new Image(); startText = new Text(); timer = new Text(); }
public SplitScreenGame(Settings settings) { playerOneField = new Playfield(settings.GameType, new Vector2(780f, 325f), settings.PlayfieldSize); playerTwoField = new Playfield(settings.GameType, new Vector2(300f, 325f), settings.PlayfieldSize); backgroundImage = new Image(); pauseImage = new Image(); timer = new Text(); }
public ResultsScreen(GameResult results, bool isNetwork) { this.results = results; this.isNetwork = isNetwork; backGroundImage = new Image(); gameoverText = new Text(); infoText = new Text(); results = new GameResult(); time = new Text(); p1Score = new Text(); p2Score = new Text(); cursor = new Cursor(); }
public NetworkGame(Settings settings, NetPeer peer) { this.settings = settings; this.peer = peer; localPlayerField = new Playfield(settings.GameType, new Vector2(780f, 325f), settings.PlayfieldSize); remotePlayerField = new RemotePlayfield(settings.GameType, new Vector2(300f, 325f), settings.PlayfieldSize); xDiff = localPlayerField.Position.X - remotePlayerField.Position.X; backgroundImage = new Image(); pauseImage = new Image(); timeText = new Text(); countdownText = new OutlineText(); if (peer.ConnectionsCount == 0) NewScreen(new NetworkGameSetup(), "No Connection"); else connection = peer.Connections.ToArray()[0]; }
public override void Initialize(SpriteBatch spriteBatch, Settings settings) { backgroundImage.Initialize(); backgroundImage.Layer = 0.1f; backgroundImage.Position = new Vector2(500, 360); backgroundImage.Size = new Vector2(1000, 720); backgroundImage.TextureName = TextureNames.game_background; backButton.Initialize(); backButton.Text = "Back"; backButton.Position = new Vector2(100, 620); backButton.Click += new ButtonEventHandler(OnBack); header.Initialize(); header.Font = FontNames.Segoe_UI_Mono; header.Layer = 0.7f; header.IsCentered = true; header.Position = new Vector2(500, 100); header.TextColor = Color.Navy; header.TextValue = "Single Player\n High Score"; cursor.Initialize(); for (int i = 0; i < highscores.Length; i++) { highscores[i] = new Text(); highscores[i].Initialize(); highscores[i].Font = FontNames.Segoe_UI_Mono; highscores[i].Layer = 0.7f; highscores[i].Position = new Vector2(375, 175 + i * 75); highscores[i].TextColor = Color.MintCream; int num = i + 1; highscores[i].TextValue = num.ToString() + ": " + settings.score[i].ToString("F0"); } base.Initialize(spriteBatch, settings); }
public ScoreCounter() { text = new Text(); }
public Playfield(GameType gameType, Vector2 position, int sizeX) { this.gameType = gameType; this.Position = position; if (sizeX % 2 == 0) sizeX--; blockSize = Width / sizeX; int sizeY = (int)(Height / blockSize); maxBlocks = (sizeX - 1) * sizeY + 2; blocks = new List<Block>(maxBlocks); explodingBlocks = new List<Block>(); BlackBlocksQueued = 0; backgroundImage = new Image(); cutoffLine = new Image(); scoreCounter = new ScoreCounter(); scoreFloater = new ScoreFloater(); scale = new Vector2(blockSize / Block.STANDARDSIZE); staticBlocks = new Block[sizeX, sizeY]; startingColumn = (sizeX + 1) / 2; blockImages = new Image[Enum.GetNames(typeof(BlockType)).Length]; for (int i = 0; i < blockImages.Length; i++) blockImages[i] = new Image(); explosionAnimation = new Animation(); largestComboText = new Text(); stateText = new Text(); }