Exemplo n.º 1
0
        public void initialize()
        {
            MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.Five_Armies, "Five_Armies");

            background.model = ModelFactory.loadModel("SuperBattleCave");
            background.Scale = 3.0f;

            TurnList.Add(StateHandler.GetPC(0));
            TurnList.Add(StateHandler.GetPC(1));
            TurnList.Add(StateHandler.GetPC(2));
            for (int i = 0; i < MonsterList.Length; i++)
            {
                TurnList.Add(MonsterList[i]);
            }

            current = StateHandler.GetPC(0);

            cameraTarget = PCBuilder.getPC(0);

            strategy = 0;

            x = 75;
            y = 50;
            z = 10;
        }
Exemplo n.º 2
0
 public override void Input(int input)
 {
     if (input == Globals.KEY_ACCEPT)
     {
         if (count == 0)
         {
             MapFactory.mapLoad("test");
             StateInGame.locX   = 4;
             StateInGame.locY   = 4;
             StateInGame.change = true;
             StateHandler.State = new StateInGame();
         }
         else if (count == 1)
         {
             StateHandler.State = new SubStateFeatureNotImplemented(this);
         }
         else if (count == 2)
         {
             StateHandler.State = new SubStateOptionsMenu(this);
         }
         else if (count == 3)
         {
             StateHandler.State = new StateCredits();
         }
     }
     else if (input == Globals.KEY_CANCEL)//used to prevent the user from exiting the main menu
     {
         StateHandler.AddDelay();
         MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "menuBack");
     }
     else
     {
         base.Input(input);
     }
 }
        public override void Update()
        {
            if (fresh)
            {
                fresh = false;

                MediaHandler.Background = "FSCMTitleScreen.jpg";
                MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.welcome, "Welcome");

                StateHandler.State = new SubStateTitleScreenMenu(this);
            }
        }
Exemplo n.º 4
0
        public override void Update()
        {
            count++;
            if (fresh)
            {
                fresh = false;
                MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.HoneyBadgers, "HoneyBadgers");
                MediaHandler.Background = "teamlogo.jpg";
            }

            if (count > 220)
            {
                StateHandler.State = new StateTitleScreen();
            }
        }
Exemplo n.º 5
0
 public override void Input(int input)
 {
     if (input == Globals.KEY_ACCEPT)
     {
         if (count < ItemHandler.runeList.Count && runeSlotTaken(ItemHandler.runeList[count].Wearflags))
         {
             MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "error");
             return;
         }
         StateHandler.State = new SubStateConfirmEquipMenu(this, 310, 90, PCid, slot, count, Globals.ITEM_TYPE_RUNE);
     }
     else
     {
         StateHandler.AddDelay();
         base.Input(input);
         if (direction(input))
         {
             StateHandler.State = new SubStateRuneChange(this, PCid, slot, count);
         }
     }
 }//end input
Exemplo n.º 6
0
        public override void ParentInput(int input)
        {
            if (!won && !lost)
            {
                if (current != MonsterList[0])
                {
                    switch (input)
                    {
                    case Globals.MENU_ATTACK:
                        StateHandler.State = new SubStateAttackSelect(StateHandler.State, current);
                        MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.attack, "attack");
                        break;

                    case Globals.MENU_DEFEND:
                        current.setDefend(true);
                        MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.defend, "defend");
                        break;

                    case Globals.MENU_ITEM:
                        MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.itemSelect, "selectItem");
                        break;

                    case Globals.MENU_MAGIC:
                        StateHandler.State = new SubStateRuneSelect(StateHandler.State, current);
                        MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.magic, "magic");
                        break;

                    case Globals.MENU_ITEM_USED:
                        break;
                    }
                }

                if (input == Globals.MESSAGE_CONFIRMED)
                {
                    nextTurn();

                    if (!(current is PC))
                    {
                        foreach (Monster m in MonsterList)
                        {
                            m.act();
                        }
                        nextTurn();
                    }
                }
            }
            else if (won)
            {
                StateHandler.changeState(new StateInGame());
            }
            else if (input == Globals.MESSAGE_CONFIRMED)
            {
                StateHandler.changeState(new StateTitleScreen());
            }

            bool allDefeated = true;

            foreach (Monster m in MonsterList)
            {
                if (m.Health > 0)
                {
                    allDefeated = false;
                }
            }

            if (allDefeated)
            {
                Victory();
            }

            if (allDefeated && input == Globals.MESSAGE_CONFIRMED)
            {
                if (!won)
                {
                    Victory();
                }
                else
                {
                    StateHandler.State = new StateInGame();
                }
            }
        }
Exemplo n.º 7
0
 public static string getBackground()
 {
     return MediaHandler.checkUpdateBackground();
 }
        public override void Input(int input)
        {
            if (input == Globals.KEY_UP || input == Globals.KEY_DOWN)
            {
                MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuMove, "menuMove");

                StateHandler.SetDelay(8);

                colors[count] = Color.DarkGray;

                if (input == Globals.KEY_UP)
                {
                    if (count == 0)
                    {
                        count = menu.Length - 1;
                    }
                    else
                    {
                        count--;
                    }
                }
                else if (input == Globals.KEY_DOWN)
                {
                    count = (count + 1) % menu.Length;
                }

                colors[count] = Color.White;

                int tempVal = (int)(Globals.hmod * height);

                tempVal /= Globals.FONT_HEIGHT;

                tempVal -= 1;

                Color[]  tempColor = null;
                string[] tempMenu  = null;
                int      prefCount = tempVal / 2;

                if (tempVal >= menu.Length || absolute) // The total amount of options is less than the size of the menu box
                {
                    tempColor = colors;
                    tempMenu  = menu;
                }
                else
                {
                    int realCount;
                    tempMenu = new string[tempVal];

                    if (prefCount > count)
                    {
                        realCount = count;
                        for (int i = 0; i < tempVal; i++)
                        {
                            tempMenu[i] = menu[i];
                        }
                    }
                    else if (prefCount >= menu.Length - count)
                    {
                        realCount = count - (menu.Length - tempVal);
                        // Menu from menu-tval to menu)
                        for (int i = 0; i < tempVal; i++)
                        {
                            tempMenu[i] = menu[(menu.Length - tempVal) + i];
                        }
                    }
                    else
                    {
                        realCount = tempVal / 2;
                        for (int i = 0; i < tempVal; i++)
                        {
                            tempMenu[i] = menu[(count - prefCount) + i];
                        }
                    }

                    tempColor = new Color[tempVal];

                    for (int i = 0; i < tempVal; i++)
                    {
                        tempColor[i] = Color.DarkGray;
                    }

                    tempColor[realCount] = Color.White;
                }

                messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, tempColor, true, messageBoxes[0].Scaling(), messageBoxes[0].IsChildMessage());
            }
            else if (input == Globals.KEY_CANCEL)
            {
                StateHandler.AddDelay();
                MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "menuBack");

                StateHandler.State = Parent;
            }
        }
Exemplo n.º 9
0
        public override void Input(int input)
        {
            switch (input)
            {
            case Globals.KEY_DOWN:
                if (mainActor != null)
                {
                    mainActor.MoveY(-0.3f);
                }
                break;

            case Globals.KEY_UP:
                if (mainActor != null)
                {
                    mainActor.MoveY(0.3f);
                }
                break;

            case Globals.KEY_LEFT:
                if (mainActor != null)
                {
                    mainActor.MoveX(-0.3f);
                }
                break;

            case Globals.KEY_RIGHT:
                if (mainActor != null)
                {
                    mainActor.MoveX(0.3f);
                }
                break;

            case Globals.KEY_ACCEPT:
                break;

            case Globals.KEY_CANCEL:
                break;

            case Globals.KEY_MENU:
                StateHandler.State = new SubStateGameMenu(this);
                break;

            case Globals.KEY_MISC:
                break;

            // These are meant for rotations around the character.
            case Globals.KEY_CAMERA_LEFT:
                Camera.Rotate(-1.0f);
                break;

            case Globals.KEY_CAMERA_RIGHT:
                Camera.Rotate(1.0f);
                break;

            case Globals.KEY_START:
                StateHandler.Paused = !StateHandler.Paused;
                if (StateHandler.Paused)
                {
                    MediaHandler.Pause();
                }
                else
                {
                    MediaHandler.Unpause();
                }
                StateHandler.AddDelay();
                break;
            }
        }
Exemplo n.º 10
0
        public override void Update()
        {
            if (fresh)
            {
                fresh     = false;
                actorList = MapFactory.GetCurrentMaze();
                MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.mazebgm, "mazebgm");
                MediaHandler.Background = "default.png";
                mainActor = PCBuilder.getPC("John");
                actorList.Add(mainActor);
                StateHandler.CameraTarget = mainActor;
                if (newGame)
                {
                    StateHandler.Level = 1;
                    StateHandler.Quest = (new QuestExplore(17, 17, null, 2));

                    PCBuilder.getPC(0).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[2] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_LEGS + Globals.WEARFLAG_FEET, Globals.ELEMENT_NATURE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(0).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_NATURE, -1, -1, "");
                    PCBuilder.getPC(0).Health      = PCBuilder.getPC(0).MaxHealth;

                    PCBuilder.getPC(1).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[2] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_LEGS + Globals.WEARFLAG_FEET, Globals.ELEMENT_FIRE, 1, Globals.ITEM_QUALITY_TRASH, "");
                    PCBuilder.getPC(1).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_FIRE, -1, -1, "");
                    PCBuilder.getPC(1).Health      = PCBuilder.getPC(1).MaxHealth;

                    PCBuilder.getPC(2).equipped[0] = ItemFactory.CreateEquip(Globals.WEARFLAG_WEAPON, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Smile");
                    PCBuilder.getPC(2).equipped[1] = ItemFactory.CreateEquip(Globals.WEARFLAG_HEAD, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Glasses");
                    PCBuilder.getPC(2).equipped[2] = ItemFactory.CreateEquip(0, Globals.ELEMENT_PHYSICAL, 4, Globals.ITEM_QUALITY_MYTHICAL, "The Beard");
                    PCBuilder.getPC(2).equipped[3] = ItemFactory.CreateEquip(Globals.WEARFLAG_CHEST | Globals.WEARFLAG_LEGS | Globals.WEARFLAG_FEET, Globals.ELEMENT_PHYSICAL, 3, Globals.ITEM_QUALITY_LEGENDARY, "The Trenchcoat");
                    PCBuilder.getPC(2).runes[0]    = ItemFactory.CreateRune(0, Globals.ELEMENT_WATER, -1, -1, "");
                    PCBuilder.getPC(2).Health      = PCBuilder.getPC(2).MaxHealth;

                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_POTION, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_FIRE + Globals.TYPE_CONSUMABLE_PHYSICAL, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_FIRE, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_WATER, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_NATURE, 0, 1, Globals.ITEM_QUALITY_TRASH, null));
                    ItemHandler.itemList.Add(ItemFactory.CreateConsumable(Globals.TYPE_CONSUMABLE_PHYSICAL, 0, 1, Globals.ITEM_QUALITY_TRASH, null));

                    newGame = false;
                }
            }

            if (change)
            {
                change      = false;
                mainActor.X = locX;
                mainActor.Y = locY;
            }
        }
Exemplo n.º 11
0
 public StateCredits()
 {
     MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.creditbgm, "creditbgm");
     messageBoxes        = new MessageBoxInterface[1];
     this.credits        = new string[14][];
     this.credits[0]     = new string[3];
     this.credits[0][0]  = "             The";
     this.credits[0][1]  = "FLYING SPAGHETTI CODE MONSTER";
     this.credits[0][2]  = "        Strikes Back!";
     this.credits[1]     = new string[2];
     this.credits[1][0]  = "       By:";
     this.credits[1][1]  = "Team Honey Badger";
     this.credits[2]     = new string[3];
     this.credits[2][0]  = "Project Lead:";
     this.credits[2][1]  = "";
     this.credits[2][2]  = "Jared Bailes";
     this.credits[3]     = new string[6];
     this.credits[3][0]  = "      Programming:";
     this.credits[3][1]  = "";
     this.credits[3][2]  = "      Jared Bailes";
     this.credits[3][3]  = "John " + (char)34 + "The Intern" + (char)34 + " Rowley";
     this.credits[3][4]  = "     Jason Swannack";
     this.credits[3][5]  = "      Mick Warren";
     this.credits[4]     = new string[4];
     this.credits[4][0]  = "  3D Art:";
     this.credits[4][1]  = "";
     this.credits[4][2]  = "David Mason";
     this.credits[4][3]  = "Mick Warren";
     this.credits[5]     = new string[5];
     this.credits[5][0]  = "   2D Art:";
     this.credits[5][1]  = "";
     this.credits[5][2]  = "Jared Bailes";
     this.credits[5][3]  = "Robert Sevin";
     this.credits[5][4]  = "Mick Warren";
     this.credits[6]     = new string[3];
     this.credits[6][0]  = "    Sound:";
     this.credits[6][1]  = "";
     this.credits[6][2]  = "Jason Swannack";
     this.credits[7]     = new string[4];
     this.credits[7][0]  = "    Story:";
     this.credits[7][1]  = "";
     this.credits[7][2]  = " Robert Sevin";
     this.credits[7][3]  = "Jason Swannack";
     this.credits[8]     = new string[1];
     this.credits[8][0]  = "    Special Thanks:";
     this.credits[9]     = new string[3];
     this.credits[9][0]  = "    Special Thanks:";
     this.credits[9][1]  = "";
     this.credits[9][2]  = "     Tom Capaul";
     this.credits[10]    = new string[4];
     this.credits[10][0] = "    Special Thanks:";
     this.credits[10][1] = "";
     this.credits[10][2] = "    SoundJay.com";
     this.credits[10][3] = "    Kevin Macleod";
     this.credits[11]    = new string[1];
     this.credits[11][0] = " Thanks";
     this.credits[12]    = new string[2];
     this.credits[12][0] = " Thanks";
     this.credits[12][1] = "  For";
     this.credits[13]    = new string[3];
     this.credits[13][0] = " Thanks";
     this.credits[13][1] = "  For";
     this.credits[13][2] = "Playing!";
 }