Skip to content

Commit

Permalink
修复了部分在真机不能调试的小BUG.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarjin committed Jul 13, 2015
1 parent c84b127 commit 1ba9aa8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Assets/Editor/Packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static void HandleLuaFile(bool isWin) {
for (int i = 0; i < files.Count; i++) {
string file = files[i];
string ext = Path.GetExtension(file);
if (file.EndsWith(".meta")) continue;
if (file.EndsWith(".meta") || file.Contains(".DS_Store")) continue;

string md5 = Util.md5file(file);
string value = file.Replace(resPath, string.Empty);
Expand Down
6 changes: 3 additions & 3 deletions Assets/Lua/Logic/network.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

require "common/define"
require "common/protocal"
require "common/functions"
require "Common/define"
require "Common/protocal"
require "Common/functions"
Event = require 'events'

Network = {};
Expand Down
6 changes: 5 additions & 1 deletion Assets/Scripts/Controller/Command/StartUpCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
using PureMVC.Interfaces;
using SimpleFramework;
using SimpleFramework.Manager;

#if UNITY_EDITOR
using UnityEditor;
#endif

public class StartUpCommand : MacroCommand {

protected override void InitializeMacroCommand() {
base.InitializeMacroCommand();

#if UNITY_EDITOR
int resultId = Util.CheckRuntimeFile();
if (resultId == -1) {
Debug.LogError("没有找到框架所需要的资源,单击Game菜单下Build xxx Resource生成!!");
Expand All @@ -21,6 +24,7 @@ protected override void InitializeMacroCommand() {
EditorApplication.isPlaying = false;
return;
}
#endif
//BootstrapModels
AddSubCommand(typeof(BootstrapModels));

Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/Manager/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using System.Reflection;
using System.IO;
using ICSharpCode.SharpZipLib.Zip;
using Junfine.Debuger;

#if UNITY_EDITOR
using UnityEditor;
using Junfine.Debuger;
#endif

namespace SimpleFramework.Manager {
Expand Down Expand Up @@ -154,7 +154,7 @@ IEnumerator OnUpdateResource() {
#endif
string random = DateTime.Now.ToString("yyyymmddhhmmss");
string listUrl = url + "files.txt?v=" + random;
Debuger.LogWarning("LoadUpdate---->>>" + listUrl);
Debug.LogWarning("LoadUpdate---->>>" + listUrl);

WWW www = new WWW(listUrl); yield return www;
if (www.error != null) {
Expand Down Expand Up @@ -250,8 +250,8 @@ void OnThreadCompleted(NotiData data) {
/// </summary>
public void OnResourceInited() {
LuaManager.Start();
LuaManager.DoFile("logic/game"); //加载游戏
LuaManager.DoFile("logic/network"); //加载网络
LuaManager.DoFile("Logic/game"); //加载游戏
LuaManager.DoFile("Logic/network"); //加载网络
initialize = true; //初始化完

NetManager.OnInit(); //初始化网络
Expand Down
3 changes: 3 additions & 0 deletions ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
视频教程地址 http://pan.baidu.com/s/1gd8fG4N
游戏案例地址 http://www.ulua.org/showcase.html

//-------------2015-07-11-------------
(1)修复了部分在真机不能直接运行的小BUG.

//-------------2015-07-11-------------
(1)调整Lua层代码结构,实现Ctrl层与View层分离。
(2)更新代码增加线程下载文件,脱离主线程。
Expand Down

0 comments on commit 1ba9aa8

Please sign in to comment.