Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
老鱼er
et
提交
04e7c92c
E
et
项目概览
老鱼er
/
et
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
1
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,发现更多精彩内容 >>
提交
04e7c92c
编写于
10月 14, 2014
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
整理代码
上级
9a032f9b
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
181 addition
and
92 deletion
+181
-92
CSharp/App/Modules/BehaviorTreeModule/TreeLayout.cs
CSharp/App/Modules/BehaviorTreeModule/TreeLayout.cs
+6
-3
CSharp/Game/BehaviorTree/BehaviorTreeFactory.cs
CSharp/Game/BehaviorTree/BehaviorTreeFactory.cs
+14
-5
CSharp/Game/BehaviorTree/NodeAttribute.cs
CSharp/Game/BehaviorTree/NodeAttribute.cs
+3
-5
CSharp/Game/BehaviorTree/NodeConfig.cs
CSharp/Game/BehaviorTree/NodeConfig.cs
+1
-1
CSharp/Game/BehaviorTree/NodeType.cs
CSharp/Game/BehaviorTree/NodeType.cs
+1
-1
CSharp/Game/BehaviorTree/Not.cs
CSharp/Game/BehaviorTree/Not.cs
+1
-1
CSharp/Game/BehaviorTree/Selector.cs
CSharp/Game/BehaviorTree/Selector.cs
+1
-1
CSharp/Game/BehaviorTree/Sequence.cs
CSharp/Game/BehaviorTree/Sequence.cs
+1
-1
CSharp/Game/Controller/BuffController.cs
CSharp/Game/Controller/BuffController.cs
+2
-8
CSharp/Game/Controller/Properties/AssemblyInfo.cs
CSharp/Game/Controller/Properties/AssemblyInfo.cs
+5
-2
CSharp/Game/Model/BuffManager.cs
CSharp/Game/Model/BuffManager.cs
+14
-17
CSharp/Game/Model/Character.cs
CSharp/Game/Model/Character.cs
+0
-9
CSharp/Game/Model/GameObject.cs
CSharp/Game/Model/GameObject.cs
+1
-11
CSharp/Game/Model/Model.csproj
CSharp/Game/Model/Model.csproj
+0
-1
CSharp/Game/World/World.cs
CSharp/Game/World/World.cs
+1
-1
CSharp/Platform/Common/Base/Component.cs
CSharp/Platform/Common/Base/Component.cs
+1
-1
CSharp/Platform/Common/Base/Entity.cs
CSharp/Platform/Common/Base/Entity.cs
+6
-16
CSharp/Platform/Common/Base/MultiMap.cs
CSharp/Platform/Common/Base/MultiMap.cs
+112
-0
CSharp/Platform/Common/Common.csproj
CSharp/Platform/Common/Common.csproj
+1
-0
CSharp/Platform/Common/Config/ConfigManager.cs
CSharp/Platform/Common/Config/ConfigManager.cs
+5
-4
CSharp/Platform/Common/Config/ICategory.cs
CSharp/Platform/Common/Config/ICategory.cs
+2
-2
CSharp/Platform/Common/Event/EventTrigger.cs
CSharp/Platform/Common/Event/EventTrigger.cs
+3
-2
未找到文件。
CSharp/App/Modules/BehaviorTreeModule/TreeLayout.cs
浏览文件 @
04e7c92c
...
...
@@ -26,7 +26,8 @@
{
TreeNodeViewModel
child
=
this
.
treeViewModel
.
Get
(
treeNodeViewModel
.
Children
[
i
]);
child
.
AncestorModify
=
treeNodeViewModel
.
Modify
+
treeNodeViewModel
.
AncestorModify
;
TreeNodeViewModel
offspring
=
this
.
LeftMostOffspring
(
child
,
currentLevel
+
1
,
searchLevel
);
TreeNodeViewModel
offspring
=
this
.
LeftMostOffspring
(
child
,
currentLevel
+
1
,
searchLevel
);
if
(
offspring
==
null
)
{
continue
;
...
...
@@ -47,7 +48,8 @@
{
TreeNodeViewModel
child
=
this
.
treeViewModel
.
Get
(
treeNodeViewModel
.
Children
[
i
]);
child
.
AncestorModify
=
treeNodeViewModel
.
Modify
+
treeNodeViewModel
.
AncestorModify
;
TreeNodeViewModel
offspring
=
this
.
RightMostOffspring
(
child
,
currentLevel
+
1
,
searchLevel
);
TreeNodeViewModel
offspring
=
this
.
RightMostOffspring
(
child
,
currentLevel
+
1
,
searchLevel
);
if
(
offspring
==
null
)
{
continue
;
...
...
@@ -66,7 +68,8 @@
right
.
AncestorModify
=
0
;
for
(
int
i
=
0
;
tLeft
!=
null
&&
tRight
!=
null
;
++
i
)
{
double
tGap
=
(
tRight
.
Prelim
+
tRight
.
AncestorModify
)
-
(
tLeft
.
Prelim
+
tLeft
.
AncestorModify
);
double
tGap
=
(
tRight
.
Prelim
+
tRight
.
AncestorModify
)
-
(
tLeft
.
Prelim
+
tLeft
.
AncestorModify
);
if
(
XGap
+
TreeNodeViewModel
.
Width
-
tGap
>
offset
)
{
offset
=
XGap
+
TreeNodeViewModel
.
Width
-
tGap
;
...
...
CSharp/Game/BehaviorTree/BehaviorTreeFactory.cs
浏览文件 @
04e7c92c
using
System
;
using
System.Collections.Generic
;
using
System.Reflection
;
namespace
BehaviorTree
{
...
...
@@ -20,7 +21,12 @@ namespace BehaviorTree
private
BehaviorTreeFactory
()
{
var
assembly
=
typeof
(
BehaviorTreeFactory
).
Assembly
;
Assembly
assembly
=
typeof
(
BehaviorTreeFactory
).
Assembly
;
this
.
RegisterNodes
(
assembly
);
}
public
void
RegisterNodes
(
Assembly
assembly
)
{
Type
[]
types
=
assembly
.
GetTypes
();
foreach
(
var
type
in
types
)
{
...
...
@@ -31,16 +37,19 @@ namespace BehaviorTree
}
NodeAttribute
attribute
=
(
NodeAttribute
)
attrs
[
0
];
dictionary
.
Add
(
attribute
.
NodeType
,
config
=>
(
Node
)
Activator
.
CreateInstance
(
attribute
.
ClassType
,
new
object
[]
{
config
}));
}
Type
classType
=
type
;
this
.
dictionary
.
Add
(
attribute
.
NodeType
,
config
=>
(
Node
)
Activator
.
CreateInstance
(
classType
,
new
object
[]
{
config
}));
}
}
private
Node
CreateNode
(
NodeConfig
config
)
{
if
(!
this
.
dictionary
.
ContainsKey
((
NodeType
)
config
.
Id
))
{
throw
new
KeyNotFoundException
(
string
.
Format
(
"CreateNode cannot found: {0}"
,
config
.
Id
));
throw
new
KeyNotFoundException
(
string
.
Format
(
"CreateNode cannot found: {0}"
,
config
.
Id
));
}
return
this
.
dictionary
[(
NodeType
)
config
.
Id
](
config
);
}
...
...
CSharp/Game/BehaviorTree/NodeAttribute.cs
浏览文件 @
04e7c92c
...
...
@@ -3,15 +3,13 @@
namespace
BehaviorTree
{
[
AttributeUsage
(
AttributeTargets
.
Class
)]
public
class
NodeAttribute
:
Attribute
public
class
NodeAttribute
:
Attribute
{
public
NodeType
NodeType
{
get
;
private
set
;
}
public
Type
ClassType
{
get
;
private
set
;
}
public
NodeAttribute
(
NodeType
nodeType
,
Type
classType
)
public
NodeAttribute
(
NodeType
nodeType
)
{
this
.
NodeType
=
nodeType
;
this
.
ClassType
=
classType
;
}
}
}
}
\ No newline at end of file
CSharp/Game/BehaviorTree/NodeConfig.cs
浏览文件 @
04e7c92c
...
...
@@ -16,7 +16,7 @@ namespace BehaviorTree
}
[
Config
]
public
class
NodeCategory
:
ACategory
<
NodeConfig
>
public
class
NodeCategory
:
ACategory
<
NodeConfig
>
{
}
}
\ No newline at end of file
CSharp/Game/BehaviorTree/NodeType.cs
浏览文件 @
04e7c92c
...
...
@@ -6,4 +6,4 @@
Sequence
=
2
,
Not
=
10
,
}
}
}
\ No newline at end of file
CSharp/Game/BehaviorTree/Not.cs
浏览文件 @
04e7c92c
namespace
BehaviorTree
{
[
Node
Attribute
(
NodeType
.
Not
,
typeof
(
Not
)
)]
[
Node
(
NodeType
.
Not
)]
public
class
Not
:
Node
{
public
Not
(
NodeConfig
config
):
base
(
config
)
...
...
CSharp/Game/BehaviorTree/Selector.cs
浏览文件 @
04e7c92c
namespace
BehaviorTree
{
[
Node
Attribute
(
NodeType
.
Selector
,
typeof
(
Selector
)
)]
[
Node
(
NodeType
.
Selector
)]
public
class
Selector
:
Node
{
public
Selector
(
NodeConfig
config
):
base
(
config
)
...
...
CSharp/Game/BehaviorTree/Sequence.cs
浏览文件 @
04e7c92c
namespace
BehaviorTree
{
[
Node
Attribute
(
NodeType
.
Sequence
,
typeof
(
Sequence
)
)]
[
Node
(
NodeType
.
Sequence
)]
internal
class
Sequence
:
Node
{
public
Sequence
(
NodeConfig
config
):
base
(
config
)
...
...
CSharp/Game/Controller/BuffController.cs
浏览文件 @
04e7c92c
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Controller
namespace
Controller
{
/// <summary>
/// 控制复杂的buff逻辑,可以reload
...
...
@@ -12,4 +6,4 @@ namespace Controller
public
class
BuffController
{
}
}
}
\ No newline at end of file
CSharp/Game/Controller/Properties/AssemblyInfo.cs
浏览文件 @
04e7c92c
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[
assembly
:
AssemblyTitle
(
"Controller"
)]
[
assembly
:
AssemblyDescription
(
""
)]
[
assembly
:
AssemblyConfiguration
(
""
)]
...
...
@@ -17,9 +17,11 @@ using System.Runtime.InteropServices;
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[
assembly
:
ComVisible
(
false
)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[
assembly
:
Guid
(
"2857e4a1-f2c1-4c17-8b67-6d25f98265ed"
)]
// 程序集的版本信息由下面四个值组成:
...
...
@@ -32,5 +34,6 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[
assembly
:
AssemblyVersion
(
"1.0.0.0"
)]
[
assembly
:
AssemblyFileVersion
(
"1.0.0.0"
)]
[
assembly
:
AssemblyFileVersion
(
"1.0.0.0"
)]
\ No newline at end of file
CSharp/Game/Model/BuffManager.cs
浏览文件 @
04e7c92c
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
Common.Base
;
using
MongoDB.Bson
;
using
MongoDB.Bson.Serialization.Attributes
;
using
Component
=
Common
.
Base
.
Component
;
namespace
Model
{
public
class
BuffManager
:
ISupportInitialize
public
class
BuffManager
:
Component
,
ISupportInitialize
{
public
HashSet
<
Buff
>
Buffs
{
get
;
private
set
;
}
...
...
@@ -13,13 +15,13 @@ namespace Model
public
Dictionary
<
ObjectId
,
Buff
>
BuffGuidDict
{
get
;
private
set
;
}
[
BsonIgnore
]
public
Dictionary
<
int
,
Buff
>
BuffTypeDict
{
get
;
private
set
;
}
public
MultiMap
<
int
,
Buff
>
BuffTypeDict
{
get
;
private
set
;
}
public
BuffManager
()
{
this
.
Buffs
=
new
HashSet
<
Buff
>();
this
.
BuffGuidDict
=
new
Dictionary
<
ObjectId
,
Buff
>();
this
.
BuffTypeDict
=
new
Dictionary
<
int
,
Buff
>();
this
.
BuffTypeDict
=
new
MultiMap
<
int
,
Buff
>();
}
void
ISupportInitialize
.
BeginInit
()
...
...
@@ -51,7 +53,7 @@ namespace Model
return
false
;
}
if
(
this
.
BuffTypeDict
.
ContainsKey
(
buff
.
Type
)
)
if
(
this
.
BuffTypeDict
.
Get
(
buff
.
Type
)
!=
null
)
{
return
false
;
}
...
...
@@ -63,24 +65,19 @@ namespace Model
return
true
;
}
public
Buff
GetBy
Id
(
ObjectId
id
)
public
Buff
GetBy
Guid
(
ObjectId
gu
id
)
{
if
(!
this
.
BuffGuidDict
.
ContainsKey
(
id
))
if
(!
this
.
BuffGuidDict
.
ContainsKey
(
gu
id
))
{
return
null
;
}
return
this
.
BuffGuidDict
[
id
];
return
this
.
BuffGuidDict
[
gu
id
];
}
public
Buff
GetByType
(
int
type
)
{
if
(!
this
.
BuffTypeDict
.
ContainsKey
(
type
))
{
return
null
;
}
return
this
.
BuffTypeDict
[
type
];
return
this
.
BuffTypeDict
.
Get
(
type
);
}
private
bool
Remove
(
Buff
buff
)
...
...
@@ -92,20 +89,20 @@ namespace Model
this
.
Buffs
.
Remove
(
buff
);
this
.
BuffGuidDict
.
Remove
(
buff
.
Guid
);
this
.
BuffTypeDict
.
Remove
(
buff
.
Type
);
this
.
BuffTypeDict
.
Remove
(
buff
.
Type
,
buff
);
return
true
;
}
public
bool
RemoveBy
Id
(
ObjectId
id
)
public
bool
RemoveBy
Guid
(
ObjectId
gu
id
)
{
var
buff
=
this
.
GetById
(
id
);
Buff
buff
=
this
.
GetByGuid
(
gu
id
);
return
this
.
Remove
(
buff
);
}
public
bool
RemoveByType
(
int
type
)
{
var
buff
=
this
.
GetByType
(
type
);
Buff
buff
=
this
.
GetByType
(
type
);
return
this
.
Remove
(
buff
);
}
}
...
...
CSharp/Game/Model/Character.cs
已删除
100644 → 0
浏览文件 @
9a032f9b
namespace
Model
{
/// <summary>
/// 角色对象
/// </summary>
public
class
Character
:
GameObject
{
}
}
\ No newline at end of file
CSharp/Game/Model/GameObject.cs
浏览文件 @
04e7c92c
...
...
@@ -2,18 +2,8 @@
namespace
Model
{
public
class
GameObject
:
Object
public
class
GameObject
:
Entity
{
private
readonly
BuffManager
buffManager
=
new
BuffManager
();
public
int
Type
{
get
;
set
;
}
public
BuffManager
BuffManager
{
get
{
return
this
.
buffManager
;
}
}
}
}
\ No newline at end of file
CSharp/Game/Model/Model.csproj
浏览文件 @
04e7c92c
...
...
@@ -47,7 +47,6 @@
<ItemGroup>
<Compile
Include=
"Buff.cs"
/>
<Compile
Include=
"BuffManager.cs"
/>
<Compile
Include=
"Character.cs"
/>
<Compile
Include=
"GameObject.cs"
/>
<Compile
Include=
"GameObjectManager.cs"
/>
</ItemGroup>
...
...
CSharp/Game/World/World.cs
浏览文件 @
04e7c92c
...
...
@@ -21,7 +21,7 @@ namespace World
private
World
()
{
configManager
.
Load
(
typeof
(
World
).
Assembly
);
this
.
configManager
.
Load
(
typeof
(
World
).
Assembly
);
}
public
ConfigManager
ConfigManager
...
...
CSharp/Platform/Common/Base/Component.cs
浏览文件 @
04e7c92c
...
...
@@ -4,4 +4,4 @@
{
public
Entity
Owner
{
get
;
set
;
}
}
}
}
\ No newline at end of file
CSharp/Platform/Common/Base/Entity.cs
浏览文件 @
04e7c92c
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
namespace
Common.Base
{
public
class
Entity
:
Object
{
private
readonly
Dictionary
<
string
,
Component
>
components
=
new
Dictionary
<
string
,
Component
>();
private
readonly
Dictionary
<
string
,
Component
>
components
=
new
Dictionary
<
string
,
Component
>();
public
void
AddComponent
<
T
>()
where
T
:
Component
,
new
()
{
T
t
=
new
T
{
Owner
=
this
};
this
.
components
.
Add
(
typeof
(
T
).
Name
,
t
);
this
.
components
.
Add
(
typeof
(
T
).
Name
,
t
);
}
public
void
RemoveComponent
<
T
>()
where
T
:
Component
{
this
.
components
.
Remove
(
typeof
(
T
).
Name
);
this
.
components
.
Remove
(
typeof
(
T
).
Name
);
}
public
T
GetComponent
<
T
>()
where
T
:
Component
{
Component
t
;
if
(!
this
.
components
.
TryGetValue
(
typeof
(
T
).
Name
,
out
t
))
{
throw
new
Exception
(
string
.
Format
(
"not found component: {0}"
,
typeof
(
T
).
Name
));
}
return
(
T
)
t
;
}
public
T
TryGetComponent
<
T
>()
where
T
:
Component
{
Component
t
;
if
(!
this
.
components
.
TryGetValue
(
typeof
(
T
).
Name
,
out
t
))
{
return
null
;
}
...
...
@@ -44,4 +34,4 @@ namespace Common.Base
return
this
.
components
.
Values
.
ToArray
();
}
}
}
}
\ No newline at end of file
CSharp/Platform/Common/Base/MultiMap.cs
0 → 100644
浏览文件 @
04e7c92c
using
System.Collections.Generic
;
namespace
Common.Base
{
public
class
MultiMap
<
T
,
K
>
{
private
readonly
SortedDictionary
<
T
,
List
<
K
>>
dictionary
=
new
SortedDictionary
<
T
,
List
<
K
>>();
public
SortedDictionary
<
T
,
List
<
K
>>.
KeyCollection
Keys
{
get
{
return
this
.
dictionary
.
Keys
;
}
}
public
void
Add
(
T
t
,
K
k
)
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
if
(
list
==
null
)
{
list
=
new
List
<
K
>();
}
list
.
Add
(
k
);
this
.
dictionary
[
t
]
=
list
;
}
public
bool
Remove
(
T
t
,
K
k
)
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
if
(
list
==
null
)
{
return
false
;
}
if
(!
list
.
Remove
(
k
))
{
return
false
;
}
if
(
list
.
Count
==
0
)
{
this
.
dictionary
.
Remove
(
t
);
}
return
true
;
}
public
bool
Remove
(
T
t
)
{
return
this
.
dictionary
.
Remove
(
t
);
}
/// <summary>
/// 不返回内部的list,copy一份出来
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
public
List
<
K
>
GetAll
(
T
t
)
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
if
(
list
==
null
)
{
return
new
List
<
K
>();
}
var
newList
=
new
List
<
K
>();
foreach
(
K
k
in
list
)
{
newList
.
Add
(
k
);
}
return
newList
;
}
/// <summary>
/// 返回内部的list
/// </summary>
/// <param name="t"></param>
/// <returns></returns>
public
List
<
K
>
this
[
T
t
]
{
get
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
return
list
;
}
}
public
K
Get
(
T
t
)
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
if
((
list
!=
null
)
&&
(
list
.
Count
>
0
))
{
return
list
[
0
];
}
return
default
(
K
);
}
public
bool
Contains
(
T
t
,
K
k
)
{
List
<
K
>
list
;
this
.
dictionary
.
TryGetValue
(
t
,
out
list
);
if
(
list
==
null
)
{
return
false
;
}
return
list
.
Contains
(
k
);
}
}
}
\ No newline at end of file
CSharp/Platform/Common/Common.csproj
浏览文件 @
04e7c92c
...
...
@@ -60,6 +60,7 @@
<ItemGroup>
<Compile
Include=
"Base\Entity.cs"
/>
<Compile
Include=
"Base\Component.cs"
/>
<Compile
Include=
"Base\MultiMap.cs"
/>
<Compile
Include=
"Config\ICategory.cs"
/>
<Compile
Include=
"Event\EventTrigger.cs"
/>
<Compile
Include=
"Event\Env.cs"
/>
...
...
CSharp/Platform/Common/Config/ConfigManager.cs
浏览文件 @
04e7c92c
...
...
@@ -19,13 +19,14 @@ namespace Common.Config
{
continue
;
}
object
obj
=
(
Activator
.
CreateInstance
(
type
));
ICategory
iCategory
=
obj
as
ICategory
;
if
(
iCategory
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"class: {0} not inherit from ACategory"
,
type
.
Name
));
throw
new
Exception
(
string
.
Format
(
"class: {0} not inherit from ACategory"
,
type
.
Name
));
}
iCategory
.
BeginInit
();
iCategory
.
EndInit
();
...
...
@@ -37,13 +38,13 @@ namespace Common.Config
public
T
Get
<
T
>(
int
type
)
where
T
:
IConfig
{
var
configCategory
=
(
ACategory
<
T
>)
this
.
allConfig
[
typeof
(
T
).
Name
];
var
configCategory
=
(
ACategory
<
T
>)
this
.
allConfig
[
typeof
(
T
).
Name
];
return
configCategory
[
type
];
}
public
T
[]
GetAll
<
T
>()
where
T
:
IConfig
{
var
configCategory
=
(
ACategory
<
T
>)
this
.
allConfig
[
typeof
(
T
).
Name
];
var
configCategory
=
(
ACategory
<
T
>)
this
.
allConfig
[
typeof
(
T
).
Name
];
return
configCategory
.
GetAll
();
}
...
...
CSharp/Platform/Common/Config/ICategory.cs
浏览文件 @
04e7c92c
...
...
@@ -2,8 +2,8 @@
namespace
Common.Config
{
public
interface
ICategory
:
ISupportInitialize
public
interface
ICategory
:
ISupportInitialize
{
string
Name
{
get
;
}
}
}
}
\ No newline at end of file
CSharp/Platform/Common/Event/EventTrigger.cs
浏览文件 @
04e7c92c
...
...
@@ -24,7 +24,8 @@ namespace Common.Event
IEvent
iEvent
=
obj
as
IEvent
;
if
(
iEvent
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"event not inherit IEvent interface: {0}"
,
obj
.
GetType
().
FullName
));
throw
new
Exception
(
string
.
Format
(
"event not inherit IEvent interface: {0}"
,
obj
.
GetType
().
FullName
));
}
IEventAttribute
iEventAttribute
=
(
T
)
attrs
[
0
];
...
...
@@ -51,4 +52,4 @@ namespace Common.Event
}
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录