Beispiel #1
0
        /// <summary>
        /// 装载数据
        /// </summary>
        public void LoadData()
        {
            // 装载玩家属性

            /*
             * L_Data root = L_DataPool.Instance.CreatChildData("Root","Root");
             *
             * L_Data test1 = root.CreatChildData("Test1","Test1");
             * test1.CreatChildData("Child1",(int)1001);
             * test1.CreatChildData("Child2",(float)1.002);
             * L_Data test2 = root.CreatChildData("Test2","Test2");
             * test2.CreatChildData("Child3",(uint)1003);
             * test2.CreatChildData("Child4",(bool)false);
             * L_Data test3 = root.CreatChildData("Test3","Test3");
             * test3.CreatChildData("Child5",'c');
             * test3.CreatChildData("Child6",(byte)255);
             *
             * XmlTool.SaveData<L_Data>(root,"Assets/test.xml");
             *
             * XmlTool.LoadData<L_Data>(ref root,"Assets/test.xml");
             * XmlTool.SaveData<L_Data>(root,"Assets/test1.xml");
             */

            L_Data root = L_DataPool.Instance.CreatChildData("Root", "Root");

            root = CSVTool.LoadCsv <L_Data>(root, "Test");
        }
Beispiel #2
0
 void Awake()
 {
     rootData       = new L_Data();
     rootData.Value = "DataRoot";
     rootData.Key   = "DataRoot";
 }
Beispiel #3
0
        /// <summary>
        /// 开始多人游戏(查找)
        /// </summary>
        /// <param name="args"></param>
        void OnMultiplayer(params object[] args)
        {
            L_Data data = MenuData.CreatChildData("PlayType", "Mulitiplayer");

            L_Root.ChangeState(GameState.GS_Play);
        }
Beispiel #4
0
        /// <summary>
        /// 开始双人游戏
        /// </summary>
        /// <param name="args"></param>
        void OnTwoPlay(params object[] args)
        {
            L_Data data = MenuData.CreatChildData("PlayType", "TowPlayers");

            L_Root.ChangeState(GameState.GS_Play);
        }