Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
4c419bf2
E
et
项目概览
guo450212436
/
et
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
et
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4c419bf2
编写于
4月 30, 2015
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复转成json的错误
上级
acc65280
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
6 deletion
+20
-6
CSharp/App/Editor/app.config
CSharp/App/Editor/app.config
+1
-1
CSharp/App/Modules/BehaviorTreeModule/AllTreeViewModel.cs
CSharp/App/Modules/BehaviorTreeModule/AllTreeViewModel.cs
+19
-5
未找到文件。
CSharp/App/Editor/app.config
浏览文件 @
4c419bf2
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<
add
key
=
"Port"
value
=
"8888"
/>
<
add
key
=
"Port"
value
=
"8888"
/>
<
add
key
=
"Account"
value
=
"egametang@163.com"
/>
<
add
key
=
"Account"
value
=
"egametang@163.com"
/>
<
add
key
=
"Password"
value
=
"163bio1"
/>
<
add
key
=
"Password"
value
=
"163bio1"
/>
<
add
key
=
"NodePath"
value
=
"D:\Source\
Demo\battledemo\Assets\Resources\Config\node.bytes
"
/>
<
add
key
=
"NodePath"
value
=
"D:\Source\
SLOL\Program\Unity\Assets\Resources\Config\NodeProto.txt
"
/>
<
add
key
=
"ClientSettingsProvider.ServiceUri"
value
=
""
/>
<
add
key
=
"ClientSettingsProvider.ServiceUri"
value
=
""
/>
</
appSettings
>
</
appSettings
>
<
system
.
serviceModel
>
<
system
.
serviceModel
>
...
...
CSharp/App/Modules/BehaviorTreeModule/AllTreeViewModel.cs
浏览文件 @
4c419bf2
using
System.Collections.Generic
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Collections.ObjectModel
;
using
System.ComponentModel.Composition
;
using
System.ComponentModel.Composition
;
using
System.IO
;
using
System.IO
;
...
@@ -33,8 +34,17 @@ namespace Modules.BehaviorTreeModule
...
@@ -33,8 +34,17 @@ namespace Modules.BehaviorTreeModule
var
treeDict
=
new
Dictionary
<
int
,
List
<
TreeNodeData
>>();
var
treeDict
=
new
Dictionary
<
int
,
List
<
TreeNodeData
>>();
AllTreeData
allTreeData
=
new
AllTreeData
();
string
content
=
File
.
ReadAllText
(
file
);
string
content
=
File
.
ReadAllText
(
file
);
AllTreeData
allTreeData
=
MongoHelper
.
FromJson
<
AllTreeData
>(
content
);
foreach
(
string
line
in
content
.
Split
(
new
[]
{
"\r\n"
},
StringSplitOptions
.
None
))
{
if
(
line
.
Trim
()
==
""
)
{
continue
;
}
TreeNodeData
treeNodeData
=
MongoHelper
.
FromJson
<
TreeNodeData
>(
line
);
allTreeData
.
TreeNodeDatas
.
Add
(
treeNodeData
);
}
this
.
MaxNodeId
=
0
;
this
.
MaxNodeId
=
0
;
this
.
MaxTreeId
=
0
;
this
.
MaxTreeId
=
0
;
...
@@ -71,14 +81,18 @@ namespace Modules.BehaviorTreeModule
...
@@ -71,14 +81,18 @@ namespace Modules.BehaviorTreeModule
AllTreeData
allTreeData
=
new
AllTreeData
();
AllTreeData
allTreeData
=
new
AllTreeData
();
foreach
(
TreeViewModel
value
in
this
.
treeViewModelsDict
.
Values
)
foreach
(
TreeViewModel
value
in
this
.
treeViewModelsDict
.
Values
)
{
{
List
<
TreeNodeData
>
list
=
value
.
GetDatas
();
//
List
<
TreeNodeData
>
list
=
value
.
GetDatas
();
allTreeData
.
TreeNodeDatas
.
AddRange
(
list
);
allTreeData
.
TreeNodeDatas
.
AddRange
(
list
);
}
}
using
(
StreamWriter
stream
=
new
StreamWriter
(
new
FileStream
(
file
,
FileMode
.
Create
,
FileAccess
.
Write
)))
using
(
StreamWriter
stream
=
new
StreamWriter
(
new
FileStream
(
file
,
FileMode
.
Create
,
FileAccess
.
Write
)))
{
{
string
content
=
MongoHelper
.
ToJson
(
allTreeData
);
foreach
(
TreeNodeData
treeNodeData
in
allTreeData
.
TreeNodeDatas
)
stream
.
Write
(
content
);
{
string
content
=
MongoHelper
.
ToJson
(
treeNodeData
);
stream
.
Write
(
content
);
stream
.
Write
(
"\r\n"
);
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录