Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
0dce8be3
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,体验更适合开发者的 AI 搜索 >>
提交
0dce8be3
编写于
8月 04, 2020
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
显示出登录界面
上级
937a2539
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
62 addition
and
23 deletion
+62
-23
Unity/Assets/HotfixView/AppStart_Init.cs
Unity/Assets/HotfixView/AppStart_Init.cs
+8
-2
Unity/Assets/HotfixView/Scene/AfterCreateZoneScene_AddComponent.cs
...ets/HotfixView/Scene/AfterCreateZoneScene_AddComponent.cs
+1
-0
Unity/Assets/HotfixView/Scene/SceneFactory.cs
Unity/Assets/HotfixView/Scene/SceneFactory.cs
+3
-2
Unity/Assets/HotfixView/Scene/SceneFactory.cs.meta
Unity/Assets/HotfixView/Scene/SceneFactory.cs.meta
+1
-1
Unity/Assets/HotfixView/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs
...HotfixView/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs
+12
-0
Unity/Assets/HotfixView/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs.meta
...xView/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs.meta
+1
-1
Unity/Assets/HotfixView/UI/UILogin/UILoginComponentSystem.cs
Unity/Assets/HotfixView/UI/UILogin/UILoginComponentSystem.cs
+1
-1
Unity/Assets/Model/EventType.cs
Unity/Assets/Model/EventType.cs
+5
-0
Unity/Assets/Model/Module/Resource/ResourcesComponent.cs
Unity/Assets/Model/Module/Resource/ResourcesComponent.cs
+10
-0
Unity/Assets/Model/Unit/TurnComponent.cs
Unity/Assets/Model/Unit/TurnComponent.cs
+1
-1
Unity/Assets/Model/Unit/Unit.cs
Unity/Assets/Model/Unit/Unit.cs
+5
-1
Unity/Assets/ModelView/Module/UI/UI.cs
Unity/Assets/ModelView/Module/UI/UI.cs
+11
-11
Unity/Assets/ModelView/Unit/AnimatorComponent.cs
Unity/Assets/ModelView/Unit/AnimatorComponent.cs
+1
-1
Unity/Unity.Hotfix.csproj
Unity/Unity.Hotfix.csproj
+0
-1
Unity/Unity.HotfixView.csproj
Unity/Unity.HotfixView.csproj
+2
-1
未找到文件。
Unity/Assets/HotfixView/AppStart_Init.cs
浏览文件 @
0dce8be3
...
...
@@ -11,14 +11,20 @@ namespace ET
//await BundleHelper.DownloadBundle("1111");
// 加载配置
Game
.
Scene
.
AddComponent
<
ResourcesComponent
>().
LoadBundle
(
"config.unity3d"
);
Game
.
Scene
.
AddComponent
<
ResourcesComponent
>();
ResourcesComponent
.
Instance
.
LoadBundle
(
"config.unity3d"
);
Game
.
Scene
.
AddComponent
<
ConfigComponent
>();
Game
.
Scene
.
GetComponent
<
ResourcesComponent
>().
UnloadBundle
(
"config.unity3d"
);
ResourcesComponent
.
Instance
.
UnloadBundle
(
"config.unity3d"
);
Game
.
Scene
.
AddComponent
<
OpcodeTypeComponent
>();
Game
.
Scene
.
AddComponent
<
MessageDispatcherComponent
>();
Game
.
Scene
.
AddComponent
<
UIEventComponent
>();
Scene
zoneScene
=
await
SceneFactory
.
CreateZoneScene
(
1
,
0
,
"Game"
);
await
Game
.
EventSystem
.
Publish
(
new
EventType
.
AppStartInitFinish
()
{
ZoneScene
=
zoneScene
});
}
}
}
\ No newline at end of file
Unity/Assets/HotfixView/Scene/AfterCreateZoneScene_AddComponent.cs
浏览文件 @
0dce8be3
...
...
@@ -6,6 +6,7 @@ namespace ET
{
Scene
zoneScene
=
args
.
ZoneScene
;
zoneScene
.
AddComponent
<
ResourcesComponent
>();
zoneScene
.
AddComponent
<
UIComponent
>();
}
}
}
\ No newline at end of file
Unity/Assets/Hotfix/Scene/SceneFactory.cs
→
Unity/Assets/Hotfix
View
/Scene/SceneFactory.cs
浏览文件 @
0dce8be3
...
...
@@ -9,8 +9,9 @@ namespace ET
zoneScene
.
AddComponent
<
NetOuterComponent
>();
zoneScene
.
AddComponent
<
PlayerComponent
>();
zoneScene
.
AddComponent
<
UnitComponent
>();
await
Game
.
EventSystem
.
Publish
(
new
EventType
.
AfterCreateZoneScene
());
// UI层的初始化
await
Game
.
EventSystem
.
Publish
(
new
EventType
.
AfterCreateZoneScene
()
{
ZoneScene
=
zoneScene
});
return
zoneScene
;
}
...
...
Unity/Assets/Hotfix/Scene/SceneFactory.cs.meta
→
Unity/Assets/Hotfix
View
/Scene/SceneFactory.cs.meta
浏览文件 @
0dce8be3
fileFormatVersion: 2
guid:
7cbe6b8dba0d1462e8ef45f7674b9794
guid:
6132d5efb1bae460db2ef73d954f24e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
...
...
Unity/Assets/HotfixView/UI/UILogin/A
fterCreateZoneScene
_CreateLoginUI.cs
→
Unity/Assets/HotfixView/UI/UILogin/A
ppStartInitFinish
_CreateLoginUI.cs
浏览文件 @
0dce8be3
...
...
@@ -2,9 +2,9 @@
namespace
ET
{
public
class
A
fterCreateZoneScene_RemoveLoginUI
:
AEvent
<
EventType
.
AfterCreateZoneScene
>
public
class
A
ppStartInitFinish_RemoveLoginUI
:
AEvent
<
EventType
.
AppStartInitFinish
>
{
public
override
async
ETTask
Run
(
EventType
.
A
fterCreateZoneScene
args
)
public
override
async
ETTask
Run
(
EventType
.
A
ppStartInitFinish
args
)
{
await
UIHelper
.
Create
(
args
.
ZoneScene
,
UIType
.
UILogin
);
}
...
...
Unity/Assets/HotfixView/UI/UILogin/A
fterCreateZoneScene
_CreateLoginUI.cs.meta
→
Unity/Assets/HotfixView/UI/UILogin/A
ppStartInitFinish
_CreateLoginUI.cs.meta
浏览文件 @
0dce8be3
fileFormatVersion: 2
guid:
f86b269e7cff94f3cb2a36780d7a9f27
guid:
8ca3bab3d15364846a895a2545184b52
MonoImporter:
externalObjects: {}
serializedVersion: 2
...
...
Unity/Assets/HotfixView/UI/UILogin/UILoginComponentSystem.cs
浏览文件 @
0dce8be3
...
...
@@ -10,7 +10,7 @@ namespace ET
{
public
override
void
Awake
(
UILoginComponent
self
)
{
ReferenceCollector
rc
=
self
.
GetParent
<
UI
>().
ViewGO
.
GetComponent
<
ReferenceCollector
>();
ReferenceCollector
rc
=
self
.
GetParent
<
UI
>().
GameObject
.
GetComponent
<
ReferenceCollector
>();
self
.
loginBtn
=
rc
.
Get
<
GameObject
>(
"LoginBtn"
);
self
.
loginBtn
.
GetComponent
<
Button
>().
onClick
.
AddListener
(
self
.
OnLogin
);
self
.
account
=
rc
.
Get
<
GameObject
>(
"Account"
);
...
...
Unity/Assets/Model/EventType.cs
浏览文件 @
0dce8be3
...
...
@@ -16,6 +16,11 @@
public
Scene
LoginScene
;
}
public
struct
AppStartInitFinish
{
public
Scene
ZoneScene
;
}
public
struct
LoginFinish
{
public
Scene
ZoneScene
;
...
...
Unity/Assets/Model/Module/Resource/ResourcesComponent.cs
浏览文件 @
0dce8be3
...
...
@@ -165,9 +165,19 @@ namespace ET
}
}
public
class
ResourcesComponentAwakeSystem
:
AwakeSystem
<
ResourcesComponent
>
{
public
override
void
Awake
(
ResourcesComponent
self
)
{
ResourcesComponent
.
Instance
=
self
;
}
}
public
class
ResourcesComponent
:
Entity
{
public
static
ResourcesComponent
Instance
;
public
static
AssetBundleManifest
AssetBundleManifestObject
{
get
;
set
;
}
private
readonly
Dictionary
<
string
,
Dictionary
<
string
,
UnityEngine
.
Object
>>
resourceCache
=
new
Dictionary
<
string
,
Dictionary
<
string
,
UnityEngine
.
Object
>>();
...
...
Unity/Assets/Model/Unit/TurnComponent.cs
浏览文件 @
0dce8be3
...
...
@@ -43,7 +43,7 @@ namespace ET
/// </summary>
public
void
Turn2D
(
Vector3
dir
,
float
turnTime
=
0.1f
)
{
Vector3
nexpos
=
this
.
GetParent
<
Unit
>().
ViewGO
.
transform
.
position
+
dir
;
Vector3
nexpos
=
this
.
GetParent
<
Unit
>().
GameObject
.
transform
.
position
+
dir
;
Turn
(
nexpos
,
turnTime
);
}
...
...
Unity/Assets/Model/Unit/Unit.cs
浏览文件 @
0dce8be3
using
Quaternion
=
UnityEngine
.
Quaternion
;
using
UnityEngine
;
using
Quaternion
=
UnityEngine
.
Quaternion
;
using
Vector3
=
UnityEngine
.
Vector3
;
namespace
ET
{
public
sealed
class
Unit
:
Entity
{
// 先放这里,去掉ViewGO,后面挪到显示层
public
GameObject
GameObject
;
public
int
ConfigId
;
public
UnitConfig
Config
...
...
Unity/Assets/ModelView/Module/UI/UI.cs
浏览文件 @
0dce8be3
...
...
@@ -21,11 +21,11 @@ namespace ET
public
string
Name
{
get
;
private
set
;
}
public
Dictionary
<
string
,
UI
>
c
hildren
=
new
Dictionary
<
string
,
UI
>();
public
Dictionary
<
string
,
UI
>
nameC
hildren
=
new
Dictionary
<
string
,
UI
>();
public
void
Awake
(
string
name
,
GameObject
gameObject
)
{
this
.
c
hildren
.
Clear
();
this
.
nameC
hildren
.
Clear
();
gameObject
.
AddComponent
<
ComponentView
>().
Component
=
this
;
gameObject
.
layer
=
LayerMask
.
NameToLayer
(
LayerNames
.
UI
);
this
.
Name
=
name
;
...
...
@@ -41,45 +41,45 @@ namespace ET
base
.
Dispose
();
foreach
(
UI
ui
in
this
.
c
hildren
.
Values
)
foreach
(
UI
ui
in
this
.
nameC
hildren
.
Values
)
{
ui
.
Dispose
();
}
UnityEngine
.
Object
.
Destroy
(
this
.
ViewGO
);
c
hildren
.
Clear
();
UnityEngine
.
Object
.
Destroy
(
this
.
GameObject
);
this
.
nameC
hildren
.
Clear
();
}
public
void
SetAsFirstSibling
()
{
this
.
ViewGO
.
transform
.
SetAsFirstSibling
();
this
.
GameObject
.
transform
.
SetAsFirstSibling
();
}
public
void
Add
(
UI
ui
)
{
this
.
c
hildren
.
Add
(
ui
.
Name
,
ui
);
this
.
nameC
hildren
.
Add
(
ui
.
Name
,
ui
);
ui
.
Parent
=
this
;
}
public
void
Remove
(
string
name
)
{
UI
ui
;
if
(!
this
.
c
hildren
.
TryGetValue
(
name
,
out
ui
))
if
(!
this
.
nameC
hildren
.
TryGetValue
(
name
,
out
ui
))
{
return
;
}
this
.
c
hildren
.
Remove
(
name
);
this
.
nameC
hildren
.
Remove
(
name
);
ui
.
Dispose
();
}
public
UI
Get
(
string
name
)
{
UI
child
;
if
(
this
.
c
hildren
.
TryGetValue
(
name
,
out
child
))
if
(
this
.
nameC
hildren
.
TryGetValue
(
name
,
out
child
))
{
return
child
;
}
GameObject
childGameObject
=
this
.
ViewGO
.
transform
.
Find
(
name
)?.
gameObject
;
GameObject
childGameObject
=
this
.
GameObject
.
transform
.
Find
(
name
)?.
gameObject
;
if
(
childGameObject
==
null
)
{
return
null
;
...
...
Unity/Assets/ModelView/Unit/AnimatorComponent.cs
浏览文件 @
0dce8be3
...
...
@@ -40,7 +40,7 @@ namespace ET
public
void
Awake
()
{
Animator
animator
=
this
.
GetParent
<
Unit
>().
ViewGO
.
GetComponent
<
Animator
>();
Animator
animator
=
this
.
GetParent
<
Unit
>().
GameObject
.
GetComponent
<
Animator
>();
if
(
animator
==
null
)
{
...
...
Unity/Unity.Hotfix.csproj
浏览文件 @
0dce8be3
...
...
@@ -65,7 +65,6 @@
<Compile
Include=
"Assets\Hotfix\Move\M2C_PathfindingResultHandler.cs"
/>
<Compile
Include=
"Assets\Hotfix\Scene\LoginHelper.cs"
/>
<Compile
Include=
"Assets\Hotfix\Scene\MapHelper.cs"
/>
<Compile
Include=
"Assets\Hotfix\Scene\SceneFactory.cs"
/>
<Compile
Include=
"Assets\Hotfix\Unit\M2C_CreateUnitsHandler.cs"
/>
<Compile
Include=
"Assets\Hotfix\Unit\PlayerFactory.cs"
/>
<Compile
Include=
"Assets\Hotfix\Unit\UnitFactory.cs"
/>
...
...
Unity/Unity.HotfixView.csproj
浏览文件 @
0dce8be3
...
...
@@ -63,6 +63,7 @@
<Compile
Include=
"Assets\HotfixView\Module\UI\UIComponentSystem.cs"
/>
<Compile
Include=
"Assets\HotfixView\Module\UI\UIEventComponentSystem.cs"
/>
<Compile
Include=
"Assets\HotfixView\Scene\AfterCreateZoneScene_AddComponent.cs"
/>
<Compile
Include=
"Assets\HotfixView\Scene\SceneFactory.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UIHelper.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILoading\LoadingBeginEvent_CreateLoadingUI.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILoading\LoadingFinishEvent_RemoveLoadingUI.cs"
/>
...
...
@@ -72,7 +73,7 @@
<Compile
Include=
"Assets\HotfixView\UI\UILobby\LoginFinish_CreateLobbyUI.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILobby\UILobbyComponentSystem.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILobby\UILobbyEvent.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILogin\A
fterCreateZoneScene
_CreateLoginUI.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILogin\A
ppStartInitFinish
_CreateLoginUI.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILogin\LoginFinish_RemoveLoginUI.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILogin\UILoginComponentSystem.cs"
/>
<Compile
Include=
"Assets\HotfixView\UI\UILogin\UILoginEvent.cs"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录