public void InitMainScene()
        {
            #region 生成MainScene
            mainScene = new Scene();

            #region GameObject处理
            //背景
            Model.Panel bg = new Model.Panel(48, 40);
            bg.Position = new Vector2(1, 1);

            //logo控制器
            LogoController lc = new LogoController();
            lc.DrawLogo();

            //ai蛇控制器
            AiSnackController ac = new AiSnackController();

            //星空背景控制器
            StarBgController sbc = new StarBgController();

            //按钮初始化
            ButtonController bc = ButtonController.Ins;
            bc.LoadMainSceneBtn();

            mainScene.AddObject(bg);
            mainScene.AddObject(lc);
            mainScene.AddObject(ac);
            mainScene.AddObject(sbc);
            #endregion


            #endregion
        }
Esempio n. 2
0
        public AiSnackController Clone()
        {
            AiSnackController obj = CloneGameObject <AiSnackController>();

            obj.count = count;

            return(obj);
        }