Esempio n. 1
0
 public TextboxPopup(string info, int charLimit)
 {
     infoText = new Text();
     text = new Text();
     this.info = info;
     this.charLimit = charLimit;
 }
Esempio n. 2
0
 public HighscoreScreen()
 {
     backgroundImage = new Image();
     header = new Text();
     highscores = new Text[5];
     backButton = new TextButton();
     cursor = new Cursor();
 }
Esempio n. 3
0
 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();
 }
Esempio n. 4
0
 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();
 }
Esempio n. 5
0
 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();
 }
Esempio n. 6
0
 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];
 }
Esempio n. 7
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);
        }
Esempio n. 8
0
 public ScoreCounter()
 {
     text = new Text();
 }
Esempio n. 9
0
        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();
        }