Ejemplo n.º 1
0
 public override void Awake()
 {
     int    x = Config.ScreenWidth / 2 - 10; int y = Config.ScreenHeight * 7 / 10;
     var    l = UIFactroy.CreateLabel(new Vector2(x - 4, y + 2), "使用鼠标或键盘,选择要进入的游戏场景");
     Button a = UIFactroy.CreateButton(new Vector2(x, y + 1), "[1.盒子射击demo]", StartGameTPS);
     Button b = UIFactroy.CreateButton(new Vector2(x, y), "[2.战棋寻路Demo]", StartGameSRPG);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 创建一个测试用字符串
        /// </summary>
        public static Renderer CreateTestLable(Vector2 pos)
        {
            string   str      = "欢迎使用DestroyEngine";
            int      length   = CharUtils.GetStringWidth(str);
            Renderer renderer = UIFactroy.CreateLabel(pos, "", length / 2 + 1);

            renderer.Rendering(str, Color.Cyan, Color.Blue);
            return(renderer);
        }
Ejemplo n.º 3
0
        public override void Start()
        {
            UIFactroy.CreateLabel(new Vector2Int(7, 10), "jkl今天天气真不错", 5);
            TextBox textBox = UIFactroy.CreateTextBox(new Vector2Int(3, -7), 10, 10);

            textBox.SetText("TransForm", 1);
            textBox.SetText("TransForm124556", 3);
            textBox.Labels[2].GetComponent <Renderer>().Material = new Material(EngineColor.Green, EngineColor.Yellow);
        }