예제 #1
0
 void addSkillLevelIcon(Rect r, LevelUpSystem.PassiveSpell spell, Texture2D icon)
 {
     GUI.Button(new Rect(r.x + icon.width - 3 - icon_skill_lvl.width + 5,
                         r.y + icon.height - 3 - icon_skill_lvl.height + 4,
                         icon_skill_lvl.width, icon_skill_lvl.height), icon_skill_lvl, spellButtonStyle);
     GUI.Label(new Rect(r.x + 7, r.y + 7, r.width, r.height),
               string.Format("{0}", spell.level), skilllvlTextStyle);
 }
예제 #2
0
 void createToolTip(Rect r, LevelUpSystem.PassiveSpell skill)
 {
     if (r.Contains(Event.current.mousePosition))
     {
         GUI.color = Color.yellow;
         GUI.Box(new Rect(156, 120, 200, 100), "");
         GUI.Box(new Rect(156, 120, 200, 100), skill.name + " (lvl " + skill.level + ")", skillTitleTextStyle);
         GUI.color = Color.white;
         if (skill == lvlSystem.passives[0])
         {
             GUI.Box(new Rect(156, 120, 200, 100), "\n\nAttack Damage: " +
                     player.GetComponent <PlayerAttributes>().atkDamage, skillDescriptionTextStyle);
         }
         else
         {
             GUI.Box(new Rect(156, 120, 200, 100), "\n\nMax. HP: " + maxHealth, skillDescriptionTextStyle);
         }
         GUI.Box(new Rect(156, 120, 200, 100), "\n\n\n\n" + skill.getDescription(), skillDescriptionTextStyle);
     }
 }
예제 #3
0
 void PassiveSpellButton(Rect r, LevelUpSystem.PassiveSpell passive, Texture2D icon, GUIStyle style)
 {
     createToolTip(r, passive);
     GUI.Button(r, icon, style);
     addSkillLevelIcon(r, passive, icon);
 }