コード例 #1
0
ファイル: HeroStats.cs プロジェクト: YoungKrug/RPG-Game
    void Initialized()
    {
        BaseWarriorClass warrior = new BaseWarriorClass(); // Need to make a method that gets the stats from warrior,

        baseCharacter.classess       = BaseCharacterClass.CharacterClasses.WARRIOR;
        GameInformation.PlayerClass  = baseCharacter;
        GameInformation.PlayerName   = "Anaku";// Will change later once we get the actual names of the heros in the story.
        GameInformation.PlayerLevel  = 0;
        GameInformation.Agility      = warrior.Agility;
        GameInformation.Strength     = warrior.Strength;
        GameInformation.Intellect    = warrior.Intellect;
        GameInformation.Mastery      = warrior.Mastery;
        GameInformation.Stamina      = warrior.Stamina;
        GameInformation.Resistance   = 100;
        GameInformation.Endurance    = warrior.Endurance;
        GameInformation.PlayerHealth = calculations.CalculateHealth(GameInformation.Endurance);
        GameInformation.PlayerEnergy = calculations.CalculateEnergy(GameInformation.Intellect);
        GameInformation.CurrentXp    = 0;
        GameInformation.CritChance   = 5 + (GameInformation.Agility * 0.2f);         // Affected by agility and items
        GameInformation.CritDamage   = 2 * ((GameInformation.Agility * 0.1f) / 100); // Affect by agility and some items
        GameInformation.Zodiac       = new BaseTigerClass();                         // The zodiac side and zodiac you are
        GameInformation.SummonsUp    = 0;
        basePlayer.SetStats(false);
        basePlayer.StatPointsToAllocate = 0;
        basePlayer.PlayerClass          = GameInformation.PlayerClass;
        // This will be how we calculate the p layers main stat.
        LevelUp levelUp = new LevelUp();

        for (int i = 0; i < level; i++)
        {
            levelUp.LevelUpCharacter();
        }
        Debug.Log(GameInformation.RequiredXP);
    }
コード例 #2
0
 private static void CheckIfPlayerCanBeLeveled()
 {
     if (GameInformation.CurrentXp >= GameInformation.RequiredXp)
     {
         _leveUpScript.LevelUpCharacter();
     }
 }
コード例 #3
0
 private static void CheckToSeeIfPlayerLeveled()
 {
     if (GameInformation.CurrentExp >= GameInformation.RequiredExp)
     {
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #4
0
ファイル: Experience.cs プロジェクト: rubennaatje/Arpg
 private static void CheckIfPlayerLeveled()
 {
     if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
     {
         levelUp.LevelUpCharacter();
     }
 }
コード例 #5
0
 //private static LevelUp levelUp = new LevelUp();
 public static void AddExperience(int XP) //Increases player experience for every player in the party and checks if conditions for level up are met
 {
     GameInformation.Player1Experience += XP;
     if (GameInformation.Player1Experience >= GameInformation.Player1Required)
     {
         BaseCharacterClass playerClass = new BaseHeroClass();
         LevelUp.LevelUpCharacter(playerClass, GameInformation.Player1Level);
     }
     if (GameInformation.Player2 != 0)
     {
         GameInformation.Player2Experience += XP;
         if (GameInformation.Player2Experience >= GameInformation.Player2Required)
         {
             //Level Up Function
         }
     }
     if (GameInformation.Player3 != 0)
     {
         GameInformation.Player3Experience += XP;
         if (GameInformation.Player3Experience >= GameInformation.Player3Required)
         {
             //Level Up Function
         }
     }
     if (GameInformation.Player4 != 0)
     {
         GameInformation.Player4Experience += XP;
         if (GameInformation.Player4Experience >= GameInformation.Player4Required)
         {
             //Level Up Function
         }
     }
 }
コード例 #6
0
    private static void CheckIfPlayerLeveled()
    {
        bool tempBool = true;

        while (tempBool == true)
        {
            if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
            {
                int temp = GameInformation.CurrentXP - GameInformation.RequiredXP; //Get spare xp

                GameInformation.PlayerLevel++;                                     //Increase player level by one
                //GameInformation.RequiredXP += 50; //Increase the requiredXP amount
                levelUpScript.LevelUpCharacter();
                GameInformation.CurrentXP = 0;                 //Reset CurrentXP to 0

                if (temp > 0)
                {
                    GameInformation.CurrentXP += temp;                     //Add any additional XP gained.
                }
            }
            else
            {
                tempBool = false;
            }
        }
    }
コード例 #7
0
    //public static void AddExplorationExperience()
    //{
    //exploration xp???
    //work in progress
    //}

    //public static void LoseExperience()
    //{
    //lose xp from losing a fight
    //making wrong decision?
    //not to reduce level
    //}


    /**************************CheckLevelUp*************************************
     * In:
     * Out:
     * Purpose: Checks to see if the player leveled up after awarding XP
     * **************************************************************************/
    private static void CheckLevelUp()
    {
        if (GameInfoManager.CurrentXP >= GameInfoManager.RequiredXP)
        {
            //level up
            levelUp.LevelUpCharacter();
        }
    }
コード例 #8
0
ファイル: HeroStats.cs プロジェクト: YoungKrug/RPG-Game
 private void Update()
 {
     if (GameInformation.CurrentXp > GameInformation.RequiredXP)
     {
         LevelUp level = new LevelUp();
         level.LevelUpCharacter();
     }
 }
コード例 #9
0
ファイル: IncreaseExperience.cs プロジェクト: steerpike/RPG
 private static void CheckLevelIncrease()
 {
     if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
     {
         //Level up player
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #10
0
 private static void CheckToSeeIfPlayerLeveled()
 {
     while (GameInformation.PlayerCurrentExp >= GameInformation.PlayerRequriredExp)
     {
         //level up the player
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #11
0
ファイル: IncreaseExperience.cs プロジェクト: DWRelive/Colab
 private static void CheckIfPlayerLeveled()                         //check players current level and if it increased
 {
     if (GameInformation.CurrentExp >= GameInformation.RequiredExp) //Character level up
     {
         //Level Up Script
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #12
0
 private static void CheckIfLeveled()
 {
     if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
     {
         // player has leveled up
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #13
0
 private static void CheckToSeeIfPlayerLeveled()
 {
     if (GameInformation.CurrentEXP >= GameInformation.RequiredEXP)
     {
         // Player has leveled up
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #14
0
 private static void CheckIfLevelUp()
 {
     if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
     {
         //player levelled up
         //TODO: create level up script
         levelUpScript.LevelUpCharacter();
     }
 }
コード例 #15
0
 private static void CheckToSeeIfPlayerLeveled()
 {
     if (GameInformation.CurrentXP >= GameInformation.RequiredXP)
     {
         //then the player leveled up
         levelUpScript.LevelUpCharacter();
         //CREATE level up script
     }
 }
コード例 #16
0
    private static void CheckToSeeIfPlayerLeveled()
    {
        if (GameInformation.CurrentXp >= GameInformation.RequiredXP)
        {
            //LVL UP
            levelUpScript.LevelUpCharacter();

            //Create a lvl up script
        }
    }
コード例 #17
0
 private static void CheckIfPlayerLeveledUp()
 {
     for (int i = 0; i < BattleStateMachine.HeroesManaging.Length; i++)
     {
         if (BattleStateMachine.HeroesManaging[i].GetComponent <HeroStateMachine>().playerStats.CurExp >=
             BattleStateMachine.HeroesManaging[i].GetComponent <HeroStateMachine>().playerStats.RequiredExp)
         {
             //for (int j = 0; j < BattleStateMachine.HeroesManaging[i].GetComponent<HeroStateMachine>().playerStats.CurExp/ BattleStateMachine.HeroesManaging[i].GetComponent<HeroStateMachine>().playerStats.RequiredExp; j++)
             LevelUpScript.LevelUpCharacter(i);
         }
     }
 }
コード例 #18
0
    //Send the iD of the completed Quest
    /// <summary>
    ///ID has to be 1 or greater
    /// </summary>
    /// <param name="iD"></param>
    /// <returns></returns>
    public override void CompleteQuest(int iD)
    {
        FetchQuest fetchQuest = new FetchQuest();

        fetchQuest = (FetchQuest)quest[iD - 1];
        fetchQuest.isQuestComplete = true;
        GameInformation.CurrentXp += GetXPReward(iD);
        if (GameInformation.CurrentXp > GameInformation.RequiredXP)
        {
            LevelUp level = new LevelUp();
            level.LevelUpCharacter();
        }
        GameInformation.Gold += GetGoldReward(iD);
    }