Ejemplo n.º 1
0
    void OnGUI()
    {
        playerName     = GUILayout.TextField(playerName, 10);
        isMageClass    = GUILayout.Toggle(isMageClass, "Mage Class");
        isWarriorClass = GUILayout.Toggle(isWarriorClass, "Warrior Class");
        if (GUILayout.Button("Create"))
        {
            if (isMageClass)
            {
                newPlayer.PlayerClass = new BaseMageClass();
            }
            else if (isWarriorClass)
            {
                newPlayer.PlayerClass = new BaseWarriorClass();
            }
            CreateNewPlayer();


            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();
            SceneManager.LoadScene("main");
        }

        if (GUILayout.Button("Load"))
        {
            SceneManager.LoadScene("main");
        }
    }
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        if (_firstClear = false)
        {
            PlayerPrefs.DeleteAll();
            GameInformation.FirstClear = true;
            SaveInformation.SaveAllInformation();
        }

        GameInformation.SpeechAutoPlay = true;
        SaveInformation.SaveAllInformation();

        //LoadInformation.LoadAllInformation();
        Debug.Log(GameInformation.CorrectPreQuestions.Count);
    }
Ejemplo n.º 3
0
 public void test()
 {
     if (IsMage)
     {
         newPlayer.PlayerClass = new BaseMageClass();
         DescriptionText.text  = newPlayer.PlayerClass.CharacterClassDescription;
         StatsText.text        = "Stamina: " + newPlayer.PlayerClass.Stamina.ToString() + "\n" +
                                 "Endurance: " + newPlayer.PlayerClass.Endurance.ToString() + "\n" +
                                 "Strength: " + newPlayer.PlayerClass.Strength.ToString() + "\n" +
                                 "Intellect: " + newPlayer.PlayerClass.Intellect.ToString() + "\n" +
                                 "Agility: " + newPlayer.PlayerClass.Agility.ToString() + "\n" +
                                 "Resistance: " + newPlayer.PlayerClass.Resistance.ToString() + "\n";
         Debug.Log("You Selected Mage Class");
     }
     if (IsWarrior)
     {
         newPlayer.PlayerClass = new BaseWarriorClass();
         DescriptionText.text  = newPlayer.PlayerClass.CharacterClassDescription;
         StatsText.text        = "Stamina: " + newPlayer.PlayerClass.Stamina.ToString() + "\n" +
                                 "Endurance: " + newPlayer.PlayerClass.Endurance.ToString() + "\n" +
                                 "Strength: " + newPlayer.PlayerClass.Strength.ToString() + "\n" +
                                 "Intellect: " + newPlayer.PlayerClass.Intellect.ToString() + "\n" +
                                 "Agility: " + newPlayer.PlayerClass.Agility.ToString() + "\n" +
                                 "Resistance: " + newPlayer.PlayerClass.Resistance.ToString() + "\n";
         Debug.Log("You Selected Warrior Class");
     }
     playerName = PlayerName.text;
     Debug.Log(playerName);
     CreateNewPlayer();
     StoreNewPlayerInfo();
     SaveInformation.SaveAllInformation();
 }
Ejemplo n.º 4
0
    void OnGUI()
    {
        // Add all the other classes soon
        playerName     = GUILayout.TextArea(playerName, 15);
        isMageClass    = GUILayout.Toggle(isMageClass, "Mage Class");
        isWarriorClass = GUILayout.Toggle(isWarriorClass, "Warrior Class");
        if (GUILayout.Button("Create"))
        {
            if (isMageClass)
            {
                newPlayer.PlayerClass = new BaseMageClass();
            }
            else if (isWarriorClass)
            {
                newPlayer.PlayerClass = new BaseWarriorClass();
            }
            CreateNewPlayer();
            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();
        }

        if (GUILayout.Button("Load"))
        {
            SceneManager.LoadScene("Test");
        }
    }
Ejemplo n.º 5
0
    public static void UpdateInventory()
    {
        LoadInformation.LoadAllInformation();
        InventoryManager._inventory = GameInformation.PlayerInventory;

        if (InventoryManager._inventory.Count != 0)
        {
            for (int i = 0; i < InventoryManager._inventory.Count; i++)
            {
                if (InventoryManager._inventory[i] != null)
                {
                    Color c;
                    Image itemImage = InventoryManager._inventorySlotIcons[i].GetComponent <Image>();
                    c                = itemImage.color;
                    c.a              = 1;
                    itemImage.color  = c;
                    itemImage.sprite = IconDB._icons[InventoryManager._inventory[i].ItemIcon];
                }
            }
        }

        for (int i = InventoryManager._inventory.Count; i < InventoryManager._inventorySlots.Count; i++)
        {
            Color c;
            Image itemImage = _inventorySlotIcons[i].GetComponent <Image>();
            c               = itemImage.color;
            c.a             = 0;
            itemImage.color = c;
        }

        SaveInformation.SaveAllInformation();
    }
Ejemplo n.º 6
0
    public void SaveAnswer()
    {
        int           questionNum = questionIndex - 1;
        List <string> answers     = new List <string>();

        if (currentToggleGroup != null)
        {
            foreach (Toggle t in currentToggleGroup.ActiveToggles())
            {
                if (t.isOn)
                {
                    answers.Add(t.GetComponentInChildren <Text>().text);
                }
            }
        }

        if (currentInputField != null)
        {
            answers.Add(currentInputField.text);
        }

        if (currentToggleList.Count != 0)
        {
            foreach (Toggle t in currentToggleList)
            {
                if (t.isOn)
                {
                    answers.Add(t.GetComponentInChildren <Text>().text);
                }
            }
        }

        GameInformation.TeacherQuestions.Add(questionNum, answers);
        SaveInformation.SaveAllInformation();
    }
    public void ApplyChanges()
    {
        if (speechAutoPlayToggle.isOn)
        {
            GameInformation.SpeechAutoPlay = true;
            SaveInformation.SaveAllInformation();
            Debug.Log(GameInformation.SpeechAutoPlay);
        }
        else
        {
            GameInformation.SpeechAutoPlay = false;
            SaveInformation.SaveAllInformation();
        }

        if (colorblindModeToggle.isOn)
        {
            GameInformation.ColorblindMode = true;
            SaveInformation.SaveAllInformation();
            cbm = GameObject.Find("ColorblindManager").GetComponent <ColorblindManager>();
            cbm.UpdateColorScheme();
        }
        else
        {
            GameInformation.ColorblindMode = false;
            SaveInformation.SaveAllInformation();
            SceneManager.LoadScene(14);
            Debug.Log(GameInformation.SpeechAutoPlay);
        }
    }
    public void IncreaseAbilityScore(int ID)
    {
        if (ID == 1)
        {
            if (_activeBoosts < GameInformation.PlayerClass.ClassAbilities[1].AbilityMaxRank &&
                GameInformation.PlayerXP >= GameInformation.PlayerClass.ClassAbilities[1].AbilityXPToLevel[_activeBoosts])
            {
                GameInformation.PlayerClass.ClassAbilities[1].AbilityCurrentRank++;
                GameInformation.PlayerXP -= GameInformation.PlayerClass.ClassAbilities[1].AbilityXPToLevel[_activeBoosts];
                _activeBoosts++;
                GameInformation.PlayerBoosts[6] = _activeBoosts;
            }
            else
            {
                Debug.Log("max rank reached or not enough xp");
            }
        }
        else if (ID == 2)
        {
            if (_passiveBoosts < GameInformation.PlayerClass.ClassAbilities[2].AbilityMaxRank &&
                GameInformation.PlayerXP >= GameInformation.PlayerClass.ClassAbilities[2].AbilityXPToLevel[_passiveBoosts])
            {
                GameInformation.PlayerClass.ClassAbilities[2].AbilityCurrentRank++;
                GameInformation.PlayerXP -= GameInformation.PlayerClass.ClassAbilities[2].AbilityXPToLevel[_passiveBoosts];
                _passiveBoosts++;
                GameInformation.PlayerBoosts[7] = _passiveBoosts;
            }
            else
            {
                Debug.Log("max rank reached or not enough xp");
            }
        }

        SaveInformation.SaveAllInformation();
    }
Ejemplo n.º 9
0
    public void Attribute()
    {
        newPlayer.Playerlevel = 15;
        newPlayer.PlayerName  = playerName;

        //HERO ATTRIBUTE
        newPlayer.Stamina = newPlayer.playerClass.stamina;
        newPlayer.Health  = newPlayer.playerClass.endurance;

        //MAIN HERO ATTRIBUTE

        newPlayer.Intellect = newPlayer.playerClass.intellect;
        newPlayer.Agility   = newPlayer.playerClass.agility;
        newPlayer.Strength  = newPlayer.playerClass.strength;
        StoreInfo();
        SaveInformation.SaveAllInformation();

        //MAIN INFO
        Debug.Log("Player Class: " + newPlayer.playerClass.CharacterClassName);
        Debug.Log("Player Level: " + newPlayer.Playerlevel);
        Debug.Log("Player Name is: " + newPlayer.PlayerName);

        //MAIN ATTRIBUTES
        Debug.Log("Player Intellect: " + newPlayer.Intellect);
        Debug.Log("Player Strength: " + newPlayer.Strength);
        Debug.Log("Player Agility: " + newPlayer.Agility);

        //ATTRIBUTES
        Debug.Log("Player Stamina: " + newPlayer.Stamina);
        Debug.Log("Player Endurance: " + newPlayer.Health);
    }
Ejemplo n.º 10
0
 void OnGUI()
 {
     playerName     = GUILayout.TextArea(playerName, 15);
     isMageClass    = GUILayout.Toggle(isMageClass, "Mage Class");
     isWarriorClass = GUILayout.Toggle(isWarriorClass, "Warrior Class");
     if (GUILayout.Button("Create"))
     {
         if (isMageClass)
         {
             newPlayer.PlayerClass = new BaseMageClass();
         }
         else if (isWarriorClass)
         {
             newPlayer.PlayerClass = new BaseWarriorClass();
         }
         CreateNewPlayer();
         Debug.Log("Player name: " + newPlayer.PlayerName);
         Debug.Log("Player class: " + newPlayer.PlayerClass.CharacterClassName);
         Debug.Log("Player level: " + newPlayer.PlayerLevel);
         Debug.Log("Player strength: " + newPlayer.Strength);
         Debug.Log("Player gold: " + newPlayer.Gold);
         Debug.Log("Player resistance: " + newPlayer.Resistance);
         StoreNewPlayerInformation();
         SaveInformation.SaveAllInformation();
     }
     if (GUILayout.Button("Load"))
     {
         Application.LoadLevel("test");
     }
 }
Ejemplo n.º 11
0
    public void CheckIfAllTopicsAreDone()
    {
        if (readingDone && differencesDone && wrongDone)
        {
            areaReturnButton.SetActive(true);

            Scene currentScene = SceneManager.GetActiveScene();
            int   buildIndex   = currentScene.buildIndex;
            if (buildIndex == 8)
            {
                GameInformation.TPJComplete = true;
            }
            else if (buildIndex == 15)
            {
                GameInformation.OTComplete = true;
            }
            else if (buildIndex == 16)
            {
                GameInformation.RHComplete = true;
            }
            else if (buildIndex == 20)
            {
                GameInformation.IFGComplete = true;
            }

            SaveInformation.SaveAllInformation();
        }
    }
Ejemplo n.º 12
0
    public void ScoreAnswerAndContinue()
    {
        if (currentAnswer == true)
        {
            if (trueToggle.isOn)
            {
                Debug.Log("Correct!");

                GameInformation.CorrectPreQuestions.Add(shuffledQuestions[questionIndex - 1]);
            }
            else
            {
                Debug.Log("Incorrect. :(");
                GameInformation.PreQuestions.Add(shuffledQuestions[questionIndex - 1]);
            }
        }
        else
        {
            if (falseToggle.isOn)
            {
                Debug.Log("Correct!");

                GameInformation.CorrectPreQuestions.Add(shuffledQuestions[questionIndex - 1]);
            }
            else
            {
                Debug.Log("Incorrect. :(");
                GameInformation.PreQuestions.Add(shuffledQuestions[questionIndex - 1]);
            }
        }

        SaveCertaintyRating();
        trueToggle.isOn  = false;
        falseToggle.isOn = false;
        rating0.isOn     = false;
        rating1.isOn     = false;
        rating2.isOn     = false;

        if (questionIndex != shuffledQuestions.Count)
        {
            progressFill.fillAmount = ((float)questionIndex / (float)shuffledQuestions.Count);
            DisplayNextQuestion();
        }
        else
        {
            for (int i = 0; i < GameInformation.PreCertainty.Length; i++)
            {
                Debug.Log(GameInformation.PreCertainty[i].ToString());
            }
            progressFill.fillAmount = ((float)questionIndex / (float)shuffledQuestions.Count);
            paper.SetActive(false);
            endText.SetActive(true);
            nextSceneButton.SetActive(true);
            done = true;
            GameInformation.PreCompletionTime = completionTime;
        }

        SaveInformation.SaveAllInformation();
        Debug.Log(GameInformation.PreQuestions.Count);
    }
Ejemplo n.º 13
0
    private void BuyItem(GameObject selectedItemPrefab, BaseItem item)
    {
        //if player has enough money to buy the item
        if (GameInformation.PlayerMoney >= item.ItemValue)
        {
            //remove the item from the shop inventory
            _shopItems.Remove(item);

            //remove the prefab associated with the item
            _shopitemPrefabs.Remove(selectedItemPrefab);

            //add the item to the player's inventory
            GameInformation.PlayerInventory.Add(item);

            //decrease the player's currency by the price
            GameInformation.PlayerMoney -= item.ItemValue;

            //save all information
            SaveInformation.SaveAllInformation();

            //destroy the prefab
            Destroy(selectedItemPrefab);
        }
        else
        {
            Debug.Log("Not enough money!");
        }
    }
Ejemplo n.º 14
0
    private void OnGUI()
    {
        _playerName      = GUILayout.TextArea(_playerName);
        _isMageClass     = GUILayout.Toggle(_isMageClass, "Mage Class");
        _isWarrriorClass = GUILayout.Toggle(_isWarrriorClass, "Warrior Class");

        if (GUILayout.Button("Create"))
        {
            if (_isMageClass)
            {
                _newPlayer.PlayerClass = new BaseMageClass();
            }
            else if (_isWarrriorClass)
            {
                _newPlayer.PlayerClass = new BaseWarriorClass();
            }

            CreateNewPlayer();
            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();

            /*Debug.Log("Player Name: " + _newPlayer.PlayerName);
             * Debug.Log("Player class: " + _newPlayer.PlayerClass.CharacterClassName);
             * Debug.Log("Player level: " + _newPlayer.PlayerLevel);*/
        }

        if (GUILayout.Button("Load"))
        {
            //LoadInformation.LoadAllInformation();
            SceneManager.LoadScene("TestLoading");
        }
    }
Ejemplo n.º 15
0
    public void Commit()
    {
        GameInformation.Stamina         = levelPointsToAllocate[0];
        GameInformation.Endurance       = levelPointsToAllocate[1];
        GameInformation.Strenght        = levelPointsToAllocate[2];
        GameInformation.Agility         = levelPointsToAllocate[3];
        GameInformation.Intelect        = levelPointsToAllocate[4];
        GameInformation.Resistance      = levelPointsToAllocate[5];
        GameInformation.MagicResistance = levelPointsToAllocate[6];

        GameInformation.PlayerName           = name;
        GameInformation.PlayerLevel          = Convert.ToInt32(level);
        GameInformation.Gold                 = Convert.ToInt32(gold);
        GameInformation.CurrentXP            = Convert.ToInt32(currentXP);
        GameInformation.RequiredXP           = Convert.ToInt32(requiredXP);
        GameInformation.AvailableLevelPoints = Points.LevelPoints;

        GameInformation.AvailableLevelPoints = Points.LevelPoints;
        SaveInformation.SaveAllInformation();
        commitedPoints                    = true;
        Combat.healthCheckedOnce          = false;
        Combat.energyCheckOnce            = false;
        Combat.manaCheckOnce              = false;
        Combat.damageCheckedOnce          = false;
        ClickToMove.checkSpeedOnce        = false;
        ProjectileStrike.checkRangeDamage = false;
        PopulatePanel();
    }
Ejemplo n.º 16
0
    void OnGUI()
    {
        if (string.IsNullOrEmpty(GameInformation.PlayerName))
        {
            playerName = GUILayout.TextArea(playerName, 15);

            isWarden   = GUILayout.Toggle(isWarden, "Warden Class");
            isDerezzer = GUILayout.Toggle(isDerezzer, "Derezzer Class");
            isTracker  = GUILayout.Toggle(isTracker, "Tracker Class");
            if (GUILayout.Button("Create"))
            {
                if (isWarden)
                {
                    newPlayer.PlayerClass = new BaseWardenClass();
                }
                else if (isDerezzer)
                {
                    newPlayer.PlayerClass = new BaseDerezzerClass();
                }
                else if (isTracker)
                {
                    newPlayer.PlayerClass = new BaseTracerClass();
                }

                CreatePlayer();
                StoreNewPlayerInfo();
                SaveInformation.SaveAllInformation();
            }
        }
    }
Ejemplo n.º 17
0
 void OnGUI()
 {
     playerName     = GUILayout.TextArea(playerName, 15);
     isScholarClass = GUILayout.Toggle(isScholarClass, "Scholar Class");
     isWarriorClass = GUILayout.Toggle(isWarriorClass, "Warrior Class");
     if (GUILayout.Button("Create"))
     {
         if (isScholarClass)
         {
             newPlayer.PlayerClass = new BaseScholarClass();
         }
         else if (isWarriorClass)
         {
             newPlayer.PlayerClass = new BaseWarriorClass();
         }
         newPlayer.PlayerLevel        = 1;
         newPlayer.PlayerStrength     = newPlayer.PlayerClass.Strength;
         newPlayer.PlayerDexterity    = newPlayer.PlayerClass.Dexterity;
         newPlayer.PlayerIntelligence = newPlayer.PlayerClass.Intelligence;
         newPlayer.PlayerName         = playerName;
         StoreNewPlayerInfo();
         SaveInformation.SaveAllInformation();
         Debug.Log("Player Name: " + newPlayer.PlayerName);
         Debug.Log("Player Class" + newPlayer.PlayerClass.CharacterClassName);
         Debug.Log("Player Level: " + newPlayer.PlayerLevel);
         Debug.Log("Player Strength: " + newPlayer.PlayerStrength);
         Debug.Log("Player Dexterity: " + newPlayer.PlayerDexterity);
         Debug.Log("Player Intelligence: " + newPlayer.PlayerIntelligence);
     }
     if (GUILayout.Button("Load"))
     {
         Application.LoadLevel("tset");
     }
 }
Ejemplo n.º 18
0
    public void AssignID()
    {
        GameInformation.UserID = UniqueID.GetID();

        SaveInformation.SaveAllInformation();

        Debug.Log(GameInformation.UserID);
    }
    public void DisplayMainItems()
    {
        GUI.Label(new Rect(Screen.width / 2, 20, 250, 250), "START A NEW CAMPAIGN");

        if (CreatePlayerGUI.currentState != CreatePlayerGUI.CreatePlayerStates.FINAL_SETUP)
        {
            if (GUI.Button(new Rect(470, 370, 50, 50), "Next"))
            {
                if (CreatePlayerGUI.currentState == CreatePlayerGUI.CreatePlayerStates.CLASS_SELECTION)
                {
                    ChooseClass(classSelection);
                    CreatePlayerGUI.currentState = CreatePlayerGUI.CreatePlayerStates.STAT_ALLOCATION;
                }
                else if (CreatePlayerGUI.currentState == CreatePlayerGUI.CreatePlayerStates.STAT_ALLOCATION)
                {
                    GameInformation.Rhetoric  = statAllocationModule.pointsToAllocate [0];
                    GameInformation.Image     = statAllocationModule.pointsToAllocate [1];
                    GameInformation.Diplomacy = statAllocationModule.pointsToAllocate [2];

                    CreatePlayerGUI.currentState = CreatePlayerGUI.CreatePlayerStates.FINAL_SETUP;
                }
            }
        }
        else if (CreatePlayerGUI.currentState == CreatePlayerGUI.CreatePlayerStates.FINAL_SETUP)
        {
            if (GUI.Button(new Rect(525, 370, 50, 50), "Finish"))
            {
                GameInformation.PlayerName = playerFirstName + " " + playerLastName;
                GameInformation.PlayerBio  = playerBio;
                if (genderSelection == 0)
                {
                    GameInformation.IsMale = true;
                }
                else if (genderSelection == 1)
                {
                    GameInformation.IsMale = false;
                }
                SaveInformation.SaveAllInformation();
            }
        }

        if (CreatePlayerGUI.currentState != CreatePlayerGUI.CreatePlayerStates.CLASS_SELECTION)
        {
            if (GUI.Button(new Rect(295, 370, 50, 50), "Back"))
            {
                if (CreatePlayerGUI.currentState == CreatePlayerGUI.CreatePlayerStates.STAT_ALLOCATION)
                {
                    statAllocationModule.ranOnce = false;
                    GameInformation.PlayerClass  = null;
                    CreatePlayerGUI.currentState = CreatePlayerGUI.CreatePlayerStates.CLASS_SELECTION;
                }
                else if (CreatePlayerGUI.currentState == CreatePlayerGUI.CreatePlayerStates.FINAL_SETUP)
                {
                    CreatePlayerGUI.currentState = CreatePlayerGUI.CreatePlayerStates.STAT_ALLOCATION;
                }
            }
        }
    }
Ejemplo n.º 20
0
    private void LoadDebate(Quest quest, int passedChecks)
    {
        GameInformation.CurrentQuest = quest;
        GameInformation.PassedChecks = passedChecks;
        GameInformation.Enemy        = EnemyDB.enemies[5];

        SaveInformation.SaveAllInformation();
        SceneManager.LoadScene(3);
    }
Ejemplo n.º 21
0
    void OnGUI()
    {
        GUILayout.Label(class1.CharacterClassName);
        GUILayout.Label(class1.CharacterClassDescription);
        GUILayout.Label("Rhetoric: " + class1.Rhetoric.ToString());
        GUILayout.Label("Image : " + class1.Image.ToString());
        GUILayout.Label("Diplomacy: " + class1.Diplomacy.ToString());

        GUILayout.Label(class2.CharacterClassName);
        GUILayout.Label(class2.CharacterClassDescription);
        GUILayout.Label("Rhetoric: " + class2.Rhetoric.ToString());
        GUILayout.Label("Image : " + class2.Image.ToString());
        GUILayout.Label("Diplomacy: " + class2.Diplomacy.ToString());

        GUILayout.Label(class3.CharacterClassName);
        GUILayout.Label(class3.CharacterClassDescription);
        GUILayout.Label("Rhetoric: " + class3.Rhetoric.ToString());
        GUILayout.Label("Image : " + class3.Image.ToString());
        GUILayout.Label("Diplomacy: " + class3.Diplomacy.ToString());

        playerName = GUILayout.TextArea(playerName, 20);

        isGladHander = GUILayout.Toggle(isGladHander, "Gladhander");
        isChief      = GUILayout.Toggle(isChief, "Chief-of-Staff");
        isSophist    = GUILayout.Toggle(isSophist, "Sophist");

        if (GUILayout.Button("Create"))
        {
            if (isGladHander)
            {
                newPlayer.PlayerClass = new BaseGladhanderClass();
            }
            else if (isChief)
            {
                newPlayer.PlayerClass = new BaseChiefClass();
            }
            else
            {
                newPlayer.PlayerClass = new BaseSophistClass();
            }

            CreateNewPlayer();
            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();

            foreach (Skill skill in newPlayer.PlayerSkills)
            {
                Debug.Log(skill.SkillName);
                Debug.Log(skill.SkillDescription);
                Debug.Log(skill.SkillID);
                Debug.Log(skill.SkillRank);
                Debug.Log(skill.SkillType);
                Debug.Log(skill.ExperienceNeededToLevelSkill);
            }
        }
    }
Ejemplo n.º 22
0
    void OnGUI()
    {
        playerName     = GUILayout.TextArea(playerName, 15);
        isMageClass    = GUILayout.Toggle(isMageClass, "Mage Class");
        isWarriorClass = GUILayout.Toggle(isWarriorClass, "Warrior Class");
        isRogueClass   = GUILayout.Toggle(isRogueClass, "Rogue Class");
        isRangerClass  = GUILayout.Toggle(isRangerClass, "Ranger Class");
        isClericClass  = GUILayout.Toggle(isClericClass, "Cleric Class");
        if (GUILayout.Button("Create"))
        {
            if (isMageClass)
            {
                newPlayer.PlayerClass = new BaseMageClass();
            }
            else if (isWarriorClass)
            {
                newPlayer.PlayerClass = new BaseWarriorClass();
            }
            else if (isRogueClass)
            {
                newPlayer.PlayerClass = new BaseRogueClass();
            }
            else if (isRangerClass)
            {
                newPlayer.PlayerClass = new BaseRangerClass();
            }
            else if (isClericClass)
            {
                newPlayer.PlayerClass = new BaseClericClass();
            }

            newPlayer.PlayerLevel = 1;
            newPlayer.Stamina     = newPlayer.PlayerClass.Stamina;
            newPlayer.Endurance   = newPlayer.PlayerClass.Endurance;
            newPlayer.Dexterity   = newPlayer.PlayerClass.Dexterity;
            newPlayer.Intellect   = newPlayer.PlayerClass.Intellect;
            newPlayer.Strenght    = newPlayer.PlayerClass.Strenght;
            newPlayer.Name        = playerName;

            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();

            Debug.Log("Player Name: " + newPlayer.Name);
            Debug.Log("Player Class: " + newPlayer.PlayerClass.CharacterClassName);
            Debug.Log("Player Level: " + newPlayer.PlayerLevel);
            Debug.Log("Player Stamina: " + newPlayer.Stamina);
            Debug.Log("Player Endurance: " + newPlayer.Endurance);
            Debug.Log("Player Strenght: " + newPlayer.Strenght);
            Debug.Log("Player Dexterity: " + newPlayer.Dexterity);
            Debug.Log("Player Intellect: " + newPlayer.Intellect);
        }
        if (GUILayout.Button("Load"))
        {
            Application.LoadLevel("test");
        }
    }
Ejemplo n.º 23
0
    public void ConfirmCapitulation()
    {
        Debug.Log("lose screen");
        GameInformation.PlayerXP    -= (int)(0.1f * GameInformation.PlayerXP);
        GameInformation.PlayerMoney -= (int)(0.1f * GameInformation.PlayerMoney);

        SaveInformation.SaveAllInformation();

        ReturnToMap();
    }
Ejemplo n.º 24
0
    private void LoadDebate(int enemyIndex, int xpReward, int followerReward)
    {
        GameInformation.Enemy                = EnemyDB.enemies[enemyIndex - 1];
        GameInformation.EventXPReward        = xpReward;
        GameInformation.EventFollowersReward = followerReward;
        GameInformation.EventItemReward      = ItemDB.items[Random.Range(0, ItemDB.items.Count)];

        SaveInformation.SaveAllInformation();

        SceneManager.LoadScene(3);
    }
Ejemplo n.º 25
0
    private void SaveAndUpdateHUD()
    {
        GameInformation.PlayerXP        += _xpReward;
        GameInformation.PlayerFollowers += _followerReward;
        GameInformation.PlayerInventory.Add(_itemReward);
        _pastFirstScreen = false;

        SaveInformation.SaveAllInformation();

        followerLabel.text = GameInformation.PlayerFollowers.ToString();
    }
Ejemplo n.º 26
0
    // Use this for initialization
    void Start()
    {
        SaveInformation.SaveAllInformation();

        _events = RandomEventDB.events;

        QuestPinSetup();

        DisableAllPinHovers();

        _victoryScreen.SetActive(false);
    }
Ejemplo n.º 27
0
    public void UpdateInformationFromEventAndReturn()
    {
        int      xp        = GameInformation.EventXPReward;
        int      followers = GameInformation.EventFollowersReward;
        BaseItem item      = GameInformation.EventItemReward;

        GameInformation.PlayerXP        += xp;
        GameInformation.PlayerFollowers += followers;
        GameInformation.PlayerInventory.Add(item);
        SaveInformation.SaveAllInformation();

        ReturnToMap();
    }
Ejemplo n.º 28
0
    public void UpdateInformationFromQuestAndReturn()
    {
        int xp        = QuestManager.CalculateXPReward(_quest, _passedChecks);
        int followers = QuestManager.CalculateFollowerReward(_quest, _passedChecks);

        GameInformation.PlayerXP += xp;
        Debug.Log(followers);
        Debug.Log(GameInformation.PlayerFollowers);
        GameInformation.PlayerFollowers += followers;
        Debug.Log(GameInformation.PlayerFollowers);
        SaveInformation.SaveAllInformation();

        ReturnToMap();
    }
Ejemplo n.º 29
0
    void OnGUI()
    {
        playerName = GUILayout.TextArea(playerName);
        isBard     = GUILayout.Toggle(isBard, "Bard Class");
        isStealth  = GUILayout.Toggle(isStealth, "Stealth Class");
        isFighter  = GUILayout.Toggle(isFighter, "Fighter Class");

        if (GUILayout.Button("Create"))
        {
            if (isBard)
            {
                newPlayer.PlayerClass = new BaseBardClass();
            }
            else if (isStealth)
            {
                newPlayer.PlayerClass = new BaseStealthClass();
            }
            else if (isFighter)
            {
                newPlayer.PlayerClass = new BaseFighterClass();
            }

            newPlayer.PlayerName  = playerName;
            newPlayer.PlayerLevel = 1;
            newPlayer.Hitpoints   = newPlayer.PlayerClass.Hitpoints;
            newPlayer.Strength    = newPlayer.PlayerClass.Strength;
            newPlayer.Dexterity   = newPlayer.PlayerClass.Dexterity;
            newPlayer.Diplomacy   = newPlayer.PlayerClass.Diplomacy;
            newPlayer.Majik       = newPlayer.PlayerClass.Majik;

            StoreNewPlayerInfo();
            SaveInformation.SaveAllInformation();

            Debug.Log("Player Name: " + newPlayer.PlayerName);
            Debug.Log("Player Class: " + newPlayer.PlayerClass.CharacterClassName);
            Debug.Log("Player Level: " + newPlayer.PlayerLevel);
            Debug.Log("Player Hitpoints: " + newPlayer.Hitpoints);
            Debug.Log("Player Strength: " + newPlayer.Strength);
            Debug.Log("Player Dexterity: " + newPlayer.Dexterity);
            Debug.Log("Player Diplomacy: " + newPlayer.Diplomacy);
            Debug.Log("Player Majik: " + newPlayer.Majik);
        }

        if (GUILayout.Button("Load"))
        {
            //Application.LoadLevel("tset");
            SceneManager.LoadScene("tset", LoadSceneMode.Additive);
        }
    }
    // Use this for initialization
    void Start()
    {
        GameInformation.InterventionComplete = true;
        SaveInformation.SaveAllInformation();

        activeText = texts[index];
        for (int i = 1; i < 5; i++)
        {
            texts[i].SetActive(false);
        }

        nextSceneButton.SetActive(false);

        sb = topicSelectSpeechButton.GetComponentInChildren <SpeechButton>();
    }