public void setCurrentCharacter(ScoreoidPlayer scoreoidPlayer)
    {
        Player player = new Player(scoreoidPlayer.playerName,
                                   getWeapon(scoreoidPlayer.weapon),
                                   scoreoidPlayer.xp,
                                   scoreoidPlayer.change,
                                   scoreoidPlayer.numberOfKills);

        currentCharacter = player;

        if (null == player.weapon)
        {
            Utilities().setGameState(GameState.WeaponSelection);
        }
        else
        {
            Utilities().setGameState(GameState.PlayerProfile);
        }
    }
    void GUI_Instructions(int windowID)
    {
        List<GUILayoutOption> instructionPanelOptions = new List<GUILayoutOption>();
        instructionPanelOptions.Add(GUILayout.Width(windowRects["Instructions"].width-140));
        instructionPanelOptions.Add(GUILayout.Height(windowRects["Instructions"].height-300));

        GUI.FocusWindow(windowID);

        AddSpikes(windowRects["Instructions"].width-80, true);

        GUILayout.BeginVertical();

        GUILayout.Label("Instructions", "InstructionsTitleBox");

        GUILayout.Space(20);

        instructionScroll = GUILayout.BeginScrollView(instructionScroll);

        GUILayout.BeginVertical();

        GUILayout.Space(10);
        GUILayout.Box("", "Divider");
        GUILayout.Space(10);

        GUILayout.BeginHorizontal(instructionPanelOptions.ToArray());
        GUILayout.BeginVertical();
        Instructions_Title("Overview", "Spare Change is about battling foes, collecting change, choosing weapons, and unlocking new challenges.");
        Instructions_Element("Registration", "Players create a Character Name and Password.");
        Instructions_Element("Loading", "Players may Login and continue their progress.");
        Instructions_Element("Profile","The Profile is the buffer between each Battle where the Player's Stats are displayed");
        Instructions_Element("Battling", "Battles are randomized based on level, and present a variety of foes.");
        Instructions_Element("Rewards", "Players are awarded XP and Spare Change for defeating all foes.");
        Instructions_Element("Changing Weapons", "Upon completion of a Battle a Player may choose a new weapon.");
        Instructions_Element("Leveling Up","By earning enough XP, the player will increase in Health, Gain access to new Weapons, and face new Enemies");
        Instructions_Element("Character Saving","After each battle, the Character's stats are updated to the Spare Change scorekeeper.");
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        GUILayout.Space(10);
        GUILayout.Box("", "Divider");
        GUILayout.Space(10);

        GUILayout.BeginHorizontal(instructionPanelOptions.ToArray());
        GUILayout.BeginVertical();
        Instructions_Title("Battling", "Where Change and XP are awarded.");
        Instructions_Element("Turn-based", "Combatants take turns in a queue based on their Speed + Modifiers.");
        Instructions_Element("Selecting Actions", "Attack choices are presented based on the Player's Weapon");
        Instructions_Element("Roll Chance-to-Hit", "Combatants must roll 10 or better on a d20, + modifiers, to Hit an opponent.");
        Instructions_Element("Roll Damage", "Upon a successful Hit, the weapons Damage Roll is thrown, and total damage calculated");
        Instructions_Element("Battle Finish", "The Battle ends when the Player kills all Enemies or is killed.");
        Instructions_Element("Rewards","For defeating the enemies, XP and Spare Change are awarded.");
        GUILayout.FlexibleSpace();
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        GUILayout.Space(10);
        GUILayout.Box("", "Divider");
        GUILayout.Space(10);

        GUILayout.BeginHorizontal(instructionPanelOptions.ToArray());
        GUILayout.BeginVertical();
        Instructions_Title("The Player Card", "The card that all Players carry.");
        Instructions_Element("Character Name", "...of Legend.");
        Instructions_Element("Level", "Current XP Level achieved by this Character.");
        Instructions_Element("XP", "Number of Experience Points from winning battles.");
        Instructions_Element("Spare Change", "Money collected.");
        Instructions_Element("Kills", "Number of kills achieved in battle.");
        Instructions_Element("Weapon", "Brief description of the Equipped Weapon.");
        Instructions_Element("Boss Battle Indicator", "Indicates the Next Battle will be a Boss.");
        GUILayout.FlexibleSpace();
        GUILayout.EndVertical();

        GUILayout.Space(10);

        GUILayout.BeginVertical();
        Weapon bat = Utilities().getWeapon("Bat");
        Player samplePlayer = new Player("Chu-chu-chuck Changes", bat, 25, 10, 6);
        PlayerCard(samplePlayer, true);
        GUILayout.FlexibleSpace();
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        GUILayout.Space(10);
        GUILayout.Box("", "Divider");
        GUILayout.Space(10);

        GUILayout.BeginHorizontal(instructionPanelOptions.ToArray());
        GUILayout.BeginVertical();
        Instructions_Title("The Weapon Card", "A Weapon Card displays the details of a Weapon:");
        Instructions_Element("Weapon Type Icon", "Melee, Ranged, or Magic.");
        Instructions_Element("Weapon Name", "What you call it.");
        Instructions_Element("Damage Roll", "Type and Quantity of Dice rolled for Damage.");
        Instructions_Element("Damage Roll Icon", "Icon displaying the Type of Dice");
        Instructions_Element("Level", "A measure of the Weapon's quality.");
        Instructions_Element("Damage Modifier", "Affects all Damage rolls.");
        Instructions_Element("Speed Modifier", "Affects the weilder's Initiative in battle.");
        Instructions_Element("Defense Modifier", "Affects Chance-To-Hit rolls targeted at the weilder.");
        Instructions_Element("Actions", "Battle Options and their modifiers when used.");
        Instructions_Element("Action Hit Modifier", "Affects the ToHit.");
        Instructions_Element("Action Damage Modifier", "Affects Damage.");
        GUILayout.FlexibleSpace();
        GUILayout.EndVertical();

        GUILayout.Space(10);

        GUILayout.BeginVertical();
        WeaponSelectItem(bat);
        GUILayout.FlexibleSpace();
        GUILayout.EndVertical();
        GUILayout.EndHorizontal();

        GUILayout.Space(10);
        GUILayout.Box("", "Divider");
        GUILayout.Space(10);

        GUILayout.EndVertical(); // scrolling panel container

        GUILayout.EndScrollView();

        // | #Back# <---> |
        GUILayout.BeginHorizontal();
        if(GUILayout.Button("Back"))
        {
            Utilities().setGameState(GameState.Title);
        }
        GUILayout.FlexibleSpace();
        GUILayout.EndHorizontal();

        GUILayout.EndVertical();
    }
    void PlayerCard(Player player, bool bBossFightNextIndicator=false)
    {
        Rect lastRect;

        if(null == player)
            return;

        /******/
        GUILayout.BeginVertical(GUILayout.Width(WEAPON_SELECT_ITEM_WIDTH)
                                //, GUILayout.Height(WEAPON_SELECT_ITEM_HEIGHT)
                                );

        GUILayout.Space(10);

        GUILayout.BeginHorizontal(GUILayout.Height(25));
        GUILayout.Space(15);
        GUILayout.Box(string.Format("{0}", player.name), "ShortLabel");
        GUILayout.Space(15);
        GUILayout.EndHorizontal();

        GUILayout.Box("", "Divider");

        GUILayout.BeginHorizontal();
        GUILayout.Space(25);
        GUILayout.BeginVertical();
        WeaponItemModifier("Level: ", player.level, "WeaponLevel", false);
        WeaponItemModifier("XP: ", (int)player.xp, "WeaponLevel", false);
        WeaponItemModifier("Spare Change: ", (int)player.change, "WeaponLevel", false);
        WeaponItemModifier("Health: ", (int)player.health, "WeaponLevel", false);
        WeaponItemModifier("Kills: ", player.kills, "WeaponLevel", false);
        GUILayout.EndVertical();
        GUILayout.Space(25);
        GUILayout.EndHorizontal();

        GUILayout.Box("", "Divider");

        GUILayout.Box("Weapon", "WeaponActionTitle");

        GUILayout.BeginHorizontal();
        GUILayout.Space(10);
        GUILayout.BeginVertical();
        GUILayout.Box("", "Divider");

        GUILayout.BeginHorizontal();
        GUILayout.Box(player.weapon.name, "WeaponActionName", GUILayout.Width(90));

        GUILayout.Box(string.Format("{0}{1}", player.weapon.roll.count, player.weapon.roll.dieName), "WeaponLevel", GUILayout.Width(30), GUILayout.Height(30));

        WeaponItemModifier("Level: ", player.weapon.level, "WeaponLevel", false);

        GUILayout.EndHorizontal();

        GUILayout.Box("", "Divider");

        if((Utilities().PlayerIsAtBossFight(player)))
            GUILayout.Box("Boss Fight Next Battle","ShortLabel");

        GUILayout.EndVertical();
        GUILayout.Space(10);
        GUILayout.EndHorizontal();

        GUILayout.FlexibleSpace();

        GUILayout.Space(10);

        GUILayout.EndVertical();

        lastRect = GUILayoutUtility.GetLastRect();

        GUI.Box(lastRect, "");
    }
Exemplo n.º 4
0
 public bool PlayerIsAtBossFight(Player player)
 {
     return BattleController().PlayerIsAtBossFight(player);
 }
Exemplo n.º 5
0
 public bool PlayerIsAtBossFight(Player player)
 {
     return(BattleController().PlayerIsAtBossFight(player));
 }
    public void setCurrentCharacter(ScoreoidPlayer scoreoidPlayer)
    {
        Player player = new Player(scoreoidPlayer.playerName,
                                    getWeapon(scoreoidPlayer.weapon),
                                    scoreoidPlayer.xp,
                                    scoreoidPlayer.change,
                                    scoreoidPlayer.numberOfKills);

        currentCharacter = player;

        if(null == player.weapon)
            Utilities().setGameState(GameState.WeaponSelection);
        else
            Utilities().setGameState(GameState.PlayerProfile);
    }