Exemplo 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);
 }
Exemplo n.º 2
0
        public override void Awake()
        {
            //这个类是单例且不会随场景销毁的
            Instance = this;

            helpTextBox = UIFactroy.CreateTextBox(new Vector2(Config.ScreenWidth - 12, 0), 5, 10);
            helpTextBox.GameObject.Parent = GameObject;
            var drawing = UIFactroy.CreateBoxDrawingRect(new Vector2(Config.ScreenWidth - 12, 6), 1, 10);

            drawing.Parent = GameObject;
            returnBtn      = UIFactroy.CreateButton(new Vector2(Config.ScreenWidth - 11, 7), "回到主界面", Return, 10);
            returnBtn.GameObject.Parent = GameObject;

            InitText();

            SceneManager.DontDestroyOnLoad(GameObject);
        }
Exemplo n.º 3
0
        public override void OnStart()
        {
            UIFactroy.CreateButton(new Vector2(20, 23), "开始教学关卡",
                                   () => { GameMode.Instance.Init(); LoadScene(); });
            UIFactroy.CreateButton(new Vector2(20, 22), "开始关卡简单(0)",
                                   () => { GameMode.Instance.InitGame(0); LoadScene(); });
            UIFactroy.CreateButton(new Vector2(20, 21), "开始关卡中等(5)",
                                   () => { GameMode.Instance.InitGame(5); LoadScene(); });
            UIFactroy.CreateButton(new Vector2(20, 20), "开始关卡理论极限(10)",
                                   () => { GameMode.Instance.InitGame(10); LoadScene(); });
            UIFactroy.CreateButton(new Vector2(20, 19), "开始关卡测试用(100)",
                                   () => { GameMode.Instance.InitGame(100); LoadScene(); });



            var text = Utils.CreateTextAera(20, 3, true);

            text.Position = new Vector2(10, 14);
            text.Rendering("欢迎来到本游戏,本游戏目前只有一个试玩关卡. 建议游玩简单或者中等难度,后面两个仅供测试用(大概是过不了关的)");

            text          = Utils.CreateTextAera(20, 5, true);
            text.Position = new Vector2(10, 8);
            text.Rendering("操作说明,鼠标指向为治疗目标,123为单体治疗技能,45为群体治疗技能。(推荐多用134技能,应急使用25技能,并注意自己的蓝条不要oom)");
        }