예제 #1
0
 static void Main(string[] args)
 {
     LogSystem.Init("./config/logconfig.xml");
     LogSystem.Log(2, "{0}", "just for test!");
     LogSystem.Log(1, "{0}", "just for test!");
     LogSystem.Log(0, "{0}", "just for test!");
 }
예제 #2
0
    void Awake()
    {
        // 添加UI管理器
        //       GameObject.Find("UI Root/Camera").AddComponent<UIManager>();
        AddComponent("UIManager");

        // 计时器
        AddComponent("TimerManager");

        // 平台管理器
        AddComponent("PlatformManager");

        // 游戏控制
        AddComponent("Game");

        // 场景管理器
        AddComponent("SceneManager");

        // 提示管理器
        AddComponent("PromptManager");

        // 本地存储管理器
        AddComponent("RestoreManager");

        // 等待界面管理器
        //AddComponent("WaitingManager");

        // 对象池
        AddComponent("GameObjectManager");

        // 主角控制管理器
        AddComponent("RoleControllerManager");

        // 战斗管理器
        AddComponent("FightManager");

        // 相机动画控制器
        AddComponent("RoleCameraManager");

        // 初始化日志系统
        LogSystem.Init("Log.txt", false, true);
    }
예제 #3
0
 private void InitLogSystem()
 {
     try
     {
         string strLogFile = string.Empty;
         strLogFile          = Application.persistentDataPath;
         Screen.sleepTimeout = -1;
         strLogFile          = Application.persistentDataPath + "/System.Log";
         Screen.sleepTimeout = -1;
         LogSystem.Init(strLogFile, true, false, 256);
     }
     catch (Exception ex)
     {
         LogSystem.LogError(new object[]
         {
             "RunLogSystem",
             ex.ToString()
         });
     }
 }