AddExperience() public method

public AddExperience ( int amountToAdd ) : void
amountToAdd int
return void
示例#1
0
 protected void GainExperience()
 {
     if (skillExperience != null)
     {
         skillExperience.AddExperience(experiencePerSuccessfulUsage);
     }
 }
示例#2
0
        public void CopyExperience()
        {
            Condition[] conditions = SetupConditions();

            Experience teacher = new Experience();
            Experience student = new Experience();

            Activity victory   = new Activity("Victory", null);
            Activity defeat    = new Activity("Defeat", null);
            Activity stalemate = new Activity("Stalemate", null);

            Condition[] victorySituation = new Condition[] { conditions[0], conditions[2], conditions[4] };
            teacher.AddSuccessfulExperience(victory, victorySituation);

            Condition[] defeatSituation = new Condition[] { conditions[1], conditions[3], conditions[5] };
            teacher.AddFailedExperience(defeat, defeatSituation);

            Condition[] otherSituation = new Condition[] { conditions[6], conditions[7], conditions[8] };
            teacher.AddExperience(stalemate, otherSituation);

            string teacherStatus = teacher.ToString();

            teacher.CopyRecentExperienceTo(student);

            string studentStatus = student.ToString();

            Assert.IsTrue(teacherStatus.Equals(studentStatus));
        }
示例#3
0
    private void DisplayWonFightPopup()
    {
        EnableChallenge();

        challengeDescription.text = tempChallenge.ChallengeSuccessDescription + "\n\nYou are awarded " + tempChallenge.ExperienceReward + " XP, " + tempChallenge.ItemReward.ItemName + ", and " + tempChallenge.MoneyReward + " dollars!";
        Experience.AddExperience();
        UpdateExperienceBar();

        DisableChallengeButtons();

        Invoke("DisablePopups", 6f);
    }
示例#4
0
文件: Boss.cs 项目: rubennaatje/Arpg
 void Die()
 {
     if (health <= 0)
     {
         health = 0;
         if (!hasAddedXP)
         {
             Experience.AddExperience();
             hasAddedXP = true;
         }
         ui.BossDieUI();
         Destroy(gameObject);
     }
 }
示例#5
0
    public void CompleteChallengeAndReward()
    {
        DisableChallengeButtons();

        tempChallenge.CheckSkill();
        tempChallenge.Complete();
        tempChallenge.Reward();

        challengeDescription.text = tempChallenge.ChallengeSuccessDescription + "\n\nYou are awarded " + tempChallenge.ExperienceReward + " XP, " + tempChallenge.ItemReward.ItemName + ", and " + tempChallenge.MoneyReward + " dollars!";
        Experience.AddExperience();
        UpdateExperienceBar();

        Invoke("DisablePopups", 6f);
    }
示例#6
0
    public void CompleteOpportunityAndReward()
    {
        DisableOpportunityButtons();

        tempOpportunity.CheckSkill();
        tempOpportunity.Complete();
        tempOpportunity.Reward();

        opportunityDescription.text = tempOpportunity.OpportunitySuccessDescription + "\n\nYou are awarded " + tempOpportunity.ExperienceReward + " XP, " + tempOpportunity.ItemReward.ItemName + ", and " + tempOpportunity.MoneyReward + " dollars!";
        Experience.AddExperience();
        UpdateExperienceBar();

        Invoke("DisablePopups", 6f);
    }
示例#7
0
 protected void GainExperience()
 {
     experience.AddExperience(experienceForSuccessfulUsage);
 }