Пример #1
0
    virtual public void Set(p3PregameTreeInfo t)
    {
        if (t == null)
        {
            treeName.text = "";
            ac.text       = "";
            info          = null;
            return;
        }
        info = t;
        var k = t.realTree.type;

        switch (k)
        {
        case TreeType.Basic:
        case TreeType.BonusAc:
        case TreeType.Ethereal:
        case TreeType.Monumental:
        case TreeType.Swamp:
            treeName.text = k.ToString() + " Tree";
            ac.text       = "AC: " + t.realTree.plantCost;
            break;

        case TreeType.Stone:
            treeName.text = k.ToString();
            ac.text       = "";
            break;

        default:
            throw new UnityException("Invalid tree type = " + k);
        }
    }
Пример #2
0
 override public void Set(p3PregameTreeInfo t)
 {
     base.Set(t);
     if (t == null)
     {
         toggle.interactable = false;
         return;
     }
 }