예제 #1
0
    void Start()
    {
        s_avatar      = transform.Find("Avatar").GetComponent <UISprite>();
        s_button      = transform.Find("Button").GetComponent <UISprite>();
        l_description = transform.Find("Description").GetComponent <UILabel>();
        l_button      = transform.Find("L_Button").GetComponent <UILabel>();
        s_selected    = transform.Find("Selected").GetComponent <UISprite>();
        if (!selected)
        {
            s_selected.enabled = false;
        }
        M_Mob mob = prefab.GetComponent <M_Mob>();

        l_description.text = "'" + mob.eDescription + "'";
        if (locked)
        {
            s_button.spriteName = "ui_mobselect_locked";
            l_button.text       = "[FFFFFF]Unlock at $level [00FE21]" + unlocksAt;
        }
        else if (bought)
        {
            s_button.spriteName = "ui_mobselect_talent";
            l_button.text       = "[FFFFFF]Talents";
        }
        else
        {
            l_button.text = "Buy $gold" + mob.goldCost;
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     monster = GetComponent <M_Mob>();
     mobAI   = GetComponent <EntityAI>();
     initialize();
 }