private void UpdateStatusSummary() { foreach (KeyValuePair <string, int> bonus in dicBonus) { string id = bonus.Key; int value = bonus.Value; switch (id) { case INST_Math_Id: _hardSkillsController.IncreaseEXP(id, value); _mathHardSkilGenerator.CreateTemplate(value.ToString()); break; case INST_Programming_Id: _hardSkillsController.IncreaseEXP(id, value); _programmingHardSkillGenerator.CreateTemplate(value.ToString()); break; case INST_Engine_Id: _hardSkillsController.IncreaseEXP(id, value); _engineHardSkillGenerator.CreateTemplate(value.ToString()); break; case INST_Ai_Id: _hardSkillsController.IncreaseEXP(id, value); _aiHardSkillGenerator.CreateTemplate(value.ToString()); break; case INST_Network_Id: _hardSkillsController.IncreaseEXP(id, value); _networkHardSkillGenerator.CreateTemplate(value.ToString()); break; case INST_Design_Id: _hardSkillsController.IncreaseEXP(id, value); _designHardSillGenerator.CreateTemplate(value.ToString()); break; case INST_Testing_Id: _hardSkillsController.IncreaseEXP(id, value); _testingHardSillGenerator.CreateTemplate(value.ToString()); break; case INST_Art_Id: _hardSkillsController.IncreaseEXP(id, value); _artHardSillGenerator.CreateTemplate(value.ToString()); break; case INST_Sound_Id: _hardSkillsController.IncreaseEXP(id, value); _soundHardSillGenerator.CreateTemplate(value.ToString()); break; case INST_Coding_Status: _characterStatusController.IncreaseCodingStatus(value); _codingStatusGenerator.CreateTemplate(value.ToString()); break; case INST_Design_Status: _characterStatusController.IncreaseDesignStatus(value); _designStatusGenerator.CreateTemplate(value.ToString()); break; case INST_Testing_Status: _characterStatusController.IncreaseTestingStatus(value); _testingStatusGenerator.CreateTemplate(value.ToString()); break; case INST_Art_Status: _characterStatusController.IncreaseArtStatus(value); _artStatusGenerator.CreateTemplate(value.ToString()); break; case INST_Sound_Status: _characterStatusController.IncreaseSoundStatus(value); _soundStatusGenerator.CreateTemplate(value.ToString()); break; } } _characterStatusController.IncreaseEXP(exp * times * numCourseTag); }
private void UpdateProjectStatusSummary() { float motivation = characterStatusController.GetEfficiencyToDo(); float minigame = projectController.MiniGameBonusEfficiency; float skill = playerAction.GetTotalBonusBootupProjectByTime(); float sumEfficiency = motivation + minigame + skill; int rnd = Random.Range(0, 5); int status = 0; switch (rnd) { case 0: status = CalculateCodingStatus(sumEfficiency); projectController.IncreaseCodingStatus(status); if (status > 0) { codingStatusGenerator.CreateTemplate(status.ToString()); } break; case 1: status = CalculateDesignStatus(sumEfficiency); projectController.IncreaseDesignStatus(status); if (status > 0) { designStatusGenerator.CreateTemplate(status.ToString()); } break; case 2: status = CalculateTestingStatus(sumEfficiency); projectController.IncreaseTestingStatus(status); if (status > 0) { testingStatusGenerator.CreateTemplate(status.ToString()); } break; case 3: status = CalculateArtStatus(sumEfficiency); projectController.IncreaseArtStatus(status); if (status > 0) { artStatusGenerator.CreateTemplate(status.ToString()); } break; case 4: status = CalculateSoundStatus(sumEfficiency); projectController.IncreaseSoundStatus(status); if (status > 0) { soundStatusGenerator.CreateTemplate(status.ToString()); } break; } int exp = CalExp(sumEfficiency); characterStatusController.IncreaseEXP(exp); expGenerator.CreateTemplate(string.Format("+ {0}", exp.ToString())); }
public void UseItem() { List <ItemPropertyAmount> properties = new List <ItemPropertyAmount>(); properties = itemDefinition.ItemProperties; int count = properties.Count; if (count > 0) { for (int i = 0; i < count; i++) { ItemPropertyType type = properties[i].PropertyType; float value = properties[i].Amount; switch (type) { case ItemPropertyType.Energy: characterStatusController.IncreaseCurrentEnergy(value); break; case ItemPropertyType.Motivation: characterStatusController.IncreaseCurrentMotivation(value); break; case ItemPropertyType.StatusPoint: characterStatusController.IncreaseStatusPoints((int)value); break; case ItemPropertyType.SoftSkillPoint: characterStatusController.IncreaseSoftSkillPoints((int)value); break; case ItemPropertyType.CharacterExp: characterStatusController.IncreaseEXP((int)value); break; case ItemPropertyType.HSMathExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Math_Id, (int)value); break; case ItemPropertyType.HSProgramingExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Programming_Id, (int)value); break; case ItemPropertyType.HSEngineExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Engine_Id, (int)value); break; case ItemPropertyType.HSNetworkExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Network_Id, (int)value); break; case ItemPropertyType.HSAiExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Ai_Id, (int)value); break; case ItemPropertyType.HSDesignExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Design_Id, (int)value); break; case ItemPropertyType.HSTesting: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Testing_Id, (int)value); break; case ItemPropertyType.HSArtExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Art_Id, (int)value); break; case ItemPropertyType.HSSoundExp: hardSkillsController.IncreaseEXP(hardSkillsController.INST_Sound_Id, (int)value); break; } } } DestroyItemPickUp(); }