コード例 #1
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);

        }
    }
コード例 #2
0
    void createToolTip(Rect r, LevelUpSystem.ActiveSpell skill)
    {
        if(r.Contains (Event.current.mousePosition))
        {
            GUI.color = Color.yellow;
            GUI.Box (new Rect(156, 120,200,130), "");
            GUI.Box (new Rect(156, 120,200,130), skill.name+" (lvl "+skill.level+")", skillTitleTextStyle);
            GUI.color = Color.white;
            GUI.Box (new Rect(156, 120,200,130), "\n\n"+skill.getInfo(), skillDescriptionTextStyle);
            GUI.Box (new Rect(156, 120,200,130), "\n\n\n\n\n"+skill.getDescription(), skillDescriptionTextStyle);

        }
    }