コード例 #1
0
ファイル: DeadScreen.cs プロジェクト: ferg060129/Toggle
 public DeadScreen(Game1 eng)
     : base(eng)
 {
     buttons.Add(respawn = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "respawn", "respawnHover", "reload", eng));
     buttons.Add(startover = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 350, "startover", "startoverHover", "startscreen", eng));
     buttons.Add(exit = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 400, "exitDead", "exitDeadHover", "exit", eng));
 }
コード例 #2
0
ファイル: PauseScreen.cs プロジェクト: ferg060129/Toggle
 public PauseScreen(Game1 eng)
     : base(eng)
 {
     engine = eng;
         buttons.Add(new StartScreenButton(290, 280, "title","titleHover", "startscreen",eng));
         buttons.Add(new StartScreenButton(290, 380, "help","helpHover", "help",eng));
 }
コード例 #3
0
ファイル: StartScreen.cs プロジェクト: ferg060129/Toggle
 public StartScreen(Game1 eng)
     : base(eng)
 {
     buttons.Add(start = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "start", "startHover", "play", eng));
     buttons.Add(continueB = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 350, "continue", "continueHover", "continue", eng));
     buttons.Add(exit = new StartScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 400, "exit", "exitHover", "exit", eng));
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: ferg060129/Toggle
        public Player(int xLocation, int yLocation, Inventory i, Game1 eng)
            : base(xLocation, yLocation)
        {
            animations.Add("idleDown",  new int[] { 0, 2 });
            animations.Add("idleUp",    new int[] { 1, 2 });
            animations.Add("idleRight", new int[] { 2, 2 });
            animations.Add("idleLeft",  new int[] { 3, 2 });
            animations.Add("moveDown",  new int[] { 4, 4 });
            animations.Add("moveUp",    new int[] { 5, 4 });
            animations.Add("moveRight", new int[] { 6, 2 });
            animations.Add("moveLeft",  new int[] { 7, 2 });
            goodGraphic = Textures.textures["protagsheet"];
            badGraphic = Textures.textures["protagsheet"];

            row = 7;
            imageBoundingRectangle = new Rectangle(32 * row, 32, 32, 32);

            width = 32;
            height = 32;
            velocity = 4;
            collidable = false;
            inventory = i;
            engine = eng;
            proportion = 0.5;
            hitByLaser = 10;
            dirtTracks = false;
        }
コード例 #5
0
ファイル: Inventory.cs プロジェクト: ferg060129/Toggle
 public Inventory(Game1 eng)
 {
     items = new InventoryItem[2,7];
     initializeItemRectangles();
     inventoryGraphic = Textures.textures["inventory2"];
     sf = Textures.fonts["arial12"];
     engine = eng;
 }
コード例 #6
0
ファイル: PlatformScreen.cs プロジェクト: ferg060129/Toggle
        public PlatformScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "You can attempt to drop an item onto a platform by dragging it out of your inventory while standing on the platform.", "Use the I key to toggle the inventory on and off."};

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 2;
        }
コード例 #7
0
ファイル: InventoryScreen.cs プロジェクト: ferg060129/Toggle
        public InventoryScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "Congratulations, you have found an item! All items are stored in your inventory at the top right. You can press the I key to toggle it on and off.", "Hover over your items to learn something about them.", "Maybe you can even combine them to make something better!" };

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 3;
        }
コード例 #8
0
        public KnifeExpositionScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "October 9, 2003...", "Dear Diary...", "My dad shoved me into the wall today after I told my mom I hated her and that she doesn't get me.", "He shouldn't have done that.", "He's going to tell me he's sorry...", "I stole this knife from the art room at school today. No one will know it's missing." };

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 6;
        }
コード例 #9
0
        public OpeningExpositionScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "What... what have I done...", "No... This can't be real, I'm not this kind of person", "I'm so sorry... I'm so sorry...", "Nothing makes sense anymore... nothing...", "Nothi... Zzzzz.... zzzz...", "zzzz....zzzzz....." };

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 6;
        }
コード例 #10
0
        public RoseExpositionScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "Mom....... ?", "Dad.......?", "I take it back...", "Please come back...", "PLEASE............", "I miss you....", ".........", "This rose......", "It's beautiful.....", "Life is beautiful...", "I love you mom and dad.... I'm so sorry..." };

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 11;
        }
コード例 #11
0
ファイル: ShiftLockScreen.cs プロジェクト: ferg060129/Toggle
        public ShiftLockScreen(Game1 eng)
            : base(eng)
        {
            string[] temp = { "The tile you have just stepped on has locked your ability to Shift! Notice the lock symbol on your Shift cooldown bar to the upper left.","Find a key tile to unlock it, so you may Shift once again!"};

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 2;
        }
コード例 #12
0
        public DiaryExpositionScreen(Game1 eng)
            : base(eng)
        {
            textBoxLocation = new Point(150, 100);
            string[] temp = { "My diary...", "September 23, 2003 ...", "Dear Diary, ...", "Today mom told me I had to go to that stupid therapy meeting after school again. If I have to talk to Dr. Boring one more time I'm going to blow my brains out... Or moms brain...", "And dad said if he catches me smoking one more time he won't buy me a car. Are all parents this lame? I want them gone. I hate them." };

            instructions = temp;
            currentInfoText = adjustTextForWrap(instructions[infoIndex], Textures.fonts["arial12"]);
            numInfoBlocks = 5;
        }
コード例 #13
0
 public StartScreenButton(int xLoc, int yLoc, string gra1, string gra2, string actionin, Game1 eng)
 {
     graphic = Textures.textures[gra1];
     graphicHover = Textures.textures[gra2];
     x = xLoc;
     y = yLoc;
     action = actionin;
     imageBoundingRectangle = new Rectangle(0, 0, graphic.Width, graphic.Height);
     clickBox = new Rectangle(x, y, graphic.Width, graphic.Height);
     beep = Textures.sounds["beep"];
     engine = eng;
 }
コード例 #14
0
ファイル: TextBoxScreen.cs プロジェクト: ferg060129/Toggle
        public TextBoxScreen(Game1 eng)
            : base(eng)
        {
            textBox = Textures.textures["textBox"];

            textBoxLocation = new Point(150, 100);
            leftButtonLocation = new Point(padding + textBoxLocation.X, textBoxLocation.Y + textBox.Height - (Textures.textures["leftArrow"].Height + padding));
            rightButtonLocation = new Point(textBoxLocation.X + textBox.Width - (Textures.textures["leftArrow"].Width + padding), textBoxLocation.Y + textBox.Height - (Textures.textures["leftArrow"].Height + padding));
            exitButtonLocation = new Point(textBoxLocation.X + textBox.Width - (Textures.textures["xButton"].Width + padding), padding + textBoxLocation.Y);
            pageQuotientLocation = new Point(textBoxLocation.X + textBox.Width/2,rightButtonLocation.Y);
            buttons.Add(new TextBoxLeftButton(leftButtonLocation.X, leftButtonLocation.Y, "leftArrow", "leftArrowHovered", this));
            buttons.Add(new TextBoxRightButton(rightButtonLocation.X, rightButtonLocation.Y, "rightArrow", "rightArrowHovered", this));
            buttons.Add(new TextBoxExitButton(exitButtonLocation.X, exitButtonLocation.Y, "xButton", "xButtonHovered", this));
        }
コード例 #15
0
ファイル: Player.cs プロジェクト: ripark/Toggle
        public Player(int xLocation, int yLocation, bool initialState, Inventory i, Game1 eng)
            : base(xLocation, yLocation, initialState)
        {
            goodGraphic = Textures.textures["sprites"];
            badGraphic = Textures.textures["sprites"];

            row = 7;
            imageBoundingRectangle = new Rectangle(32 * row, 32, 32, 32);

            width = 32;
            height = 32;
            velocity = 4;
            collidable = false;
            inventory = i;
            engine = eng;
        }
コード例 #16
0
ファイル: AboutScreen.cs プロジェクト: ferg060129/Toggle
 public AboutScreen(Game1 eng)
     : base(eng)
 {
     int xCtr = 32, yCtr = 64;
     foreach(string s in buttonInfo)
     {
         string[]fields =  s.Split('|');
         ObjectButton b = new ObjectButton(xCtr, yCtr, fields[1], fields[2], fields[3], fields[4]);
         stringToButton.Add(fields[0], b);
         buttons.Add(b);
         xCtr += 64;
         if(xCtr >= 448)
         {
             xCtr = 32;
             yCtr += 64;
         }
     }
 }
コード例 #17
0
ファイル: DanceScreen.cs プロジェクト: ferg060129/Toggle
        public DanceScreen(Game1 eng, Player p)
        {
            engine = eng;
            screenWidth = engine.getScreenWidth();
            screenHeight = engine.getScreenWidth();

            if(screenWidth < 800)
            {
                screenWidth = 800;
            }
            tiles = new Tile[screenWidth / 32, screenHeight / 32];
            for (int x = 0; x < tiles.GetLength(0); x++ )
            {
                for(int y = 0; y < tiles.GetLength(1); y++ )
                {

                    int temp = rand.Next(3);
                    tiles[x,y] = new Tile(temp,x,y);
                }
            }
            makePoints();
            addPointOffset();
            player = p;
        }
コード例 #18
0
ファイル: InventoryScreen.cs プロジェクト: kmspies/Toggle
 public InventoryScreen(Game1 eng)
     : base(eng)
 {
     buttons.Add(new InventoryScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "start", "startHover", this));
 }
コード例 #19
0
ファイル: InventoryScreen.cs プロジェクト: ferg060129/Toggle
 public InventoryScreen(Game1 eng)
     : base(eng)
 {
     buttons.Add(new InventoryScreenButton(eng.GraphicsDevice.Viewport.Width / 2 + 160, 300, "start", "startHover", this));
 }
コード例 #20
0
ファイル: Program.cs プロジェクト: ripark/Toggle
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }
コード例 #21
0
ファイル: Screen.cs プロジェクト: ferg060129/Toggle
 public Screen(Game1 eng)
 {
     engine = eng;
 }