Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
c3f58e74
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,发现更多精彩内容 >>
提交
c3f58e74
编写于
5月 15, 2015
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.enet更新版本
2.行为树编辑器增加设定路径功能
上级
4a2b7a7a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
41 addition
and
40 deletion
+41
-40
CSharp/App/Editor/app.config
CSharp/App/Editor/app.config
+1
-29
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml
+1
-0
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
+23
-2
CSharp/Platform/ENet/enet/enet.h
CSharp/Platform/ENet/enet/enet.h
+2
-2
CSharp/Platform/ENet/host.c
CSharp/Platform/ENet/host.c
+1
-1
CSharp/Platform/ENet/protocol.c
CSharp/Platform/ENet/protocol.c
+8
-2
CSharp/Platform/ENet/unix.c
CSharp/Platform/ENet/unix.c
+3
-3
CSharp/Platform/ENet/win32.c
CSharp/Platform/ENet/win32.c
+2
-1
未找到文件。
CSharp/App/Editor/app.config
浏览文件 @
c3f58e74
...
...
@@ -32,34 +32,6 @@
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.5.1"
/>
</
startup
>
<
appSettings
>
<
add
key
=
"IP"
value
=
"192.168.11.95"
/>
<
add
key
=
"Port"
value
=
"8888"
/>
<
add
key
=
"Account"
value
=
"egametang@163.com"
/>
<
add
key
=
"Password"
value
=
"163bio1"
/>
<
add
key
=
"NodePath"
value
=
"D:\Source\SLOL\Program\Unity\Assets\Resources\Config\TreeProto.txt"
/>
<
add
key
=
"ClientSettingsProvider.ServiceUri"
value
=
""
/>
<
add
key
=
"NodePath"
value
=
"D:\Source\SLOL\Program\Unity\Assets\Resources\Config\"
/>
</
appSettings
>
<
system
.
serviceModel
>
<
bindings
>
<
netTcpBinding
>
<
binding
name
=
"NetTcpBinding_Calculator"
/>
</
netTcpBinding
>
</
bindings
>
<
client
>
<
endpoint
address
=
"net.tcp://localhost:10000/Calculator/"
binding
=
"netTcpBinding"
bindingConfiguration
=
"NetTcpBinding_Calculator"
contract
=
"Proxy.Calculator"
name
=
"NetTcpBinding_Calculator"
>
</
endpoint
>
</
client
>
</
system
.
serviceModel
>
<
system
.
web
>
<
membership
defaultProvider
=
"ClientAuthenticationMembershipProvider"
>
<
providers
>
<
add
name
=
"ClientAuthenticationMembershipProvider"
type
=
"System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri
=
""
/>
</
providers
>
</
membership
>
<
roleManager
defaultProvider
=
"ClientRoleProvider"
enabled
=
"true"
>
<
providers
>
<
add
name
=
"ClientRoleProvider"
type
=
"System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri
=
""
cacheTimeout
=
"86400"
/>
</
providers
>
</
roleManager
>
</
system
.
web
>
</
configuration
>
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml
浏览文件 @
c3f58e74
...
...
@@ -28,6 +28,7 @@
<MenuItem Header="新建" Click="MenuItem_New" />
<MenuItem Header="删除" Click="MenuItem_Remove" />
<MenuItem Header="克隆" Click="MenuItem_Clone" />
<MenuItem Header="路径" Click="MenuItem_Path" />
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.ItemTemplate>
...
...
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
浏览文件 @
c3f58e74
using
System.ComponentModel.Composition
;
using
System.Configuration
;
using
System.IO
;
using
System.Windows
;
using
System.Windows.Forms
;
using
System.Windows.Input
;
using
Infrastructure
;
using
Application
=
System
.
Windows
.
Application
;
namespace
Modules.BehaviorTreeModule
{
...
...
@@ -35,7 +38,7 @@ namespace Modules.BehaviorTreeModule
private
void
MenuItem_Open
(
object
sender
,
RoutedEventArgs
e
)
{
string
nodePath
=
ConfigurationManager
.
AppSettings
[
"NodePath"
]
;
string
nodePath
=
Path
.
Combine
(
ConfigurationManager
.
AppSettings
[
"NodePath"
],
"TreeProto.txt"
)
;
this
.
ViewModel
.
Open
(
nodePath
);
this
.
lbTrees
.
SelectedIndex
=
-
1
;
this
.
treeView
.
ViewModel
=
null
;
...
...
@@ -43,7 +46,7 @@ namespace Modules.BehaviorTreeModule
private
void
MenuItem_Save
(
object
sender
,
RoutedEventArgs
e
)
{
string
nodePath
=
ConfigurationManager
.
AppSettings
[
"NodePath"
]
;
string
nodePath
=
Path
.
Combine
(
ConfigurationManager
.
AppSettings
[
"NodePath"
],
"TreeProto.txt"
)
;
this
.
ViewModel
.
Save
(
nodePath
);
}
...
...
@@ -65,6 +68,24 @@ namespace Modules.BehaviorTreeModule
this
.
treeView
.
ViewModel
=
newTreeViewModel
;
}
private
void
MenuItem_Path
(
object
sender
,
RoutedEventArgs
e
)
{
FolderBrowserDialog
dialog
=
new
FolderBrowserDialog
();
dialog
.
SelectedPath
=
ConfigurationManager
.
AppSettings
[
"NodePath"
];
dialog
.
ShowDialog
();
string
path
=
dialog
.
SelectedPath
;
if
(
path
.
Length
<
1
||
!
Directory
.
Exists
(
path
))
{
System
.
Windows
.
MessageBox
.
Show
(
"选择的目录无效"
);
return
;
}
Configuration
cfg
=
ConfigurationManager
.
OpenExeConfiguration
(
ConfigurationUserLevel
.
None
);
cfg
.
AppSettings
.
Settings
[
"NodePath"
].
Value
=
path
;
cfg
.
Save
();
ConfigurationManager
.
AppSettings
[
"NodePath"
]
=
path
;
Application
.
Current
.
MainWindow
.
Title
=
string
.
Format
(
"行为树编辑器 当前工作目录[{0}]"
,
ConfigurationManager
.
AppSettings
[
"NodePath"
]);
}
private
void
MenuItem_Remove
(
object
sender
,
RoutedEventArgs
e
)
{
if
(
this
.
lbTrees
.
SelectedItem
==
null
)
...
...
CSharp/Platform/ENet/enet/enet.h
浏览文件 @
c3f58e74
...
...
@@ -25,7 +25,7 @@ extern "C"
#define ENET_VERSION_MAJOR 1
#define ENET_VERSION_MINOR 3
#define ENET_VERSION_PATCH 1
2
#define ENET_VERSION_PATCH 1
3
#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF)
#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF)
...
...
@@ -208,7 +208,7 @@ enum
ENET_HOST_RECEIVE_BUFFER_SIZE
=
256
*
1024
,
ENET_HOST_SEND_BUFFER_SIZE
=
256
*
1024
,
ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL
=
1000
,
ENET_HOST_DEFAULT_MTU
=
512
,
ENET_HOST_DEFAULT_MTU
=
600
,
ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE
=
32
*
1024
*
1024
,
ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA
=
32
*
1024
*
1024
,
...
...
CSharp/Platform/ENet/host.c
浏览文件 @
c3f58e74
...
...
@@ -102,7 +102,7 @@ enet_host_create (const ENetAddress * address, size_t peerCount, size_t channelL
host
->
duplicatePeers
=
ENET_PROTOCOL_MAXIMUM_PEER_ID
;
host
->
maximumPacketSize
=
ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE
;
host
->
maximumWaitingData
=
ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA
;
host
->
checksum
=
enet_crc32
;
host
->
checksum
=
enet_crc32
;
host
->
compressor
.
context
=
NULL
;
host
->
compressor
.
compress
=
NULL
;
...
...
CSharp/Platform/ENet/protocol.c
浏览文件 @
c3f58e74
...
...
@@ -764,6 +764,10 @@ enet_protocol_handle_bandwidth_limit (ENetHost * host, ENetPeer * peer, const EN
if
(
peer
->
incomingBandwidth
==
0
&&
host
->
outgoingBandwidth
==
0
)
peer
->
windowSize
=
ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE
;
else
if
(
peer
->
incomingBandwidth
==
0
||
host
->
outgoingBandwidth
==
0
)
peer
->
windowSize
=
(
ENET_MAX
(
peer
->
incomingBandwidth
,
host
->
outgoingBandwidth
)
/
ENET_PEER_WINDOW_SIZE_SCALE
)
*
ENET_PROTOCOL_MINIMUM_WINDOW_SIZE
;
else
peer
->
windowSize
=
(
ENET_MIN
(
peer
->
incomingBandwidth
,
host
->
outgoingBandwidth
)
/
ENET_PEER_WINDOW_SIZE_SCALE
)
*
ENET_PROTOCOL_MINIMUM_WINDOW_SIZE
;
...
...
@@ -1191,7 +1195,9 @@ commandError:
static
int
enet_protocol_receive_incoming_commands
(
ENetHost
*
host
,
ENetEvent
*
event
)
{
for
(;;)
int
packets
;
for
(
packets
=
0
;
packets
<
256
;
++
packets
)
{
int
receivedLength
;
ENetBuffer
buffer
;
...
...
@@ -1484,7 +1490,7 @@ enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer)
!
(
outgoingCommand
->
reliableSequenceNumber
%
ENET_PEER_RELIABLE_WINDOW_SIZE
)
&&
(
channel
->
reliableWindows
[(
reliableWindow
+
ENET_PEER_RELIABLE_WINDOWS
-
1
)
%
ENET_PEER_RELIABLE_WINDOWS
]
>=
ENET_PEER_RELIABLE_WINDOW_SIZE
||
channel
->
usedReliableWindows
&
((((
1
<<
ENET_PEER_FREE_RELIABLE_WINDOWS
)
-
1
)
<<
reliableWindow
)
|
(((
1
<<
ENET_PEER_FREE_RELIABLE_WINDOWS
)
-
1
)
>>
(
ENET_PEER_RELIABLE_WINDOW
_SIZE
-
reliableWindow
)))))
(((
1
<<
ENET_PEER_FREE_RELIABLE_WINDOWS
)
-
1
)
>>
(
ENET_PEER_RELIABLE_WINDOW
S
-
reliableWindow
)))))
windowWrap
=
1
;
if
(
windowWrap
)
{
...
...
CSharp/Platform/ENet/unix.c
浏览文件 @
c3f58e74
...
...
@@ -104,7 +104,7 @@ enet_address_set_host (ENetAddress * address, const char * name)
char
buffer
[
2048
];
int
errnum
;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|| defined(__DragonFly__)
gethostbyname_r
(
name
,
&
hostData
,
buffer
,
sizeof
(
buffer
),
&
hostEntry
,
&
errnum
);
#else
hostEntry
=
gethostbyname_r
(
name
,
&
hostData
,
buffer
,
sizeof
(
buffer
),
&
errnum
);
...
...
@@ -162,7 +162,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng
in
.
s_addr
=
address
->
host
;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|| defined(__DragonFly__)
gethostbyaddr_r
((
char
*
)
&
in
,
sizeof
(
struct
in_addr
),
AF_INET
,
&
hostData
,
buffer
,
sizeof
(
buffer
),
&
hostEntry
,
&
errnum
);
#else
hostEntry
=
gethostbyaddr_r
((
char
*
)
&
in
,
sizeof
(
struct
in_addr
),
AF_INET
,
&
hostData
,
buffer
,
sizeof
(
buffer
),
&
errnum
);
...
...
@@ -246,7 +246,7 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
{
case
ENET_SOCKOPT_NONBLOCK
:
#ifdef HAS_FCNTL
result
=
fcntl
(
socket
,
F_SETFL
,
O_NONBLOCK
|
fcntl
(
socket
,
F_GETFL
));
result
=
fcntl
(
socket
,
F_SETFL
,
(
value
?
O_NONBLOCK
:
0
)
|
(
fcntl
(
socket
,
F_GETFL
)
&
~
O_NONBLOCK
));
#else
result
=
ioctl
(
socket
,
FIONBIO
,
&
value
);
#endif
...
...
CSharp/Platform/ENet/win32.c
浏览文件 @
c3f58e74
...
...
@@ -4,9 +4,10 @@
*/
#ifdef _WIN32
#include <time.h>
#define ENET_BUILDING_LIB 1
#include "enet/enet.h"
#include <windows.h>
#include <mmsystem.h>
static
enet_uint32
timeBase
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录