Unity客户端架构-BaseDialog

来源:互联网 发布:数控机床模拟仿真软件 编辑:程序博客网 时间:2024/06/06 01:06
using UnityEngine;using System;public class BaseDialog {    private string name;    private UILabel title;    private UILabel prompt;    private GameObject container;    protected DialogType _type;    public string Name    {        get        {            return this.name;        }        set         {            this.name = value;        }    }    public DialogType type    {        get        {            return this._type;        }        set        {            this._type = value;        }    }    public GameObject Container    {        get        {            return this.container;        }        set        {            this.container = value;        }    }    public void InitDialog(GameObject _container)    {        GameObject topobj = Util.Child(_container, "TopName");        if (topobj != null)        {            this.prompt = topobj.GetComponent<UILabel>();        }    }    protected void Open(GameObject container, string data)    {        this.container = container;        this.InitDialog(container);        if (!data.Equals(string.Empty) && this.title != null)        {            this.title.text = data;        }    }    protected void Close()    {    }}
0 0
原创粉丝点击