protected void GainExperience() { if (skillExperience != null) { skillExperience.AddExperience(experiencePerSuccessfulUsage); } }
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)); }
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); }
void Die() { if (health <= 0) { health = 0; if (!hasAddedXP) { Experience.AddExperience(); hasAddedXP = true; } ui.BossDieUI(); Destroy(gameObject); } }
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); }
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); }
protected void GainExperience() { experience.AddExperience(experienceForSuccessfulUsage); }