Exemple #1
0
 void CountEffect(float time)
 {
     if (GameManager.instance.selectedObject)
     {
         skill      = GameManager.instance.selectedObject.GetComponent <CharacterData> ().SkillsList.Find(i => i.name == GetComponent <Activity> ().usedSkill);
         min        = (skill.currentLvl / 10f + 2) * time;
         max        = (skill.currentLvl / 10f + 3) * time;
         difference = (max - min) / 2 + 1;
     }
 }
 void CountEffect(float time)
 {
     if (GameManager.instance.selectedObject)
     {
         CharacterData.SkillStruct skill = GameManager.instance.selectedObject.GetComponent <CharacterData>().SkillsList.Find(i => i.name == GetComponent <Activity>().usedSkill);
         float totalCompletionTime       = (difficulty - skill.currentLvl) / 2f + 4;
         completionProgress = currentCompletionProgress + Mathf.RoundToInt(time / totalCompletionTime * 100);
         if (completionProgress > 100)
         {
             completionProgress = 100;
         }
     }
 }