mirror of https://github.com/tuyoogame/YooAsset
update sample
parent
82cff36194
commit
5718d57b88
|
@ -85,7 +85,7 @@ MonoBehaviour:
|
||||||
CollectorGUID: 12d33f33f3a55224c9c747d7bffa1c68
|
CollectorGUID: 12d33f33f3a55224c9c747d7bffa1c68
|
||||||
CollectorType: 0
|
CollectorType: 0
|
||||||
AddressRuleName: AddressByFileName
|
AddressRuleName: AddressByFileName
|
||||||
PackRuleName: PackDirectory
|
PackRuleName: PackSeparately
|
||||||
FilterRuleName: CollectAll
|
FilterRuleName: CollectAll
|
||||||
AssetTags:
|
AssetTags:
|
||||||
- CollectPath: Assets/Samples/Space Shooter/GameRes/UISprite
|
- CollectPath: Assets/Samples/Space Shooter/GameRes/UISprite
|
||||||
|
|
|
@ -121,89 +121,6 @@ NavMeshSettings:
|
||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
--- !u!1 &882660809
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 882660812}
|
|
||||||
- component: {fileID: 882660811}
|
|
||||||
- component: {fileID: 882660810}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Camera
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!81 &882660810
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 882660809}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!20 &882660811
|
|
||||||
Camera:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 882660809}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ClearFlags: 2
|
|
||||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
|
||||||
m_projectionMatrixMode: 1
|
|
||||||
m_GateFitMode: 2
|
|
||||||
m_FOVAxisMode: 0
|
|
||||||
m_SensorSize: {x: 36, y: 24}
|
|
||||||
m_LensShift: {x: 0, y: 0}
|
|
||||||
m_FocalLength: 50
|
|
||||||
m_NormalizedViewPortRect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 0
|
|
||||||
y: 0
|
|
||||||
width: 1
|
|
||||||
height: 1
|
|
||||||
near clip plane: 0.3
|
|
||||||
far clip plane: 1000
|
|
||||||
field of view: 60
|
|
||||||
orthographic: 0
|
|
||||||
orthographic size: 5
|
|
||||||
m_Depth: 0
|
|
||||||
m_CullingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
m_RenderingPath: -1
|
|
||||||
m_TargetTexture: {fileID: 0}
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
m_TargetEye: 3
|
|
||||||
m_HDR: 1
|
|
||||||
m_AllowMSAA: 1
|
|
||||||
m_AllowDynamicResolution: 0
|
|
||||||
m_ForceIntoRT: 0
|
|
||||||
m_OcclusionCulling: 1
|
|
||||||
m_StereoConvergence: 10
|
|
||||||
m_StereoSeparation: 0.022
|
|
||||||
--- !u!4 &882660812
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 882660809}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: -0.09431402, y: 0.086022705, z: -11.001953}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &1281760859
|
--- !u!1 &1281760859
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -248,3 +165,86 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &6920458660802423023
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6920458660802423026}
|
||||||
|
- component: {fileID: 6920458660802423025}
|
||||||
|
- component: {fileID: 6920458660802423024}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &6920458660802423024
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6920458660802423023}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &6920458660802423025
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6920458660802423023}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.043137256}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 10
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &6920458660802423026
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6920458660802423023}
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 10, z: 5}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||||
|
|
|
@ -168,24 +168,6 @@ GameObject:
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!1 &15
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 28}
|
|
||||||
- component: {fileID: 61}
|
|
||||||
- component: {fileID: 69}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: EventSystem
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!1 &16
|
--- !u!1 &16
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -198,6 +180,7 @@ GameObject:
|
||||||
- component: {fileID: 35}
|
- component: {fileID: 35}
|
||||||
- component: {fileID: 33}
|
- component: {fileID: 33}
|
||||||
- component: {fileID: 70}
|
- component: {fileID: 70}
|
||||||
|
- component: {fileID: 18}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Background
|
m_Name: Background
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -223,24 +206,102 @@ GameObject:
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!1 &18
|
--- !u!82 &18
|
||||||
GameObject:
|
AudioSource:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
m_GameObject: {fileID: 16}
|
||||||
m_Component:
|
m_Enabled: 1
|
||||||
- component: {fileID: 31}
|
serializedVersion: 4
|
||||||
- component: {fileID: 39}
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
- component: {fileID: 26}
|
m_audioClip: {fileID: 8300000, guid: 7b04c59dd84f14039b601e1abbe7b884, type: 3}
|
||||||
m_Layer: 0
|
m_PlayOnAwake: 1
|
||||||
m_Name: BattleRoom
|
m_Volume: 0.5
|
||||||
m_TagString: GameController
|
m_Pitch: 1
|
||||||
m_Icon: {fileID: 0}
|
Loop: 1
|
||||||
m_NavMeshLayer: 0
|
Mute: 0
|
||||||
m_StaticEditorFlags: 0
|
Spatialize: 0
|
||||||
m_IsActive: 1
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 0
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 0
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 0
|
||||||
--- !u!4 &19
|
--- !u!4 &19
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -328,7 +389,7 @@ Transform:
|
||||||
m_LocalScale: {x: 15, y: 2, z: 40}
|
m_LocalScale: {x: 15, y: 2, z: 40}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 7
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!4 &25
|
--- !u!4 &25
|
||||||
Transform:
|
Transform:
|
||||||
|
@ -344,23 +405,6 @@ Transform:
|
||||||
m_Father: {fileID: 20}
|
m_Father: {fileID: 20}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &26
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 18}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 43ab5a1b8ae5c2b4a8995952e7e01f3f, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
SpawnValues: {x: 6, y: 0, z: 20}
|
|
||||||
EnemyCount: 10
|
|
||||||
SpawnWait: 0.75
|
|
||||||
StartWait: 1
|
|
||||||
WaveWait: 4
|
|
||||||
--- !u!4 &27
|
--- !u!4 &27
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -375,20 +419,6 @@ Transform:
|
||||||
m_Father: {fileID: 20}
|
m_Father: {fileID: 20}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!4 &28
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 15}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 4
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!4 &29
|
--- !u!4 &29
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -418,20 +448,6 @@ Transform:
|
||||||
m_Father: {fileID: 29}
|
m_Father: {fileID: 29}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!4 &31
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 18}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 6
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!23 &33
|
--- !u!23 &33
|
||||||
MeshRenderer:
|
MeshRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -539,102 +555,6 @@ BoxCollider:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 1, y: 5.8, z: 1}
|
m_Size: {x: 1, y: 5.8, z: 1}
|
||||||
m_Center: {x: 0, y: 0.15, z: 0}
|
m_Center: {x: 0, y: 0.15, z: 0}
|
||||||
--- !u!82 &39
|
|
||||||
AudioSource:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 18}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 4
|
|
||||||
OutputAudioMixerGroup: {fileID: 0}
|
|
||||||
m_audioClip: {fileID: 8300000, guid: 7b04c59dd84f14039b601e1abbe7b884, type: 3}
|
|
||||||
m_PlayOnAwake: 1
|
|
||||||
m_Volume: 0.5
|
|
||||||
m_Pitch: 1
|
|
||||||
Loop: 1
|
|
||||||
Mute: 0
|
|
||||||
Spatialize: 0
|
|
||||||
SpatializePostEffects: 0
|
|
||||||
Priority: 128
|
|
||||||
DopplerLevel: 1
|
|
||||||
MinDistance: 1
|
|
||||||
MaxDistance: 500
|
|
||||||
Pan2D: 0
|
|
||||||
rolloffMode: 0
|
|
||||||
BypassEffects: 0
|
|
||||||
BypassListenerEffects: 0
|
|
||||||
BypassReverbZones: 0
|
|
||||||
rolloffCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- serializedVersion: 3
|
|
||||||
time: 0
|
|
||||||
value: 1
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
weightedMode: 0
|
|
||||||
inWeight: 0.33333334
|
|
||||||
outWeight: 0.33333334
|
|
||||||
- serializedVersion: 3
|
|
||||||
time: 1
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
weightedMode: 0
|
|
||||||
inWeight: 0.33333334
|
|
||||||
outWeight: 0.33333334
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
m_RotationOrder: 4
|
|
||||||
panLevelCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- serializedVersion: 3
|
|
||||||
time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
weightedMode: 0
|
|
||||||
inWeight: 0.33333334
|
|
||||||
outWeight: 0.33333334
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
m_RotationOrder: 0
|
|
||||||
spreadCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- serializedVersion: 3
|
|
||||||
time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
weightedMode: 0
|
|
||||||
inWeight: 0.33333334
|
|
||||||
outWeight: 0.33333334
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
m_RotationOrder: 0
|
|
||||||
reverbZoneMixCustomCurve:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Curve:
|
|
||||||
- serializedVersion: 3
|
|
||||||
time: 0
|
|
||||||
value: 0
|
|
||||||
inSlope: 0
|
|
||||||
outSlope: 0
|
|
||||||
tangentMode: 0
|
|
||||||
weightedMode: 0
|
|
||||||
inWeight: 0.33333334
|
|
||||||
outWeight: 0.33333334
|
|
||||||
m_PreInfinity: 2
|
|
||||||
m_PostInfinity: 2
|
|
||||||
m_RotationOrder: 0
|
|
||||||
--- !u!104 &41
|
--- !u!104 &41
|
||||||
RenderSettings:
|
RenderSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11053,119 +10973,6 @@ ParticleSystemRenderer:
|
||||||
m_Mesh2: {fileID: 0}
|
m_Mesh2: {fileID: 0}
|
||||||
m_Mesh3: {fileID: 0}
|
m_Mesh3: {fileID: 0}
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
--- !u!223 &55
|
|
||||||
Canvas:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1657258425}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_RenderMode: 0
|
|
||||||
m_Camera: {fileID: 0}
|
|
||||||
m_PlaneDistance: 100
|
|
||||||
m_PixelPerfect: 0
|
|
||||||
m_ReceivesEvents: 1
|
|
||||||
m_OverrideSorting: 0
|
|
||||||
m_OverridePixelPerfect: 0
|
|
||||||
m_SortingBucketNormalizedSize: 0
|
|
||||||
m_AdditionalShaderChannelsFlag: 0
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
--- !u!224 &57
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1657258425}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0, y: 0}
|
|
||||||
--- !u!114 &61
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 15}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_FirstSelected: {fileID: 0}
|
|
||||||
m_sendNavigationEvents: 1
|
|
||||||
m_DragThreshold: 5
|
|
||||||
--- !u!114 &63
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1657258425}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_IgnoreReversedGraphics: 1
|
|
||||||
m_BlockingObjects: 0
|
|
||||||
m_BlockingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
--- !u!114 &64
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1657258425}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_UiScaleMode: 0
|
|
||||||
m_ReferencePixelsPerUnit: 100
|
|
||||||
m_ScaleFactor: 1
|
|
||||||
m_ReferenceResolution: {x: 800, y: 600}
|
|
||||||
m_ScreenMatchMode: 0
|
|
||||||
m_MatchWidthOrHeight: 0
|
|
||||||
m_PhysicalUnit: 3
|
|
||||||
m_FallbackScreenDPI: 96
|
|
||||||
m_DefaultSpriteDPI: 96
|
|
||||||
m_DynamicPixelsPerUnit: 1
|
|
||||||
--- !u!114 &69
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 15}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalAxis: Horizontal
|
|
||||||
m_VerticalAxis: Vertical
|
|
||||||
m_SubmitButton: Submit
|
|
||||||
m_CancelButton: Cancel
|
|
||||||
m_InputActionsPerSecond: 10
|
|
||||||
m_RepeatDelay: 0.5
|
|
||||||
m_ForceModuleActive: 0
|
|
||||||
--- !u!114 &70
|
--- !u!114 &70
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11180,108 +10987,6 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
ScrollSpeed: -0.25
|
ScrollSpeed: -0.25
|
||||||
TileSizeZ: 30
|
TileSizeZ: 30
|
||||||
--- !u!1 &8321295
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8321298}
|
|
||||||
- component: {fileID: 8321297}
|
|
||||||
- component: {fileID: 8321296}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Main Camera
|
|
||||||
m_TagString: MainCamera
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!81 &8321296
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8321295}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!20 &8321297
|
|
||||||
Camera:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8321295}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ClearFlags: 2
|
|
||||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.043137256}
|
|
||||||
m_projectionMatrixMode: 1
|
|
||||||
m_GateFitMode: 2
|
|
||||||
m_FOVAxisMode: 0
|
|
||||||
m_SensorSize: {x: 36, y: 24}
|
|
||||||
m_LensShift: {x: 0, y: 0}
|
|
||||||
m_FocalLength: 50
|
|
||||||
m_NormalizedViewPortRect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 0
|
|
||||||
y: 0
|
|
||||||
width: 1
|
|
||||||
height: 1
|
|
||||||
near clip plane: 0.3
|
|
||||||
far clip plane: 1000
|
|
||||||
field of view: 60
|
|
||||||
orthographic: 1
|
|
||||||
orthographic size: 10
|
|
||||||
m_Depth: 0
|
|
||||||
m_CullingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
m_RenderingPath: -1
|
|
||||||
m_TargetTexture: {fileID: 0}
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
m_TargetEye: 3
|
|
||||||
m_HDR: 1
|
|
||||||
m_AllowMSAA: 1
|
|
||||||
m_AllowDynamicResolution: 0
|
|
||||||
m_ForceIntoRT: 0
|
|
||||||
m_OcclusionCulling: 1
|
|
||||||
m_StereoConvergence: 10
|
|
||||||
m_StereoSeparation: 0.022
|
|
||||||
--- !u!4 &8321298
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 8321295}
|
|
||||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
|
||||||
m_LocalPosition: {x: 0, y: 10, z: 5}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 5
|
|
||||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
|
||||||
--- !u!1 &1657258425
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 57}
|
|
||||||
- component: {fileID: 55}
|
|
||||||
- component: {fileID: 64}
|
|
||||||
- component: {fileID: 63}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Canvas
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!1 &1691764578
|
--- !u!1 &1691764578
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -11324,5 +11029,88 @@ Transform:
|
||||||
m_LocalScale: {x: 38.1, y: 7.1, z: 105.4}
|
m_LocalScale: {x: 38.1, y: 7.1, z: 105.4}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 8
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &3992189574601221031
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3992189574601221050}
|
||||||
|
- component: {fileID: 3992189574601221049}
|
||||||
|
- component: {fileID: 3992189574601221048}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &3992189574601221048
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3992189574601221031}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &3992189574601221049
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3992189574601221031}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.043137256}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 10
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &3992189574601221050
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3992189574601221031}
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 10, z: 5}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -121,388 +121,6 @@ NavMeshSettings:
|
||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
--- !u!1 &916616400
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 916616404}
|
|
||||||
- component: {fileID: 916616403}
|
|
||||||
- component: {fileID: 916616402}
|
|
||||||
- component: {fileID: 916616401}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: Canvas
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &916616401
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 916616400}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_IgnoreReversedGraphics: 1
|
|
||||||
m_BlockingObjects: 0
|
|
||||||
m_BlockingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
--- !u!114 &916616402
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 916616400}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_UiScaleMode: 0
|
|
||||||
m_ReferencePixelsPerUnit: 100
|
|
||||||
m_ScaleFactor: 1
|
|
||||||
m_ReferenceResolution: {x: 800, y: 600}
|
|
||||||
m_ScreenMatchMode: 0
|
|
||||||
m_MatchWidthOrHeight: 0
|
|
||||||
m_PhysicalUnit: 3
|
|
||||||
m_FallbackScreenDPI: 96
|
|
||||||
m_DefaultSpriteDPI: 96
|
|
||||||
m_DynamicPixelsPerUnit: 1
|
|
||||||
--- !u!223 &916616403
|
|
||||||
Canvas:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 916616400}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 3
|
|
||||||
m_RenderMode: 0
|
|
||||||
m_Camera: {fileID: 0}
|
|
||||||
m_PlaneDistance: 100
|
|
||||||
m_PixelPerfect: 0
|
|
||||||
m_ReceivesEvents: 1
|
|
||||||
m_OverrideSorting: 0
|
|
||||||
m_OverridePixelPerfect: 0
|
|
||||||
m_SortingBucketNormalizedSize: 0
|
|
||||||
m_AdditionalShaderChannelsFlag: 0
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
--- !u!224 &916616404
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 916616400}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
|
||||||
m_Children:
|
|
||||||
- {fileID: 2129969559}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 3
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0, y: 0}
|
|
||||||
--- !u!1 &1221815198
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1221815201}
|
|
||||||
- component: {fileID: 1221815200}
|
|
||||||
- component: {fileID: 1221815199}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: EventSystem
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &1221815199
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1221815198}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalAxis: Horizontal
|
|
||||||
m_VerticalAxis: Vertical
|
|
||||||
m_SubmitButton: Submit
|
|
||||||
m_CancelButton: Cancel
|
|
||||||
m_InputActionsPerSecond: 10
|
|
||||||
m_RepeatDelay: 0.5
|
|
||||||
m_ForceModuleActive: 0
|
|
||||||
--- !u!114 &1221815200
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1221815198}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_FirstSelected: {fileID: 0}
|
|
||||||
m_sendNavigationEvents: 1
|
|
||||||
m_DragThreshold: 10
|
|
||||||
--- !u!4 &1221815201
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1221815198}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 4
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &1334075221
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1334075223}
|
|
||||||
- component: {fileID: 1334075222}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Directional Light
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!108 &1334075222
|
|
||||||
Light:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1334075221}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 10
|
|
||||||
m_Type: 1
|
|
||||||
m_Shape: 0
|
|
||||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
|
||||||
m_Intensity: 1
|
|
||||||
m_Range: 10
|
|
||||||
m_SpotAngle: 30
|
|
||||||
m_InnerSpotAngle: 21.80208
|
|
||||||
m_CookieSize: 10
|
|
||||||
m_Shadows:
|
|
||||||
m_Type: 2
|
|
||||||
m_Resolution: -1
|
|
||||||
m_CustomResolution: -1
|
|
||||||
m_Strength: 1
|
|
||||||
m_Bias: 0.05
|
|
||||||
m_NormalBias: 0.4
|
|
||||||
m_NearPlane: 0.2
|
|
||||||
m_CullingMatrixOverride:
|
|
||||||
e00: 1
|
|
||||||
e01: 0
|
|
||||||
e02: 0
|
|
||||||
e03: 0
|
|
||||||
e10: 0
|
|
||||||
e11: 1
|
|
||||||
e12: 0
|
|
||||||
e13: 0
|
|
||||||
e20: 0
|
|
||||||
e21: 0
|
|
||||||
e22: 1
|
|
||||||
e23: 0
|
|
||||||
e30: 0
|
|
||||||
e31: 0
|
|
||||||
e32: 0
|
|
||||||
e33: 1
|
|
||||||
m_UseCullingMatrixOverride: 0
|
|
||||||
m_Cookie: {fileID: 0}
|
|
||||||
m_DrawHalo: 0
|
|
||||||
m_Flare: {fileID: 0}
|
|
||||||
m_RenderMode: 0
|
|
||||||
m_CullingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_Lightmapping: 4
|
|
||||||
m_LightShadowCasterMode: 0
|
|
||||||
m_AreaSize: {x: 1, y: 1}
|
|
||||||
m_BounceIntensity: 1
|
|
||||||
m_ColorTemperature: 6570
|
|
||||||
m_UseColorTemperature: 0
|
|
||||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
m_UseBoundingSphereOverride: 0
|
|
||||||
m_ShadowRadius: 0
|
|
||||||
m_ShadowAngle: 0
|
|
||||||
--- !u!4 &1334075223
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1334075221}
|
|
||||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
|
||||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 2
|
|
||||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
|
||||||
--- !u!1001 &2129969558
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
m_TransformParent: {fileID: 916616404}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_RootOrder
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4142826567245113227, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: UILogin
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f33f75c4ce22cf248abf851242ac4363, type: 3}
|
|
||||||
--- !u!224 &2129969559 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 4142826567245113224, guid: f33f75c4ce22cf248abf851242ac4363,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 2129969558}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!4 &3517166543428106988
|
--- !u!4 &3517166543428106988
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -0,0 +1,350 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4099142336341904240
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7126978470340264304}
|
||||||
|
- component: {fileID: 3359586880618602463}
|
||||||
|
- component: {fileID: 8175961594734719007}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: info
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7126978470340264304
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4099142336341904240}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 3997691783514560453}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &3359586880618602463
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4099142336341904240}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8175961594734719007
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4099142336341904240}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 0
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 12800000, guid: 8297a2bf97dbbba468bd2518d003a876, type: 3}
|
||||||
|
m_FontSize: 28
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 2
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: Powered by YooAsset
|
||||||
|
--- !u!1 &4142826567245113227
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4142826567245113224}
|
||||||
|
- component: {fileID: 4142826567245113225}
|
||||||
|
- component: {fileID: 446002385128238495}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: UIAbout
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4142826567245113224
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 5343213182511549108}
|
||||||
|
- {fileID: 3997691783514560453}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!223 &4142826567245113225
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 2
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 1
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &446002385128238495
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!1 &6154978740135451069
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5343213182511549108}
|
||||||
|
- component: {fileID: 8369344421515876960}
|
||||||
|
- component: {fileID: 7080476478489546113}
|
||||||
|
- component: {fileID: 8806219243094360206}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: mask
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &5343213182511549108
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6154978740135451069}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4142826567245113224}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8369344421515876960
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6154978740135451069}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &7080476478489546113
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6154978740135451069}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!114 &8806219243094360206
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6154978740135451069}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 0
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 7080476478489546113}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
--- !u!1 &8989319042809547364
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3997691783514560453}
|
||||||
|
- component: {fileID: 7677845000641202694}
|
||||||
|
- component: {fileID: 4438684259955260312}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: bg
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &3997691783514560453
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8989319042809547364}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 7126978470340264304}
|
||||||
|
m_Father: {fileID: 4142826567245113224}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 520, y: 286.62195}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7677845000641202694
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8989319042809547364}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4438684259955260312
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8989319042809547364}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 06edc4e02f9c48647adfed0a778cb8aa, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2e0f217747ebd544c82e9ddd1b47525e
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -36,7 +36,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 620, y: 924}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1168652661830625159
|
--- !u!222 &1168652661830625159
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -206,10 +206,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 4142826567245113224}
|
m_Father: {fileID: 4142826567245113224}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &3580699901832812969
|
--- !u!1 &3580699901832812969
|
||||||
GameObject:
|
GameObject:
|
||||||
|
@ -341,7 +341,6 @@ GameObject:
|
||||||
- component: {fileID: 4142826567245113224}
|
- component: {fileID: 4142826567245113224}
|
||||||
- component: {fileID: 4142826567245113225}
|
- component: {fileID: 4142826567245113225}
|
||||||
- component: {fileID: 446002385128238495}
|
- component: {fileID: 446002385128238495}
|
||||||
- component: {fileID: 3910061912146487027}
|
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: UIBattle
|
m_Name: UIBattle
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -409,18 +408,6 @@ MonoBehaviour:
|
||||||
m_BlockingMask:
|
m_BlockingMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Bits: 4294967295
|
||||||
--- !u!114 &3910061912146487027
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4142826567245113227}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9776c197a7f86e94c9484946495616bb, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &5051316305113654670
|
--- !u!1 &5051316305113654670
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -0,0 +1,203 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1457738500883128975
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1457738500883128971}
|
||||||
|
- component: {fileID: 1457738500883128972}
|
||||||
|
- component: {fileID: 1457738500883128973}
|
||||||
|
- component: {fileID: 1457738500883128974}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: UICanvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1457738500883128971
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1457738500883128975}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4471021202605196124}
|
||||||
|
- {fileID: 3071470527211293446}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!223 &1457738500883128972
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1457738500883128975}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &1457738500883128973
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1457738500883128975}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
--- !u!114 &1457738500883128974
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1457738500883128975}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!1 &3071470527211293447
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3071470527211293446}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Desktop
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &3071470527211293446
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3071470527211293447}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1457738500883128971}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &4471021202605196131
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4471021202605196124}
|
||||||
|
- component: {fileID: 4471021202605196125}
|
||||||
|
- component: {fileID: 4471021202605196130}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4471021202605196124
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4471021202605196131}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1457738500883128971}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &4471021202605196125
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4471021202605196131}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 10
|
||||||
|
--- !u!114 &4471021202605196130
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4471021202605196131}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_RepeatDelay: 0.5
|
||||||
|
m_ForceModuleActive: 0
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1700631a871f2da418ca3815faed9394
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -130,9 +130,8 @@ GameObject:
|
||||||
- component: {fileID: 4142826567245113224}
|
- component: {fileID: 4142826567245113224}
|
||||||
- component: {fileID: 4142826567245113225}
|
- component: {fileID: 4142826567245113225}
|
||||||
- component: {fileID: 446002385128238495}
|
- component: {fileID: 446002385128238495}
|
||||||
- component: {fileID: -4265997780860394554}
|
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: UILogin
|
m_Name: UIHome
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@ -197,18 +196,6 @@ MonoBehaviour:
|
||||||
m_BlockingMask:
|
m_BlockingMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Bits: 4294967295
|
||||||
--- !u!114 &-4265997780860394554
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4142826567245113227}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 4792d7c57be85c845bc50d7215160853, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &4691699994207377690
|
--- !u!1 &4691699994207377690
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -222,7 +209,7 @@ GameObject:
|
||||||
- component: {fileID: 1411896437987713300}
|
- component: {fileID: 1411896437987713300}
|
||||||
- component: {fileID: 6457600995492259680}
|
- component: {fileID: 6457600995492259680}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Setting
|
m_Name: About
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@ -483,4 +470,4 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: Setting
|
m_Text: About
|
|
@ -0,0 +1,231 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &213995007158037226
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2380612195453094903}
|
||||||
|
- component: {fileID: 95677582635961211}
|
||||||
|
- component: {fileID: 5262699309239441798}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: bg
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2380612195453094903
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 213995007158037226}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4142826567245113224}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &95677582635961211
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 213995007158037226}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &5262699309239441798
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 213995007158037226}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 21300000, guid: b76b8b216adf64f4bbdb78f7977f0310, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!1 &867898397607806311
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6184545274827739511}
|
||||||
|
- component: {fileID: 6671564359713877752}
|
||||||
|
- component: {fileID: 5054946357839069556}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: info
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6184545274827739511
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 867898397607806311}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4142826567245113224}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 113.6, y: 0}
|
||||||
|
m_SizeDelta: {x: 372.8026, y: 60}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6671564359713877752
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 867898397607806311}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &5054946357839069556
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 867898397607806311}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 12800000, guid: 8297a2bf97dbbba468bd2518d003a876, type: 3}
|
||||||
|
m_FontSize: 36
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 3
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: Loading...
|
||||||
|
--- !u!1 &4142826567245113227
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4142826567245113224}
|
||||||
|
- component: {fileID: 4142826567245113225}
|
||||||
|
- component: {fileID: 446002385128238495}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: UILoading
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4142826567245113224
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 2380612195453094903}
|
||||||
|
- {fileID: 6184545274827739511}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!223 &4142826567245113225
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 2
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 1
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &446002385128238495
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4142826567245113227}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 79ae622f4c23c47449fc3ea70abaca51
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -46,7 +46,7 @@ TextureImporter:
|
||||||
alignment: 0
|
alignment: 0
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 100
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 142, y: 145, z: 148, w: 165}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 1
|
alphaIsTransparency: 1
|
||||||
|
|
|
@ -46,7 +46,7 @@ TextureImporter:
|
||||||
alignment: 0
|
alignment: 0
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 100
|
spritePixelsToUnits: 100
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 157, y: 139, z: 154, w: 157}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 1
|
alphaIsTransparency: 1
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class BattleEventDefine
|
|
||||||
{
|
|
||||||
public class ScoreChange : IEventMessage
|
|
||||||
{
|
|
||||||
public int CurrentScores;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class GameOver : IEventMessage
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public static class BattleEventDispatcher
|
|
||||||
{
|
|
||||||
public static void SendScoreChangeMsg(int currentScores)
|
|
||||||
{
|
|
||||||
BattleEventDefine.ScoreChange msg = new BattleEventDefine.ScoreChange();
|
|
||||||
msg.CurrentScores = currentScores;
|
|
||||||
EventManager.SendMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SendGameOverMsg()
|
|
||||||
{
|
|
||||||
BattleEventDefine.GameOver msg = new BattleEventDefine.GameOver();
|
|
||||||
EventManager.SendMessage(msg);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,110 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
using Random = UnityEngine.Random;
|
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class RoomBoundary
|
|
||||||
{
|
|
||||||
public float xMin, xMax, zMin, zMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class BattleRoom : MonoBehaviour
|
|
||||||
{
|
|
||||||
public static BattleRoom Instance;
|
|
||||||
|
|
||||||
public Vector3 SpawnValues;
|
|
||||||
public int EnemyCount = 10;
|
|
||||||
public float SpawnWait = 0.75f;
|
|
||||||
public float StartWait = 1f;
|
|
||||||
public float WaveWait = 4f;
|
|
||||||
|
|
||||||
private int _totalScore = 0;
|
|
||||||
private bool _gameOver = false;
|
|
||||||
private string[] _enemyLocations = new string[]
|
|
||||||
{
|
|
||||||
"asteroid01", "asteroid02", "asteroid03", "enemy_ship"
|
|
||||||
};
|
|
||||||
|
|
||||||
private AssetOperationHandle _panelHandle;
|
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
Instance = this;
|
|
||||||
|
|
||||||
var canvas = GameObject.Find("Canvas");
|
|
||||||
_panelHandle = YooAssets.LoadAssetSync<GameObject>("UIBattle");
|
|
||||||
var go = _panelHandle.InstantiateSync(canvas.transform);
|
|
||||||
go.transform.localPosition = Vector3.zero;
|
|
||||||
}
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>("player_ship");
|
|
||||||
var go = handle.InstantiateSync();
|
|
||||||
var bhv = go.GetComponent<EntityPlayer>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
|
|
||||||
StartCoroutine(SpawnWaves());
|
|
||||||
}
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
Instance = null;
|
|
||||||
|
|
||||||
if(_panelHandle != null)
|
|
||||||
{
|
|
||||||
_panelHandle.Release();
|
|
||||||
_panelHandle = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator SpawnWaves()
|
|
||||||
{
|
|
||||||
yield return new WaitForSeconds(StartWait);
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < EnemyCount; i++)
|
|
||||||
{
|
|
||||||
var enemyLocation= _enemyLocations[Random.Range(0, 4)];
|
|
||||||
Vector3 spawnPosition = new Vector3(Random.Range(-SpawnValues.x, SpawnValues.x), SpawnValues.y, SpawnValues.z);
|
|
||||||
Quaternion spawnRotation = Quaternion.identity;
|
|
||||||
|
|
||||||
if(enemyLocation == "enemy_ship")
|
|
||||||
{
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>(enemyLocation);
|
|
||||||
var go = handle.InstantiateSync(spawnPosition, spawnRotation);
|
|
||||||
var bhv = go.GetComponent<EntityEnemy>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>(enemyLocation);
|
|
||||||
var go = handle.InstantiateSync(spawnPosition, spawnRotation);
|
|
||||||
var bhv = go.GetComponent<EntityAsteroid>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
yield return new WaitForSeconds(SpawnWait);
|
|
||||||
}
|
|
||||||
yield return new WaitForSeconds(WaveWait);
|
|
||||||
|
|
||||||
if (_gameOver)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GameOver()
|
|
||||||
{
|
|
||||||
_gameOver = true;
|
|
||||||
BattleEventDispatcher.SendGameOverMsg();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddScore(int score)
|
|
||||||
{
|
|
||||||
_totalScore += score;
|
|
||||||
BattleEventDispatcher.SendScoreChangeMsg(_totalScore);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
public class EntityAsteroid : MonoBehaviour
|
|
||||||
{
|
|
||||||
private AssetOperationHandle _ownerHandle;
|
|
||||||
|
|
||||||
public float MoveSpeed = -5f;
|
|
||||||
public float Tumble = 5f;
|
|
||||||
|
|
||||||
public void InitEntity(AssetOperationHandle ownerHandle)
|
|
||||||
{
|
|
||||||
_ownerHandle = ownerHandle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
var rigidBody = this.transform.GetComponent<Rigidbody>();
|
|
||||||
rigidBody.velocity = this.transform.forward * MoveSpeed;
|
|
||||||
rigidBody.angularVelocity = Random.insideUnitSphere * Tumble;
|
|
||||||
}
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_ownerHandle != null)
|
|
||||||
{
|
|
||||||
_ownerHandle.Release();
|
|
||||||
_ownerHandle = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
if (other.CompareTag("PlayerBullet"))
|
|
||||||
{
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>("explosion_asteroid");
|
|
||||||
var go = handle.InstantiateSync(other.transform.position, Quaternion.identity);
|
|
||||||
var bhv = go.GetComponent<EntityEffect>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
|
|
||||||
BattleRoom.Instance.AddScore(1);
|
|
||||||
GameObject.Destroy(this.gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void OnTriggerExit(Collider other)
|
|
||||||
{
|
|
||||||
if (other.CompareTag("Boundary"))
|
|
||||||
{
|
|
||||||
GameObject.Destroy(this.gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
public class EntityEffect : MonoBehaviour
|
|
||||||
{
|
|
||||||
private AssetOperationHandle _ownerHandle;
|
|
||||||
|
|
||||||
public float DelayDestroyTime = 1f;
|
|
||||||
|
|
||||||
public void InitEntity(AssetOperationHandle ownerHandle)
|
|
||||||
{
|
|
||||||
_ownerHandle = ownerHandle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
|
||||||
Invoke(nameof(DelayDestroy), DelayDestroyTime);
|
|
||||||
}
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_ownerHandle != null)
|
|
||||||
{
|
|
||||||
_ownerHandle.Release();
|
|
||||||
_ownerHandle = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DelayDestroy()
|
|
||||||
{
|
|
||||||
GameObject.Destroy(this.gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cb1f2313c4b23304f9257ac58c1024f8
|
guid: e2f6bcc746b3d984e81caafa7d25467b
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class BackgroundScroller : MonoBehaviour
|
public class BhvBackgroundScroller : MonoBehaviour
|
||||||
{
|
{
|
||||||
public float ScrollSpeed;
|
public float ScrollSpeed;
|
||||||
public float TileSizeZ;
|
public float TileSizeZ;
|
|
@ -0,0 +1,39 @@
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Event;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
public class Boot : MonoBehaviour
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 资源系统运行模式
|
||||||
|
/// </summary>
|
||||||
|
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
Debug.Log($"资源系统运行模式:{PlayMode}");
|
||||||
|
Application.targetFrameRate = 60;
|
||||||
|
Application.runInBackground = true;
|
||||||
|
}
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
// 初始化BetterStreaming
|
||||||
|
BetterStreamingAssets.Initialize();
|
||||||
|
|
||||||
|
// 初始化事件系统
|
||||||
|
UniEvent.Initalize();
|
||||||
|
|
||||||
|
// 初始化管理系统
|
||||||
|
UniModule.Initialize();
|
||||||
|
|
||||||
|
// 初始化资源系统
|
||||||
|
YooAssets.Initialize();
|
||||||
|
|
||||||
|
// 创建补丁管理器
|
||||||
|
UniModule.CreateModule<PatchManager>();
|
||||||
|
|
||||||
|
// 开始补丁更新流程
|
||||||
|
PatchManager.Instance.Run(PlayMode);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c64420b3b1ae37943b4565f458c10b7d
|
guid: 8428e7a0bb96bf946aa3034281990090
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -0,0 +1,119 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Event;
|
||||||
|
|
||||||
|
public class BattleEventDefine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 分数改变
|
||||||
|
/// </summary>
|
||||||
|
public class ScoreChange : IEventMessage
|
||||||
|
{
|
||||||
|
public int CurrentScores;
|
||||||
|
|
||||||
|
public static void SendEventMessage(int currentScores)
|
||||||
|
{
|
||||||
|
var msg = new ScoreChange();
|
||||||
|
msg.CurrentScores = currentScores;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 游戏结束
|
||||||
|
/// </summary>
|
||||||
|
public class GameOver : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new GameOver();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人死亡
|
||||||
|
/// </summary>
|
||||||
|
public class EnemyDead : IEventMessage
|
||||||
|
{
|
||||||
|
public Vector3 Position;
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
|
public static void SendEventMessage(Vector3 position, Quaternion rotation)
|
||||||
|
{
|
||||||
|
var msg = new EnemyDead();
|
||||||
|
msg.Position = position;
|
||||||
|
msg.Rotation = rotation;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家死亡
|
||||||
|
/// </summary>
|
||||||
|
public class PlayerDead : IEventMessage
|
||||||
|
{
|
||||||
|
public Vector3 Position;
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
|
public static void SendEventMessage(Vector3 position, Quaternion rotation)
|
||||||
|
{
|
||||||
|
var msg = new PlayerDead();
|
||||||
|
msg.Position = position;
|
||||||
|
msg.Rotation = rotation;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 小行星爆炸
|
||||||
|
/// </summary>
|
||||||
|
public class AsteroidExplosion : IEventMessage
|
||||||
|
{
|
||||||
|
public Vector3 Position;
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
|
public static void SendEventMessage(Vector3 position, Quaternion rotation)
|
||||||
|
{
|
||||||
|
var msg = new AsteroidExplosion();
|
||||||
|
msg.Position = position;
|
||||||
|
msg.Rotation = rotation;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人发射子弹
|
||||||
|
/// </summary>
|
||||||
|
public class EnemyFireBullet : IEventMessage
|
||||||
|
{
|
||||||
|
public Vector3 Position;
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
|
public static void SendEventMessage(Vector3 position, Quaternion rotation)
|
||||||
|
{
|
||||||
|
var msg = new EnemyFireBullet();
|
||||||
|
msg.Position = position;
|
||||||
|
msg.Rotation = rotation;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家发射子弹
|
||||||
|
/// </summary>
|
||||||
|
public class PlayerFireBullet : IEventMessage
|
||||||
|
{
|
||||||
|
public Vector3 Position;
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
|
public static void SendEventMessage(Vector3 position, Quaternion rotation)
|
||||||
|
{
|
||||||
|
var msg = new PlayerFireBullet();
|
||||||
|
msg.Position = position;
|
||||||
|
msg.Rotation = rotation;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
using UniFramework.Event;
|
||||||
|
|
||||||
|
public class PatchEventDefine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 补丁流程步骤改变
|
||||||
|
/// </summary>
|
||||||
|
public class PatchStatesChange : IEventMessage
|
||||||
|
{
|
||||||
|
public string Tips;
|
||||||
|
|
||||||
|
public static void SendEventMessage(string tips)
|
||||||
|
{
|
||||||
|
var msg = new PatchStatesChange();
|
||||||
|
msg.Tips = tips;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发现更新文件
|
||||||
|
/// </summary>
|
||||||
|
public class FoundUpdateFiles : IEventMessage
|
||||||
|
{
|
||||||
|
public int TotalCount;
|
||||||
|
public long TotalSizeBytes;
|
||||||
|
|
||||||
|
public static void SendEventMessage(int totalCount, long totalSizeBytes)
|
||||||
|
{
|
||||||
|
var msg = new FoundUpdateFiles();
|
||||||
|
msg.TotalCount = totalCount;
|
||||||
|
msg.TotalSizeBytes = totalSizeBytes;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下载进度更新
|
||||||
|
/// </summary>
|
||||||
|
public class DownloadProgressUpdate : IEventMessage
|
||||||
|
{
|
||||||
|
public int TotalDownloadCount;
|
||||||
|
public int CurrentDownloadCount;
|
||||||
|
public long TotalDownloadSizeBytes;
|
||||||
|
public long CurrentDownloadSizeBytes;
|
||||||
|
|
||||||
|
public static void SendEventMessage(int totalDownloadCount, int currentDownloadCount, long totalDownloadSizeBytes, long currentDownloadSizeBytes)
|
||||||
|
{
|
||||||
|
var msg = new DownloadProgressUpdate();
|
||||||
|
msg.TotalDownloadCount = totalDownloadCount;
|
||||||
|
msg.CurrentDownloadCount = currentDownloadCount;
|
||||||
|
msg.TotalDownloadSizeBytes = totalDownloadSizeBytes;
|
||||||
|
msg.CurrentDownloadSizeBytes = currentDownloadSizeBytes;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 资源版本号更新失败
|
||||||
|
/// </summary>
|
||||||
|
public class PackageVersionUpdateFailed : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new PackageVersionUpdateFailed();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 补丁清单更新失败
|
||||||
|
/// </summary>
|
||||||
|
public class PatchManifestUpdateFailed : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new PatchManifestUpdateFailed();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 网络文件下载失败
|
||||||
|
/// </summary>
|
||||||
|
public class WebFileDownloadFailed : IEventMessage
|
||||||
|
{
|
||||||
|
public string FileName;
|
||||||
|
public string Error;
|
||||||
|
|
||||||
|
public static void SendEventMessage(string fileName, string error)
|
||||||
|
{
|
||||||
|
var msg = new WebFileDownloadFailed();
|
||||||
|
msg.FileName = fileName;
|
||||||
|
msg.Error = error;
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
using UniFramework.Event;
|
||||||
|
|
||||||
|
public class SceneEventDefine
|
||||||
|
{
|
||||||
|
public class ChangeToHomeScene : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new ChangeToHomeScene();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeToBattleScene : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new ChangeToBattleScene();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 5915c7b5006a8384dbefdf32da34a3e6
|
guid: c56a83939686d3a4aa76b7d4ec704889
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
|
@ -0,0 +1,52 @@
|
||||||
|
using UniFramework.Event;
|
||||||
|
|
||||||
|
public class UserEventDefine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 用户开始下载网络文件
|
||||||
|
/// </summary>
|
||||||
|
public class UserBeginDownloadWebFiles : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new UserBeginDownloadWebFiles();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户尝试再次更新静态版本
|
||||||
|
/// </summary>
|
||||||
|
public class UserTryUpdatePackageVersion : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new UserTryUpdatePackageVersion();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户尝试再次更新补丁清单
|
||||||
|
/// </summary>
|
||||||
|
public class UserTryUpdatePatchManifest : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new UserTryUpdatePatchManifest();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户尝试再次下载网络文件
|
||||||
|
/// </summary>
|
||||||
|
public class UserTryDownloadWebFiles : IEventMessage
|
||||||
|
{
|
||||||
|
public static void SendEventMessage()
|
||||||
|
{
|
||||||
|
var msg = new UserTryDownloadWebFiles();
|
||||||
|
UniEvent.SendMessage(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: bcbf86a86eb115a41b6aa61fb0945d43
|
guid: 1bfe7ffc460fb234da96624844ab7e51
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1a79eedc3fa88c8429b085954a7e9093
|
guid: 2673676235c2ebf4790768011d015d1d
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -0,0 +1,43 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Pooling;
|
||||||
|
|
||||||
|
public class EntityAsteroid : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float MoveSpeed = -5f;
|
||||||
|
public float Tumble = 5f;
|
||||||
|
|
||||||
|
private SpawnHandle _handle;
|
||||||
|
private Rigidbody _rigidbody;
|
||||||
|
|
||||||
|
public void InitEntity(SpawnHandle handle)
|
||||||
|
{
|
||||||
|
_handle = handle;
|
||||||
|
|
||||||
|
_rigidbody.velocity = this.transform.forward * MoveSpeed;
|
||||||
|
_rigidbody.angularVelocity = Random.insideUnitSphere * Tumble;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
_rigidbody = this.transform.GetComponent<Rigidbody>();
|
||||||
|
}
|
||||||
|
void OnTriggerEnter(Collider other)
|
||||||
|
{
|
||||||
|
if (other.CompareTag("PlayerBullet"))
|
||||||
|
{
|
||||||
|
BattleEventDefine.AsteroidExplosion.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||||
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void OnTriggerExit(Collider other)
|
||||||
|
{
|
||||||
|
if (other.CompareTag("Boundary"))
|
||||||
|
{
|
||||||
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,32 +1,25 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using YooAsset;
|
using UniFramework.Pooling;
|
||||||
|
|
||||||
public class EntityBullet : MonoBehaviour
|
public class EntityBullet : MonoBehaviour
|
||||||
{
|
{
|
||||||
private AssetOperationHandle _ownerHandle;
|
|
||||||
|
|
||||||
public float MoveSpeed = 20f;
|
public float MoveSpeed = 20f;
|
||||||
public float DelayDestroyTime = 5f;
|
public float DelayDestroyTime = 5f;
|
||||||
|
|
||||||
public void InitEntity(AssetOperationHandle ownerHandle)
|
private SpawnHandle _handle;
|
||||||
|
private Rigidbody _rigidbody;
|
||||||
|
|
||||||
|
public void InitEntity(SpawnHandle handle)
|
||||||
{
|
{
|
||||||
_ownerHandle = ownerHandle;
|
_handle = handle;
|
||||||
|
_rigidbody.velocity = this.transform.forward * MoveSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
var rigidBody = this.transform.GetComponent<Rigidbody>();
|
_rigidbody = this.transform.GetComponent<Rigidbody>();
|
||||||
rigidBody.velocity = this.transform.forward * MoveSpeed;
|
|
||||||
}
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_ownerHandle != null)
|
|
||||||
{
|
|
||||||
_ownerHandle.Release();
|
|
||||||
_ownerHandle = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void OnTriggerEnter(Collider other)
|
void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
|
@ -36,20 +29,27 @@ public class EntityBullet : MonoBehaviour
|
||||||
if (this.gameObject.CompareTag("EnemyBullet"))
|
if (this.gameObject.CompareTag("EnemyBullet"))
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Enemy") == false)
|
if (other.CompareTag("Enemy") == false)
|
||||||
GameObject.Destroy(this.gameObject);
|
{
|
||||||
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.gameObject.CompareTag("PlayerBullet"))
|
if (this.gameObject.CompareTag("PlayerBullet"))
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Player") == false)
|
if (other.CompareTag("Player") == false)
|
||||||
GameObject.Destroy(this.gameObject);
|
{
|
||||||
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void OnTriggerExit(Collider other)
|
void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Boundary"))
|
if (other.CompareTag("Boundary"))
|
||||||
{
|
{
|
||||||
GameObject.Destroy(this.gameObject);
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Pooling;
|
||||||
|
|
||||||
|
public class EntityEffect : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float DelayDestroyTime = 1f;
|
||||||
|
|
||||||
|
private SpawnHandle _handle;
|
||||||
|
|
||||||
|
public void InitEntity(SpawnHandle handle)
|
||||||
|
{
|
||||||
|
_handle = handle;
|
||||||
|
|
||||||
|
Invoke(nameof(DelayDestroy), DelayDestroyTime);
|
||||||
|
}
|
||||||
|
private void DelayDestroy()
|
||||||
|
{
|
||||||
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using YooAsset;
|
using UniFramework.Pooling;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
public class EntityEnemy : MonoBehaviour
|
public class EntityEnemy : MonoBehaviour
|
||||||
|
@ -9,8 +9,6 @@ public class EntityEnemy : MonoBehaviour
|
||||||
private const float Dodge = 5f;
|
private const float Dodge = 5f;
|
||||||
private const float Smoothing = 7.5f;
|
private const float Smoothing = 7.5f;
|
||||||
|
|
||||||
private AssetOperationHandle _ownerHandle;
|
|
||||||
|
|
||||||
public RoomBoundary Boundary;
|
public RoomBoundary Boundary;
|
||||||
public float MoveSpeed = 20f;
|
public float MoveSpeed = 20f;
|
||||||
public float FireInterval = 2f;
|
public float FireInterval = 2f;
|
||||||
|
@ -19,17 +17,24 @@ public class EntityEnemy : MonoBehaviour
|
||||||
public Vector2 ManeuverTime = new Vector2(1, 2);
|
public Vector2 ManeuverTime = new Vector2(1, 2);
|
||||||
public Vector2 ManeuverWait = new Vector2(1, 2);
|
public Vector2 ManeuverWait = new Vector2(1, 2);
|
||||||
|
|
||||||
|
private SpawnHandle _handle;
|
||||||
private Transform _shotSpawn;
|
private Transform _shotSpawn;
|
||||||
private Rigidbody _rigidbody;
|
private Rigidbody _rigidbody;
|
||||||
private AudioSource _audioSource;
|
private AudioSource _audioSource;
|
||||||
private float _lastFireTime = 0f;
|
private float _lastFireTime = 0f;
|
||||||
|
private float _currentSpeed;
|
||||||
|
private float _targetManeuver;
|
||||||
|
|
||||||
float _currentSpeed;
|
|
||||||
float targetManeuver;
|
|
||||||
|
|
||||||
public void InitEntity(AssetOperationHandle ownerHandle)
|
public void InitEntity(SpawnHandle handle)
|
||||||
{
|
{
|
||||||
_ownerHandle = ownerHandle;
|
_handle = handle;
|
||||||
|
|
||||||
|
_rigidbody.velocity = this.transform.forward * -5f;
|
||||||
|
_lastFireTime = Time.time;
|
||||||
|
_currentSpeed = _rigidbody.velocity.z;
|
||||||
|
_targetManeuver = 0f;
|
||||||
|
StartCoroutine(Evade());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
@ -37,40 +42,19 @@ public class EntityEnemy : MonoBehaviour
|
||||||
_rigidbody = this.gameObject.GetComponent<Rigidbody>();
|
_rigidbody = this.gameObject.GetComponent<Rigidbody>();
|
||||||
_audioSource = this.gameObject.GetComponent<AudioSource>();
|
_audioSource = this.gameObject.GetComponent<AudioSource>();
|
||||||
_shotSpawn = this.transform.Find("shot_spawn");
|
_shotSpawn = this.transform.Find("shot_spawn");
|
||||||
|
|
||||||
_rigidbody.velocity = this.transform.forward * -5f;
|
|
||||||
_currentSpeed = _rigidbody.velocity.z;
|
|
||||||
StartCoroutine(Evade());
|
|
||||||
}
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
_lastFireTime = Time.time;
|
|
||||||
}
|
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_ownerHandle != null)
|
|
||||||
{
|
|
||||||
_ownerHandle.Release();
|
|
||||||
_ownerHandle = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (Time.time - _lastFireTime >= FireInterval)
|
if (Time.time - _lastFireTime >= FireInterval)
|
||||||
{
|
{
|
||||||
_lastFireTime = Time.time;
|
_lastFireTime = Time.time;
|
||||||
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>("enemy_bullet");
|
|
||||||
var go = handle.InstantiateSync(_shotSpawn.position, _shotSpawn.rotation);
|
|
||||||
var bhv = go.GetComponent<EntityBullet>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
|
|
||||||
_audioSource.Play();
|
_audioSource.Play();
|
||||||
|
BattleEventDefine.EnemyFireBullet.SendEventMessage(_shotSpawn.position, _shotSpawn.rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void FixedUpdate()
|
void FixedUpdate()
|
||||||
{
|
{
|
||||||
float newManeuver = Mathf.MoveTowards(_rigidbody.velocity.x, targetManeuver, Smoothing * Time.deltaTime);
|
float newManeuver = Mathf.MoveTowards(_rigidbody.velocity.x, _targetManeuver, Smoothing * Time.deltaTime);
|
||||||
_rigidbody.velocity = new Vector3(newManeuver, 0.0f, _currentSpeed);
|
_rigidbody.velocity = new Vector3(newManeuver, 0.0f, _currentSpeed);
|
||||||
_rigidbody.position = new Vector3
|
_rigidbody.position = new Vector3
|
||||||
(
|
(
|
||||||
|
@ -86,20 +70,17 @@ public class EntityEnemy : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (other.CompareTag("PlayerBullet"))
|
if (other.CompareTag("PlayerBullet"))
|
||||||
{
|
{
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>("explosion_enemy");
|
BattleEventDefine.EnemyDead.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||||
var go = handle.InstantiateSync(this.transform.position, this.transform.rotation);
|
_handle.Restore();
|
||||||
var bhv = go.GetComponent<EntityEffect>();
|
_handle = null;
|
||||||
bhv.InitEntity(handle);
|
|
||||||
|
|
||||||
BattleRoom.Instance.AddScore(10);
|
|
||||||
GameObject.Destroy(this.gameObject);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void OnTriggerExit(Collider other)
|
void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Boundary"))
|
if (other.CompareTag("Boundary"))
|
||||||
{
|
{
|
||||||
GameObject.Destroy(this.gameObject);
|
_handle.Restore();
|
||||||
|
_handle = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,9 +89,9 @@ public class EntityEnemy : MonoBehaviour
|
||||||
yield return new WaitForSeconds(Random.Range(StartWait.x, StartWait.y));
|
yield return new WaitForSeconds(Random.Range(StartWait.x, StartWait.y));
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
targetManeuver = Random.Range(1, Dodge) * -Mathf.Sign(transform.position.x);
|
_targetManeuver = Random.Range(1, Dodge) * -Mathf.Sign(transform.position.x);
|
||||||
yield return new WaitForSeconds(Random.Range(ManeuverTime.x, ManeuverTime.y));
|
yield return new WaitForSeconds(Random.Range(ManeuverTime.x, ManeuverTime.y));
|
||||||
targetManeuver = 0;
|
_targetManeuver = 0;
|
||||||
yield return new WaitForSeconds(Random.Range(ManeuverWait.x, ManeuverWait.y));
|
yield return new WaitForSeconds(Random.Range(ManeuverWait.x, ManeuverWait.y));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,24 +1,23 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using YooAsset;
|
using UniFramework.Pooling;
|
||||||
|
|
||||||
public class EntityPlayer : MonoBehaviour
|
public class EntityPlayer : MonoBehaviour
|
||||||
{
|
{
|
||||||
private AssetOperationHandle _ownerHandle;
|
|
||||||
|
|
||||||
public RoomBoundary Boundary;
|
public RoomBoundary Boundary;
|
||||||
public float MoveSpeed = 10f;
|
public float MoveSpeed = 10f;
|
||||||
public float FireRate = 0.25f;
|
public float FireRate = 0.25f;
|
||||||
|
|
||||||
|
private SpawnHandle _handle;
|
||||||
private float _nextFireTime = 0f;
|
private float _nextFireTime = 0f;
|
||||||
private Transform _shotSpawn;
|
private Transform _shotSpawn;
|
||||||
private Rigidbody _rigidbody;
|
private Rigidbody _rigidbody;
|
||||||
private AudioSource _audioSource;
|
private AudioSource _audioSource;
|
||||||
|
|
||||||
public void InitEntity(AssetOperationHandle ownerHandle)
|
public void InitEntity(SpawnHandle handle)
|
||||||
{
|
{
|
||||||
_ownerHandle = ownerHandle;
|
_handle = handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
|
@ -27,26 +26,13 @@ public class EntityPlayer : MonoBehaviour
|
||||||
_audioSource = this.gameObject.GetComponent<AudioSource>();
|
_audioSource = this.gameObject.GetComponent<AudioSource>();
|
||||||
_shotSpawn = this.transform.Find("shot_spawn");
|
_shotSpawn = this.transform.Find("shot_spawn");
|
||||||
}
|
}
|
||||||
void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_ownerHandle != null)
|
|
||||||
{
|
|
||||||
_ownerHandle.Release();
|
|
||||||
_ownerHandle = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetButton("Fire1") && Time.time > _nextFireTime)
|
if (Input.GetButton("Fire1") && Time.time > _nextFireTime)
|
||||||
{
|
{
|
||||||
_nextFireTime = Time.time + FireRate;
|
_nextFireTime = Time.time + FireRate;
|
||||||
|
|
||||||
var handle = YooAssets.LoadAssetSync<GameObject>("player_bullet");
|
|
||||||
var go = handle.InstantiateSync(_shotSpawn.position, _shotSpawn.rotation);
|
|
||||||
var bhv = go.GetComponent<EntityBullet>();
|
|
||||||
bhv.InitEntity(handle);
|
|
||||||
|
|
||||||
_audioSource.Play();
|
_audioSource.Play();
|
||||||
|
BattleEventDefine.PlayerFireBullet.SendEventMessage(_shotSpawn.position, _shotSpawn.rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void FixedUpdate()
|
void FixedUpdate()
|
||||||
|
@ -56,7 +42,6 @@ public class EntityPlayer : MonoBehaviour
|
||||||
|
|
||||||
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
|
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
|
||||||
_rigidbody.velocity = movement * MoveSpeed;
|
_rigidbody.velocity = movement * MoveSpeed;
|
||||||
|
|
||||||
_rigidbody.position = new Vector3
|
_rigidbody.position = new Vector3
|
||||||
(
|
(
|
||||||
Mathf.Clamp(GetComponent<Rigidbody>().position.x, Boundary.xMin, Boundary.xMax),
|
Mathf.Clamp(GetComponent<Rigidbody>().position.x, Boundary.xMin, Boundary.xMax),
|
||||||
|
@ -71,13 +56,9 @@ public class EntityPlayer : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (other.CompareTag("Enemy") || other.CompareTag("EnemyBullet") || other.CompareTag("Asteroid"))
|
if (other.CompareTag("Enemy") || other.CompareTag("EnemyBullet") || other.CompareTag("Asteroid"))
|
||||||
{
|
{
|
||||||
var explosionHandle = YooAssets.LoadAssetSync<GameObject>("explosion_player");
|
BattleEventDefine.PlayerDead.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||||
var go = explosionHandle.InstantiateSync(this.transform.position, this.transform.rotation);
|
_handle.Restore();
|
||||||
var bhv = go.GetComponent<EntityEffect>();
|
_handle = null;
|
||||||
bhv.InitEntity(explosionHandle);
|
|
||||||
|
|
||||||
BattleRoom.Instance.GameOver();
|
|
||||||
GameObject.Destroy(this.gameObject);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e214524cdc329d646b50bf3e8ba8e7a0
|
guid: beab7f759234b61469afb94f517f959b
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
|
@ -0,0 +1,38 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Pooling;
|
||||||
|
using UniFramework.Window;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
internal class FsmInitGame : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
var handle = YooAssets.LoadAssetSync<GameObject>("UICanvas");
|
||||||
|
var canvas = handle.InstantiateSync();
|
||||||
|
var desktop = canvas.transform.Find("Desktop").gameObject;
|
||||||
|
GameObject.DontDestroyOnLoad(canvas);
|
||||||
|
|
||||||
|
// 初始化窗口系统
|
||||||
|
UniWindow.Initalize(desktop);
|
||||||
|
|
||||||
|
// 初始化对象池系统
|
||||||
|
UniPooling.Initalize();
|
||||||
|
|
||||||
|
_machine.ChangeState<FsmSceneHome>();
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 40fe73297598be84fb8dadedd4dd17e6
|
guid: 35d459ebb0d7dc947b7b62d1f64a412f
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
|
@ -0,0 +1,48 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Window;
|
||||||
|
using UniFramework.Event;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
internal class FsmSceneBattle : IStateNode
|
||||||
|
{
|
||||||
|
private BattleRoom _battleRoom;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
UniWindow.OpenWindowSync<UILoadingWindow>("UILoading");
|
||||||
|
|
||||||
|
UniModule.StartCoroutine(Prepare());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
if(_battleRoom != null)
|
||||||
|
_battleRoom.UpdateRoom();
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
if(_battleRoom != null)
|
||||||
|
{
|
||||||
|
_battleRoom.DestroyRoom();
|
||||||
|
_battleRoom = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator Prepare()
|
||||||
|
{
|
||||||
|
yield return YooAssets.LoadSceneAsync("scene_battle");
|
||||||
|
|
||||||
|
_battleRoom = new BattleRoom();
|
||||||
|
yield return _battleRoom.LoadRoom();
|
||||||
|
|
||||||
|
// 等所有数据准备完毕后,关闭加载界面。
|
||||||
|
UniWindow.CloseWindow<UILoadingWindow>();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 195a0b4317373b44d9289d7b0529eb7c
|
guid: 54061fd8bcab2344e87b0faf0464c179
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
|
@ -0,0 +1,41 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Window;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
internal class FsmSceneHome : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
if (_machine.PreviousNode != typeof(FsmInitGame).FullName)
|
||||||
|
UniWindow.OpenWindowSync<UILoadingWindow>("UILoading");
|
||||||
|
|
||||||
|
UniModule.StartCoroutine(Prepare());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
UniWindow.CloseWindow<UIHomeWindow>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator Prepare()
|
||||||
|
{
|
||||||
|
yield return YooAssets.LoadSceneAsync("scene_home");
|
||||||
|
yield return UniWindow.OpenWindowAsync<UIHomeWindow>("UIHome");
|
||||||
|
yield return new WaitForSeconds(0.5f);
|
||||||
|
|
||||||
|
// 等所有数据准备完毕后,关闭加载界面。
|
||||||
|
UniWindow.CloseWindow<UILoadingWindow>();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 41730f8e5f2b6e64abc4a03035c61ea5
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,64 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Event;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
|
||||||
|
public class GameManager : ModuleSingleton<GameManager>, IModule
|
||||||
|
{
|
||||||
|
private bool _isRun = false;
|
||||||
|
private EventGroup _eventGroup = new EventGroup();
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IModule.OnCreate(object createParam)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IModule.OnDestroy()
|
||||||
|
{
|
||||||
|
_eventGroup.RemoveAllListener();
|
||||||
|
}
|
||||||
|
void IModule.OnUpdate()
|
||||||
|
{
|
||||||
|
if (_machine != null)
|
||||||
|
_machine.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
if (_isRun == false)
|
||||||
|
{
|
||||||
|
_isRun = true;
|
||||||
|
|
||||||
|
// 注册监听事件
|
||||||
|
_eventGroup.AddListener<SceneEventDefine.ChangeToHomeScene>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<SceneEventDefine.ChangeToBattleScene>(OnHandleEventMessage);
|
||||||
|
|
||||||
|
Debug.Log("开启游戏流程...");
|
||||||
|
_machine = new StateMachine(this);
|
||||||
|
_machine.AddNode<FsmInitGame>();
|
||||||
|
_machine.AddNode<FsmSceneHome>();
|
||||||
|
_machine.AddNode<FsmSceneBattle>();
|
||||||
|
_machine.Run<FsmInitGame>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning("补丁更新已经正在进行中!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接收事件
|
||||||
|
/// </summary>
|
||||||
|
private void OnHandleEventMessage(IEventMessage message)
|
||||||
|
{
|
||||||
|
if(message is SceneEventDefine.ChangeToHomeScene)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmSceneHome>();
|
||||||
|
}
|
||||||
|
else if(message is SceneEventDefine.ChangeToBattleScene)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmSceneBattle>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f6630e7de79efb24b9263519ba4282e1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7866629ff257c6d4d84cd9dab5d0b000
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,257 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Window;
|
||||||
|
using UniFramework.Pooling;
|
||||||
|
using UniFramework.Event;
|
||||||
|
using UniFramework.Utility;
|
||||||
|
using YooAsset;
|
||||||
|
using Random = UnityEngine.Random;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class RoomBoundary
|
||||||
|
{
|
||||||
|
public float xMin, xMax, zMin, zMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 战斗房间
|
||||||
|
/// </summary>
|
||||||
|
public class BattleRoom
|
||||||
|
{
|
||||||
|
private enum ESteps
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Ready,
|
||||||
|
Spawn,
|
||||||
|
WaitSpawn,
|
||||||
|
WaitWave,
|
||||||
|
GameOver,
|
||||||
|
}
|
||||||
|
|
||||||
|
private EventGroup _eventGroup = new EventGroup();
|
||||||
|
private Spawner _entitySpawner;
|
||||||
|
private GameObject _roomRoot;
|
||||||
|
private AssetOperationHandle _musicHandle;
|
||||||
|
|
||||||
|
// 关卡参数
|
||||||
|
private const int EnemyCount = 10;
|
||||||
|
private const int EnemyScore = 10;
|
||||||
|
private const int AsteroidScore = 1;
|
||||||
|
private readonly Vector3 _spawnValues = new Vector3(6, 0, 20);
|
||||||
|
private readonly string[] _entityLocations = new string[]
|
||||||
|
{
|
||||||
|
"asteroid01", "asteroid02", "asteroid03", "enemy_ship"
|
||||||
|
};
|
||||||
|
|
||||||
|
private ESteps _steps = ESteps.None;
|
||||||
|
private int _totalScore = 0;
|
||||||
|
private int _waveSpawnCount = 0;
|
||||||
|
|
||||||
|
private UniTimer _startWaitTimer = UniTimer.CreateOnceTimer(1f);
|
||||||
|
private UniTimer _spawnWaitTimer = UniTimer.CreateOnceTimer(0.75f);
|
||||||
|
private UniTimer _waveWaitTimer = UniTimer.CreateOnceTimer(4f);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 销毁房间
|
||||||
|
/// </summary>
|
||||||
|
public void DestroyRoom()
|
||||||
|
{
|
||||||
|
if (_musicHandle != null)
|
||||||
|
_musicHandle.Release();
|
||||||
|
|
||||||
|
if (_eventGroup != null)
|
||||||
|
_eventGroup.RemoveAllListener();
|
||||||
|
|
||||||
|
if (_entitySpawner != null)
|
||||||
|
_entitySpawner.DestroyAll(true);
|
||||||
|
|
||||||
|
if (_roomRoot != null)
|
||||||
|
GameObject.Destroy(_roomRoot);
|
||||||
|
|
||||||
|
UniWindow.CloseWindow<UIBattleWindow>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新房间
|
||||||
|
/// </summary>
|
||||||
|
public void UpdateRoom()
|
||||||
|
{
|
||||||
|
if (_steps == ESteps.None || _steps == ESteps.GameOver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_steps == ESteps.Ready)
|
||||||
|
{
|
||||||
|
if (_startWaitTimer.Update(Time.deltaTime))
|
||||||
|
{
|
||||||
|
_steps = ESteps.Spawn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_steps == ESteps.Spawn)
|
||||||
|
{
|
||||||
|
var enemyLocation = _entityLocations[Random.Range(0, 4)];
|
||||||
|
Vector3 spawnPosition = new Vector3(Random.Range(-_spawnValues.x, _spawnValues.x), _spawnValues.y, _spawnValues.z);
|
||||||
|
Quaternion spawnRotation = Quaternion.identity;
|
||||||
|
|
||||||
|
if (enemyLocation == "enemy_ship")
|
||||||
|
{
|
||||||
|
// 生成敌人实体
|
||||||
|
var handle = _entitySpawner.SpawnSync(enemyLocation, _roomRoot.transform, spawnPosition, spawnRotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityEnemy>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 生成小行星实体
|
||||||
|
var handle = _entitySpawner.SpawnSync(enemyLocation, _roomRoot.transform, spawnPosition, spawnRotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityAsteroid>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
_waveSpawnCount++;
|
||||||
|
if (_waveSpawnCount >= EnemyCount)
|
||||||
|
{
|
||||||
|
_steps = ESteps.WaitWave;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_steps = ESteps.WaitSpawn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_steps == ESteps.WaitSpawn)
|
||||||
|
{
|
||||||
|
if (_spawnWaitTimer.Update(Time.deltaTime))
|
||||||
|
{
|
||||||
|
_spawnWaitTimer.Reset();
|
||||||
|
_steps = ESteps.Spawn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_steps == ESteps.WaitWave)
|
||||||
|
{
|
||||||
|
if (_waveWaitTimer.Update(Time.deltaTime))
|
||||||
|
{
|
||||||
|
_waveWaitTimer.Reset();
|
||||||
|
_waveSpawnCount = 0;
|
||||||
|
_steps = ESteps.Spawn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载房间
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerator LoadRoom()
|
||||||
|
{
|
||||||
|
// 创建房间根对象
|
||||||
|
_roomRoot = new GameObject("BattleRoom");
|
||||||
|
|
||||||
|
// 加载背景音乐
|
||||||
|
_musicHandle = YooAssets.LoadAssetAsync<AudioClip>("music_background");
|
||||||
|
yield return _musicHandle;
|
||||||
|
|
||||||
|
// 播放背景音乐
|
||||||
|
var audioSource = _roomRoot.AddComponent<AudioSource>();
|
||||||
|
audioSource.loop = true;
|
||||||
|
audioSource.clip = _musicHandle.AssetObject as AudioClip;
|
||||||
|
audioSource.Play();
|
||||||
|
|
||||||
|
// 创建游戏对象发生器
|
||||||
|
_entitySpawner = UniPooling.CreateSpawner("DefaultPackage");
|
||||||
|
|
||||||
|
// 创建游戏对象池
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("player_ship");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("player_bullet");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("enemy_ship");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("enemy_bullet");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("asteroid01");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("asteroid02");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("asteroid03");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("explosion_asteroid");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("explosion_enemy");
|
||||||
|
yield return _entitySpawner.CreateGameObjectPoolAsync("explosion_player");
|
||||||
|
|
||||||
|
// 创建玩家实体对象
|
||||||
|
var handle = _entitySpawner.SpawnSync("player_ship");
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityPlayer>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
|
||||||
|
// 显示战斗界面
|
||||||
|
yield return UniWindow.OpenWindowAsync<UIBattleWindow>("UIBattle");
|
||||||
|
|
||||||
|
// 监听游戏事件
|
||||||
|
_eventGroup.AddListener<BattleEventDefine.PlayerDead>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<BattleEventDefine.EnemyDead>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<BattleEventDefine.AsteroidExplosion>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<BattleEventDefine.PlayerFireBullet>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<BattleEventDefine.EnemyFireBullet>(OnHandleEventMessage);
|
||||||
|
|
||||||
|
_steps = ESteps.Ready;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接收事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
private void OnHandleEventMessage(IEventMessage message)
|
||||||
|
{
|
||||||
|
if (message is BattleEventDefine.PlayerDead)
|
||||||
|
{
|
||||||
|
var msg = message as BattleEventDefine.PlayerDead;
|
||||||
|
|
||||||
|
// 创建爆炸效果
|
||||||
|
var handle = _entitySpawner.SpawnSync("explosion_player", _roomRoot.transform, msg.Position, msg.Rotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityEffect>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
|
||||||
|
_steps = ESteps.GameOver;
|
||||||
|
BattleEventDefine.GameOver.SendEventMessage();
|
||||||
|
}
|
||||||
|
else if (message is BattleEventDefine.EnemyDead)
|
||||||
|
{
|
||||||
|
var msg = message as BattleEventDefine.EnemyDead;
|
||||||
|
|
||||||
|
// 创建爆炸效果
|
||||||
|
var handle = _entitySpawner.SpawnSync("explosion_enemy", _roomRoot.transform, msg.Position, msg.Rotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityEffect>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
|
||||||
|
_totalScore += EnemyScore;
|
||||||
|
BattleEventDefine.ScoreChange.SendEventMessage(_totalScore);
|
||||||
|
}
|
||||||
|
else if (message is BattleEventDefine.AsteroidExplosion)
|
||||||
|
{
|
||||||
|
var msg = message as BattleEventDefine.AsteroidExplosion;
|
||||||
|
|
||||||
|
// 创建爆炸效果
|
||||||
|
var handle = _entitySpawner.SpawnSync("explosion_asteroid", _roomRoot.transform, msg.Position, msg.Rotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityEffect>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
|
||||||
|
_totalScore += AsteroidScore;
|
||||||
|
BattleEventDefine.ScoreChange.SendEventMessage(_totalScore);
|
||||||
|
}
|
||||||
|
else if (message is BattleEventDefine.PlayerFireBullet)
|
||||||
|
{
|
||||||
|
var msg = message as BattleEventDefine.PlayerFireBullet;
|
||||||
|
|
||||||
|
// 创建子弹实体
|
||||||
|
var handle = _entitySpawner.SpawnSync("player_bullet", _roomRoot.transform, msg.Position, msg.Rotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityBullet>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
}
|
||||||
|
else if (message is BattleEventDefine.EnemyFireBullet)
|
||||||
|
{
|
||||||
|
var msg = message as BattleEventDefine.EnemyFireBullet;
|
||||||
|
|
||||||
|
// 创建子弹实体
|
||||||
|
var handle = _entitySpawner.SpawnSync("enemy_bullet", _roomRoot.transform, msg.Position, msg.Rotation);
|
||||||
|
var entity = handle.GameObj.GetComponent<EntityBullet>();
|
||||||
|
entity.InitEntity(handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 43ab5a1b8ae5c2b4a8995952e7e01f3f
|
guid: d4dfc5f1cace4e8469e496d83b254ac7
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
|
@ -1,45 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
public class EventGroup
|
|
||||||
{
|
|
||||||
private readonly Dictionary<System.Type, List<Action<IEventMessage>>> _cachedListener = new Dictionary<System.Type, List<Action<IEventMessage>>>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 添加一个监听
|
|
||||||
/// </summary>
|
|
||||||
public void AddListener<TEvent>(System.Action<IEventMessage> listener) where TEvent : IEventMessage
|
|
||||||
{
|
|
||||||
System.Type eventType = typeof(TEvent);
|
|
||||||
if (_cachedListener.ContainsKey(eventType) == false)
|
|
||||||
_cachedListener.Add(eventType, new List<Action<IEventMessage>>());
|
|
||||||
|
|
||||||
if (_cachedListener[eventType].Contains(listener) == false)
|
|
||||||
{
|
|
||||||
_cachedListener[eventType].Add(listener);
|
|
||||||
EventManager.AddListener(eventType, listener);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UnityEngine.Debug.LogWarning($"Event listener is exist : {eventType}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 移除所有缓存的监听
|
|
||||||
/// </summary>
|
|
||||||
public void RemoveAllListener()
|
|
||||||
{
|
|
||||||
foreach (var pair in _cachedListener)
|
|
||||||
{
|
|
||||||
System.Type eventType = pair.Key;
|
|
||||||
for (int i = 0; i < pair.Value.Count; i++)
|
|
||||||
{
|
|
||||||
EventManager.RemoveListener(eventType, pair.Value[i]);
|
|
||||||
}
|
|
||||||
pair.Value.Clear();
|
|
||||||
}
|
|
||||||
_cachedListener.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,171 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 事件管理器
|
|
||||||
/// </summary>
|
|
||||||
public static class EventManager
|
|
||||||
{
|
|
||||||
private class PostWrapper
|
|
||||||
{
|
|
||||||
public int PostFrame;
|
|
||||||
public int EventID;
|
|
||||||
public IEventMessage Message;
|
|
||||||
|
|
||||||
public void OnRelease()
|
|
||||||
{
|
|
||||||
PostFrame = 0;
|
|
||||||
EventID = 0;
|
|
||||||
Message = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static readonly Dictionary<int, List<Action<IEventMessage>>> _listeners = new Dictionary<int, List<Action<IEventMessage>>>(1000);
|
|
||||||
private static readonly List<PostWrapper> _postWrappers = new List<PostWrapper>(1000);
|
|
||||||
|
|
||||||
|
|
||||||
public static void Update()
|
|
||||||
{
|
|
||||||
for (int i = _postWrappers.Count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
var wrapper = _postWrappers[i];
|
|
||||||
if (UnityEngine.Time.frameCount > wrapper.PostFrame)
|
|
||||||
{
|
|
||||||
SendMessage(wrapper.EventID, wrapper.Message);
|
|
||||||
_postWrappers.RemoveAt(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 添加监听
|
|
||||||
/// </summary>
|
|
||||||
public static void AddListener<TEvent>(System.Action<IEventMessage> listener) where TEvent : IEventMessage
|
|
||||||
{
|
|
||||||
AddListener(typeof(TEvent), listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 添加监听
|
|
||||||
/// </summary>
|
|
||||||
public static void AddListener(System.Type eventType, System.Action<IEventMessage> listener)
|
|
||||||
{
|
|
||||||
int eventId = eventType.GetHashCode();
|
|
||||||
AddListener(eventId, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 添加监听
|
|
||||||
/// </summary>
|
|
||||||
public static void AddListener(int eventId, System.Action<IEventMessage> listener)
|
|
||||||
{
|
|
||||||
if (_listeners.ContainsKey(eventId) == false)
|
|
||||||
_listeners.Add(eventId, new List<Action<IEventMessage>>());
|
|
||||||
if (_listeners[eventId].Contains(listener) == false)
|
|
||||||
_listeners[eventId].Add(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 移除监听
|
|
||||||
/// </summary>
|
|
||||||
public static void RemoveListener<TEvent>(System.Action<IEventMessage> listener) where TEvent : IEventMessage
|
|
||||||
{
|
|
||||||
RemoveListener(typeof(TEvent), listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 移除监听
|
|
||||||
/// </summary>
|
|
||||||
public static void RemoveListener(System.Type eventType, System.Action<IEventMessage> listener)
|
|
||||||
{
|
|
||||||
int eventId = eventType.GetHashCode();
|
|
||||||
RemoveListener(eventId, listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 移除监听
|
|
||||||
/// </summary>
|
|
||||||
public static void RemoveListener(int eventId, System.Action<IEventMessage> listener)
|
|
||||||
{
|
|
||||||
if (_listeners.ContainsKey(eventId))
|
|
||||||
{
|
|
||||||
if (_listeners[eventId].Contains(listener))
|
|
||||||
_listeners[eventId].Remove(listener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实时广播事件
|
|
||||||
/// </summary>
|
|
||||||
public static void SendMessage(IEventMessage message)
|
|
||||||
{
|
|
||||||
int eventId = message.GetType().GetHashCode();
|
|
||||||
SendMessage(eventId, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实时广播事件
|
|
||||||
/// </summary>
|
|
||||||
public static void SendMessage(int eventId, IEventMessage message)
|
|
||||||
{
|
|
||||||
if (_listeners.ContainsKey(eventId) == false)
|
|
||||||
return;
|
|
||||||
|
|
||||||
List<Action<IEventMessage>> listeners = _listeners[eventId];
|
|
||||||
for (int i = listeners.Count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
listeners[i].Invoke(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 延迟广播事件
|
|
||||||
/// </summary>
|
|
||||||
public static void PostMessage(IEventMessage message)
|
|
||||||
{
|
|
||||||
int eventId = message.GetType().GetHashCode();
|
|
||||||
PostMessage(eventId, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 延迟广播事件
|
|
||||||
/// </summary>
|
|
||||||
public static void PostMessage(int eventId, IEventMessage message)
|
|
||||||
{
|
|
||||||
var wrapper = new PostWrapper();
|
|
||||||
wrapper.PostFrame = UnityEngine.Time.frameCount;
|
|
||||||
wrapper.EventID = eventId;
|
|
||||||
wrapper.Message = message;
|
|
||||||
_postWrappers.Add(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 清空所有监听
|
|
||||||
/// </summary>
|
|
||||||
public static void ClearListeners()
|
|
||||||
{
|
|
||||||
foreach (int eventId in _listeners.Keys)
|
|
||||||
{
|
|
||||||
_listeners[eventId].Clear();
|
|
||||||
}
|
|
||||||
_listeners.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取监听者总数
|
|
||||||
/// </summary>
|
|
||||||
private static int GetAllListenerCount()
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
foreach (var list in _listeners)
|
|
||||||
{
|
|
||||||
count += list.Value.Count;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
public interface IEventMessage
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,121 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 有限状态机
|
|
||||||
/// </summary>
|
|
||||||
public static class FsmManager
|
|
||||||
{
|
|
||||||
private static readonly List<IFsmNode> _nodes = new List<IFsmNode>();
|
|
||||||
private static IFsmNode _curNode;
|
|
||||||
private static IFsmNode _preNode;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 当前运行的节点名称
|
|
||||||
/// </summary>
|
|
||||||
public static string CurrentNodeName
|
|
||||||
{
|
|
||||||
get { return _curNode != null ? _curNode.Name : string.Empty; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 之前运行的节点名称
|
|
||||||
/// </summary>
|
|
||||||
public static string PreviousNodeName
|
|
||||||
{
|
|
||||||
get { return _preNode != null ? _preNode.Name : string.Empty; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 启动状态机
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="entryNode">入口节点</param>
|
|
||||||
public static void Run(string entryNode)
|
|
||||||
{
|
|
||||||
_curNode = GetNode(entryNode);
|
|
||||||
_preNode = GetNode(entryNode);
|
|
||||||
|
|
||||||
if (_curNode != null)
|
|
||||||
_curNode.OnEnter();
|
|
||||||
else
|
|
||||||
UnityEngine.Debug.LogError($"Not found entry node : {entryNode}");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新状态机
|
|
||||||
/// </summary>
|
|
||||||
public static void Update()
|
|
||||||
{
|
|
||||||
if (_curNode != null)
|
|
||||||
_curNode.OnUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 加入一个节点
|
|
||||||
/// </summary>
|
|
||||||
public static void AddNode(IFsmNode node)
|
|
||||||
{
|
|
||||||
if (node == null)
|
|
||||||
throw new ArgumentNullException();
|
|
||||||
|
|
||||||
if (_nodes.Contains(node) == false)
|
|
||||||
{
|
|
||||||
_nodes.Add(node);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UnityEngine.Debug.LogWarning($"Node {node.Name} already existed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 转换节点
|
|
||||||
/// </summary>
|
|
||||||
public static void Transition(string nodeName)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(nodeName))
|
|
||||||
throw new ArgumentNullException();
|
|
||||||
|
|
||||||
IFsmNode node = GetNode(nodeName);
|
|
||||||
if (node == null)
|
|
||||||
{
|
|
||||||
UnityEngine.Debug.LogError($"Can not found node {nodeName}");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
UnityEngine.Debug.Log($"FSM change {_curNode.Name} to {node.Name}");
|
|
||||||
_preNode = _curNode;
|
|
||||||
_curNode.OnExit();
|
|
||||||
_curNode = node;
|
|
||||||
_curNode.OnEnter();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 返回到之前的节点
|
|
||||||
/// </summary>
|
|
||||||
public static void RevertToPreviousNode()
|
|
||||||
{
|
|
||||||
Transition(PreviousNodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsContains(string nodeName)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < _nodes.Count; i++)
|
|
||||||
{
|
|
||||||
if (_nodes[i].Name == nodeName)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
private static IFsmNode GetNode(string nodeName)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < _nodes.Count; i++)
|
|
||||||
{
|
|
||||||
if (_nodes[i].Name == nodeName)
|
|
||||||
return _nodes[i];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
public interface IFsmNode
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 节点名称
|
|
||||||
/// </summary>
|
|
||||||
string Name { get; }
|
|
||||||
|
|
||||||
void OnEnter();
|
|
||||||
void OnUpdate();
|
|
||||||
void OnExit();
|
|
||||||
}
|
|
|
@ -1,31 +1,35 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 清理未使用的缓存文件
|
/// 清理未使用的缓存文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class FsmClearCache : IFsmNode
|
internal class FsmClearCache : IStateNode
|
||||||
{
|
{
|
||||||
public string Name { private set; get; } = nameof(FsmClearCache);
|
private StateMachine _machine;
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
{
|
{
|
||||||
Debug.Log("开始清理未使用的缓存文件!");
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("清理未使用的缓存文件!");
|
||||||
var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage");
|
var package = YooAsset.YooAssets.GetAssetsPackage("DefaultPackage");
|
||||||
var operation = package.ClearPackageUnusedCacheFilesAsync();
|
var operation = package.ClearPackageUnusedCacheFilesAsync();
|
||||||
operation.Completed += Operation_Completed;
|
operation.Completed += Operation_Completed;
|
||||||
}
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
private void Operation_Completed(YooAsset.AsyncOperationBase obj)
|
private void Operation_Completed(YooAsset.AsyncOperationBase obj)
|
||||||
{
|
{
|
||||||
FsmManager.Transition(nameof(FsmStartGame));
|
_machine.ChangeState<FsmPatchDone>();
|
||||||
}
|
|
||||||
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建文件下载器
|
||||||
|
/// </summary>
|
||||||
|
public class FsmCreateDownloader : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("创建补丁下载器!");
|
||||||
|
UniModule.StartCoroutine(CreateDownloader());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator CreateDownloader()
|
||||||
|
{
|
||||||
|
yield return new WaitForSecondsRealtime(0.5f);
|
||||||
|
|
||||||
|
int downloadingMaxNum = 10;
|
||||||
|
int failedTryAgain = 3;
|
||||||
|
var downloader = YooAssets.CreatePatchDownloader(downloadingMaxNum, failedTryAgain);
|
||||||
|
PatchManager.Instance.Downloader = downloader;
|
||||||
|
|
||||||
|
if (downloader.TotalDownloadCount == 0)
|
||||||
|
{
|
||||||
|
Debug.Log("没有发现需要下载的资源!");
|
||||||
|
_machine.ChangeState<FsmDownloadOver>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log($"一共发现了{downloader.TotalDownloadCount}个资源需要更新下载!");
|
||||||
|
|
||||||
|
// 发现新更新文件后,挂起流程系统
|
||||||
|
// 注意:开发者需要在下载前检测磁盘空间不足
|
||||||
|
int totalDownloadCount = downloader.TotalDownloadCount;
|
||||||
|
long totalDownloadBytes = downloader.TotalDownloadBytes;
|
||||||
|
PatchEventDefine.FoundUpdateFiles.SendEventMessage(totalDownloadCount, totalDownloadBytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下载更新文件
|
||||||
|
/// </summary>
|
||||||
|
public class FsmDownloadFiles : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("开始下载补丁文件!");
|
||||||
|
UniModule.StartCoroutine(BeginDownload());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator BeginDownload()
|
||||||
|
{
|
||||||
|
var downloader = PatchManager.Instance.Downloader;
|
||||||
|
|
||||||
|
// 注册下载回调
|
||||||
|
downloader.OnDownloadErrorCallback = PatchEventDefine.WebFileDownloadFailed.SendEventMessage;
|
||||||
|
downloader.OnDownloadProgressCallback = PatchEventDefine.DownloadProgressUpdate.SendEventMessage;
|
||||||
|
downloader.BeginDownload();
|
||||||
|
yield return downloader;
|
||||||
|
|
||||||
|
// 检测下载结果
|
||||||
|
if (downloader.Status != EOperationStatus.Succeed)
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
_machine.ChangeState<FsmPatchDone>();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下载完毕
|
||||||
|
/// </summary>
|
||||||
|
internal class FsmDownloadOver : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmClearCache>();
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c96c57c65f74bb3469dc71b13ef78c84
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新完毕
|
||||||
|
/// </summary>
|
||||||
|
internal class FsmPatchDone : IStateNode
|
||||||
|
{
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("开始游戏!");
|
||||||
|
|
||||||
|
// 创建游戏管理器
|
||||||
|
UniModule.CreateModule<GameManager>();
|
||||||
|
|
||||||
|
// 开启游戏流程
|
||||||
|
GameManager.Instance.Run();
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,45 +1,49 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
using Better.StreamingAssets;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
public class GameBoot : MonoBehaviour
|
/// <summary>
|
||||||
|
/// 初始化工作
|
||||||
|
/// </summary>
|
||||||
|
internal class FsmPatchInit : IStateNode
|
||||||
{
|
{
|
||||||
public static GameBoot Instance;
|
private StateMachine _machine;
|
||||||
|
|
||||||
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
|
||||||
void Awake()
|
|
||||||
{
|
{
|
||||||
Debug.Log($"资源系统运行模式:{PlayMode}");
|
_machine = machine;
|
||||||
Instance = this;
|
|
||||||
Application.targetFrameRate = 60;
|
|
||||||
Application.runInBackground = true;
|
|
||||||
|
|
||||||
DontDestroyOnLoad(this.gameObject);
|
|
||||||
}
|
}
|
||||||
void Update()
|
void IStateNode.OnEnter()
|
||||||
{
|
{
|
||||||
EventManager.Update();
|
// 加载更新面板
|
||||||
FsmManager.Update();
|
var go = Resources.Load<GameObject>("PatchWindow");
|
||||||
}
|
GameObject.Instantiate(go);
|
||||||
|
|
||||||
IEnumerator Start()
|
|
||||||
{
|
|
||||||
// 初始化BetterStreaming
|
|
||||||
BetterStreamingAssets.Initialize();
|
|
||||||
|
|
||||||
// 初始化资源系统
|
// 初始化资源系统
|
||||||
YooAssets.Initialize();
|
UniModule.StartCoroutine(InitYooAsset());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// 创建默认的资源包
|
private IEnumerator InitYooAsset()
|
||||||
|
{
|
||||||
|
var playMode = PatchManager.Instance.PlayMode;
|
||||||
|
|
||||||
|
// 创建默认的资源包
|
||||||
var package = YooAssets.CreateAssetsPackage("DefaultPackage");
|
var package = YooAssets.CreateAssetsPackage("DefaultPackage");
|
||||||
YooAssets.SetDefaultAssetsPackage(package);
|
YooAssets.SetDefaultAssetsPackage(package);
|
||||||
|
|
||||||
// 编辑器下的模拟模式
|
// 编辑器下的模拟模式
|
||||||
if (PlayMode == EPlayMode.EditorSimulateMode)
|
if (playMode == EPlayMode.EditorSimulateMode)
|
||||||
{
|
{
|
||||||
var createParameters = new EditorSimulateModeParameters();
|
var createParameters = new EditorSimulateModeParameters();
|
||||||
createParameters.SimulatePatchManifestPath = EditorSimulateModeHelper.SimulateBuild("DefaultPackage");
|
createParameters.SimulatePatchManifestPath = EditorSimulateModeHelper.SimulateBuild("DefaultPackage");
|
||||||
|
@ -47,7 +51,7 @@ public class GameBoot : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单机运行模式
|
// 单机运行模式
|
||||||
if (PlayMode == EPlayMode.OfflinePlayMode)
|
if (playMode == EPlayMode.OfflinePlayMode)
|
||||||
{
|
{
|
||||||
var createParameters = new OfflinePlayModeParameters();
|
var createParameters = new OfflinePlayModeParameters();
|
||||||
createParameters.DecryptionServices = new GameDecryptionServices();
|
createParameters.DecryptionServices = new GameDecryptionServices();
|
||||||
|
@ -55,7 +59,7 @@ public class GameBoot : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
// 联机运行模式
|
// 联机运行模式
|
||||||
if (PlayMode == EPlayMode.HostPlayMode)
|
if (playMode == EPlayMode.HostPlayMode)
|
||||||
{
|
{
|
||||||
var createParameters = new HostPlayModeParameters();
|
var createParameters = new HostPlayModeParameters();
|
||||||
createParameters.DecryptionServices = new GameDecryptionServices();
|
createParameters.DecryptionServices = new GameDecryptionServices();
|
||||||
|
@ -65,10 +69,12 @@ public class GameBoot : MonoBehaviour
|
||||||
yield return package.InitializeAsync(createParameters);
|
yield return package.InitializeAsync(createParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 运行资源更新流程
|
_machine.ChangeState<FsmUpdateVersion>();
|
||||||
PatchManager.Run();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取资源服务器地址
|
||||||
|
/// </summary>
|
||||||
private string GetHostServerURL()
|
private string GetHostServerURL()
|
||||||
{
|
{
|
||||||
//string hostServerIP = "http://10.0.2.2"; //安卓模拟器地址
|
//string hostServerIP = "http://10.0.2.2"; //安卓模拟器地址
|
||||||
|
@ -95,7 +101,10 @@ public class GameBoot : MonoBehaviour
|
||||||
return $"{hostServerIP}/CDN/PC/{gameVersion}";
|
return $"{hostServerIP}/CDN/PC/{gameVersion}";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 内置文件查询服务类
|
||||||
|
/// </summary>
|
||||||
private class GameQueryServices : IQueryServices
|
private class GameQueryServices : IQueryServices
|
||||||
{
|
{
|
||||||
public bool QueryStreamingAssets(string fileName)
|
public bool QueryStreamingAssets(string fileName)
|
||||||
|
@ -105,6 +114,10 @@ public class GameBoot : MonoBehaviour
|
||||||
return BetterStreamingAssets.FileExists($"{buildinFolderName}/{fileName}");
|
return BetterStreamingAssets.FileExists($"{buildinFolderName}/{fileName}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 资源文件解密服务类
|
||||||
|
/// </summary>
|
||||||
private class GameDecryptionServices : IDecryptionServices
|
private class GameDecryptionServices : IDecryptionServices
|
||||||
{
|
{
|
||||||
public ulong LoadFromFileOffset(DecryptFileInfo fileInfo)
|
public ulong LoadFromFileOffset(DecryptFileInfo fileInfo)
|
|
@ -0,0 +1,49 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新资源清单
|
||||||
|
/// </summary>
|
||||||
|
public class FsmUpdateManifest : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("更新资源清单!");
|
||||||
|
UniModule.StartCoroutine(UpdateManifest());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator UpdateManifest()
|
||||||
|
{
|
||||||
|
yield return new WaitForSecondsRealtime(0.5f);
|
||||||
|
|
||||||
|
var package = YooAssets.GetAssetsPackage("DefaultPackage");
|
||||||
|
var operation = package.UpdatePackageManifestAsync(PatchManager.Instance.PackageVersion, 30);
|
||||||
|
yield return operation;
|
||||||
|
|
||||||
|
if(operation.Status == EOperationStatus.Succeed)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmCreateDownloader>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning(operation.Error);
|
||||||
|
PatchEventDefine.PatchManifestUpdateFailed.SendEventMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新资源版本号
|
||||||
|
/// </summary>
|
||||||
|
internal class FsmUpdateVersion : IStateNode
|
||||||
|
{
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IStateNode.OnCreate(StateMachine machine)
|
||||||
|
{
|
||||||
|
_machine = machine;
|
||||||
|
}
|
||||||
|
void IStateNode.OnEnter()
|
||||||
|
{
|
||||||
|
PatchEventDefine.PatchStatesChange.SendEventMessage("获取最新的资源版本 !");
|
||||||
|
UniModule.StartCoroutine(GetStaticVersion());
|
||||||
|
}
|
||||||
|
void IStateNode.OnUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IStateNode.OnExit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator GetStaticVersion()
|
||||||
|
{
|
||||||
|
yield return new WaitForSecondsRealtime(0.5f);
|
||||||
|
|
||||||
|
var package = YooAssets.GetAssetsPackage("DefaultPackage");
|
||||||
|
var operation = package.UpdatePackageVersionAsync(30);
|
||||||
|
yield return operation;
|
||||||
|
|
||||||
|
if (operation.Status == EOperationStatus.Succeed)
|
||||||
|
{
|
||||||
|
PatchManager.Instance.PackageVersion = operation.PackageVersion;
|
||||||
|
_machine.ChangeState<FsmUpdateManifest>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning(operation.Error);
|
||||||
|
PatchEventDefine.PackageVersionUpdateFailed.SendEventMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UniFramework.Machine;
|
||||||
|
using UniFramework.Event;
|
||||||
|
using UniFramework.Module;
|
||||||
|
using YooAsset;
|
||||||
|
|
||||||
|
public class PatchManager : ModuleSingleton<PatchManager>, IModule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 运行模式
|
||||||
|
/// </summary>
|
||||||
|
public EPlayMode PlayMode { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 包裹的版本信息
|
||||||
|
/// </summary>
|
||||||
|
public string PackageVersion { set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 下载器
|
||||||
|
/// </summary>
|
||||||
|
public PatchDownloaderOperation Downloader { set; get; }
|
||||||
|
|
||||||
|
|
||||||
|
private bool _isRun = false;
|
||||||
|
private EventGroup _eventGroup = new EventGroup();
|
||||||
|
private StateMachine _machine;
|
||||||
|
|
||||||
|
void IModule.OnCreate(object createParam)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void IModule.OnDestroy()
|
||||||
|
{
|
||||||
|
_eventGroup.RemoveAllListener();
|
||||||
|
}
|
||||||
|
void IModule.OnUpdate()
|
||||||
|
{
|
||||||
|
if (_machine != null)
|
||||||
|
_machine.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开启流程
|
||||||
|
/// </summary>
|
||||||
|
public void Run(EPlayMode playMode)
|
||||||
|
{
|
||||||
|
if (_isRun == false)
|
||||||
|
{
|
||||||
|
_isRun = true;
|
||||||
|
PlayMode = playMode;
|
||||||
|
|
||||||
|
// 注册监听事件
|
||||||
|
_eventGroup.AddListener<UserEventDefine.UserBeginDownloadWebFiles>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<UserEventDefine.UserTryUpdatePackageVersion>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<UserEventDefine.UserTryUpdatePatchManifest>(OnHandleEventMessage);
|
||||||
|
_eventGroup.AddListener<UserEventDefine.UserTryDownloadWebFiles>(OnHandleEventMessage);
|
||||||
|
|
||||||
|
Debug.Log("开启补丁更新流程...");
|
||||||
|
_machine = new StateMachine(this);
|
||||||
|
_machine.AddNode<FsmPatchInit>();
|
||||||
|
_machine.AddNode<FsmUpdateVersion>();
|
||||||
|
_machine.AddNode<FsmUpdateManifest>();
|
||||||
|
_machine.AddNode<FsmCreateDownloader>();
|
||||||
|
_machine.AddNode<FsmDownloadFiles>();
|
||||||
|
_machine.AddNode<FsmDownloadOver>();
|
||||||
|
_machine.AddNode<FsmClearCache>();
|
||||||
|
_machine.AddNode<FsmPatchDone>();
|
||||||
|
_machine.Run<FsmPatchInit>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning("补丁更新已经正在进行中!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 接收事件
|
||||||
|
/// </summary>
|
||||||
|
private void OnHandleEventMessage(IEventMessage message)
|
||||||
|
{
|
||||||
|
if (message is UserEventDefine.UserBeginDownloadWebFiles)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmDownloadFiles>();
|
||||||
|
}
|
||||||
|
else if (message is UserEventDefine.UserTryUpdatePackageVersion)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmUpdateVersion>();
|
||||||
|
}
|
||||||
|
else if (message is UserEventDefine.UserTryUpdatePatchManifest)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmUpdateManifest>();
|
||||||
|
}
|
||||||
|
else if (message is UserEventDefine.UserTryDownloadWebFiles)
|
||||||
|
{
|
||||||
|
_machine.ChangeState<FsmCreateDownloader>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException($"{message.GetType()}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using UniFramework.Event;
|
||||||
|
|
||||||
public class PatchWindow : MonoBehaviour
|
public class PatchWindow : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@ -69,12 +70,12 @@ public class PatchWindow : MonoBehaviour
|
||||||
_messageBoxObj = transform.Find("UIWindow/MessgeBox").gameObject;
|
_messageBoxObj = transform.Find("UIWindow/MessgeBox").gameObject;
|
||||||
_messageBoxObj.SetActive(false);
|
_messageBoxObj.SetActive(false);
|
||||||
|
|
||||||
_eventGroup.AddListener<PatchEventDefine.PatchStatesChange>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.PatchStatesChange>(OnHandleEventMessage);
|
||||||
_eventGroup.AddListener<PatchEventDefine.FoundUpdateFiles>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.FoundUpdateFiles>(OnHandleEventMessage);
|
||||||
_eventGroup.AddListener<PatchEventDefine.DownloadProgressUpdate>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.DownloadProgressUpdate>(OnHandleEventMessage);
|
||||||
_eventGroup.AddListener<PatchEventDefine.StaticVersionUpdateFailed>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.PackageVersionUpdateFailed>(OnHandleEventMessage);
|
||||||
_eventGroup.AddListener<PatchEventDefine.PatchManifestUpdateFailed>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.PatchManifestUpdateFailed>(OnHandleEventMessage);
|
||||||
_eventGroup.AddListener<PatchEventDefine.WebFileDownloadFailed>(OnHandleEvent);
|
_eventGroup.AddListener<PatchEventDefine.WebFileDownloadFailed>(OnHandleEventMessage);
|
||||||
}
|
}
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
|
@ -84,72 +85,61 @@ public class PatchWindow : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 接收事件
|
/// 接收事件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnHandleEvent(IEventMessage msg)
|
private void OnHandleEventMessage(IEventMessage message)
|
||||||
{
|
{
|
||||||
if (msg is PatchEventDefine.PatchStatesChange)
|
if (message is PatchEventDefine.PatchStatesChange)
|
||||||
{
|
{
|
||||||
var message = msg as PatchEventDefine.PatchStatesChange;
|
var msg = message as PatchEventDefine.PatchStatesChange;
|
||||||
if (message.CurrentStates == EPatchStates.UpdateStaticVersion)
|
_tips.text = msg.Tips;
|
||||||
_tips.text = "Update static version.";
|
|
||||||
else if (message.CurrentStates == EPatchStates.UpdateManifest)
|
|
||||||
_tips.text = "Update patch manifest.";
|
|
||||||
else if (message.CurrentStates == EPatchStates.CreateDownloader)
|
|
||||||
_tips.text = "Check download contents.";
|
|
||||||
else if (message.CurrentStates == EPatchStates.DownloadWebFiles)
|
|
||||||
_tips.text = "Downloading patch files.";
|
|
||||||
else if (message.CurrentStates == EPatchStates.PatchDone)
|
|
||||||
_tips.text = "Welcome to game world !";
|
|
||||||
else
|
|
||||||
throw new NotImplementedException(message.CurrentStates.ToString());
|
|
||||||
}
|
}
|
||||||
else if (msg is PatchEventDefine.FoundUpdateFiles)
|
else if (message is PatchEventDefine.FoundUpdateFiles)
|
||||||
{
|
{
|
||||||
var message = msg as PatchEventDefine.FoundUpdateFiles;
|
var msg = message as PatchEventDefine.FoundUpdateFiles;
|
||||||
System.Action callback = () =>
|
System.Action callback = () =>
|
||||||
{
|
{
|
||||||
PatchManager.HandleOperation(EPatchOperation.BeginDownloadWebFiles);
|
UserEventDefine.UserBeginDownloadWebFiles.SendEventMessage();
|
||||||
};
|
};
|
||||||
float sizeMB = message.TotalSizeBytes / 1048576f;
|
float sizeMB = msg.TotalSizeBytes / 1048576f;
|
||||||
sizeMB = Mathf.Clamp(sizeMB, 0.1f, float.MaxValue);
|
sizeMB = Mathf.Clamp(sizeMB, 0.1f, float.MaxValue);
|
||||||
string totalSizeMB = sizeMB.ToString("f1");
|
string totalSizeMB = sizeMB.ToString("f1");
|
||||||
ShowMessageBox($"Found update patch files, Total count {message.TotalCount} Total szie {totalSizeMB}MB", callback);
|
ShowMessageBox($"Found update patch files, Total count {msg.TotalCount} Total szie {totalSizeMB}MB", callback);
|
||||||
}
|
}
|
||||||
else if (msg is PatchEventDefine.DownloadProgressUpdate)
|
else if (message is PatchEventDefine.DownloadProgressUpdate)
|
||||||
{
|
{
|
||||||
var message = msg as PatchEventDefine.DownloadProgressUpdate;
|
var msg = message as PatchEventDefine.DownloadProgressUpdate;
|
||||||
_slider.value = (float)message.CurrentDownloadCount / message.TotalDownloadCount;
|
_slider.value = (float)msg.CurrentDownloadCount / msg.TotalDownloadCount;
|
||||||
string currentSizeMB = (message.CurrentDownloadSizeBytes / 1048576f).ToString("f1");
|
string currentSizeMB = (msg.CurrentDownloadSizeBytes / 1048576f).ToString("f1");
|
||||||
string totalSizeMB = (message.TotalDownloadSizeBytes / 1048576f).ToString("f1");
|
string totalSizeMB = (msg.TotalDownloadSizeBytes / 1048576f).ToString("f1");
|
||||||
_tips.text = $"{message.CurrentDownloadCount}/{message.TotalDownloadCount} {currentSizeMB}MB/{totalSizeMB}MB";
|
_tips.text = $"{msg.CurrentDownloadCount}/{msg.TotalDownloadCount} {currentSizeMB}MB/{totalSizeMB}MB";
|
||||||
}
|
}
|
||||||
else if (msg is PatchEventDefine.StaticVersionUpdateFailed)
|
else if (message is PatchEventDefine.PackageVersionUpdateFailed)
|
||||||
{
|
{
|
||||||
System.Action callback = () =>
|
System.Action callback = () =>
|
||||||
{
|
{
|
||||||
PatchManager.HandleOperation(EPatchOperation.TryUpdateStaticVersion);
|
UserEventDefine.UserTryUpdatePackageVersion.SendEventMessage();
|
||||||
};
|
};
|
||||||
ShowMessageBox($"Failed to update static version, please check the network status.", callback);
|
ShowMessageBox($"Failed to update static version, please check the network status.", callback);
|
||||||
}
|
}
|
||||||
else if (msg is PatchEventDefine.PatchManifestUpdateFailed)
|
else if (message is PatchEventDefine.PatchManifestUpdateFailed)
|
||||||
{
|
{
|
||||||
System.Action callback = () =>
|
System.Action callback = () =>
|
||||||
{
|
{
|
||||||
PatchManager.HandleOperation(EPatchOperation.TryUpdatePatchManifest);
|
UserEventDefine.UserTryUpdatePatchManifest.SendEventMessage();
|
||||||
};
|
};
|
||||||
ShowMessageBox($"Failed to update patch manifest, please check the network status.", callback);
|
ShowMessageBox($"Failed to update patch manifest, please check the network status.", callback);
|
||||||
}
|
}
|
||||||
else if (msg is PatchEventDefine.WebFileDownloadFailed)
|
else if (message is PatchEventDefine.WebFileDownloadFailed)
|
||||||
{
|
{
|
||||||
var message = msg as PatchEventDefine.WebFileDownloadFailed;
|
var msg = message as PatchEventDefine.WebFileDownloadFailed;
|
||||||
System.Action callback = () =>
|
System.Action callback = () =>
|
||||||
{
|
{
|
||||||
PatchManager.HandleOperation(EPatchOperation.TryDownloadWebFiles);
|
UserEventDefine.UserTryDownloadWebFiles.SendEventMessage();
|
||||||
};
|
};
|
||||||
ShowMessageBox($"Failed to download file : {message.FileName}", callback);
|
ShowMessageBox($"Failed to download file : {msg.FileName}", callback);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException($"{msg.GetType()}");
|
throw new System.NotImplementedException($"{message.GetType()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 用户层反馈的操作方式
|
|
||||||
/// </summary>
|
|
||||||
public enum EPatchOperation
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 开始下载网络文件
|
|
||||||
/// </summary>
|
|
||||||
BeginDownloadWebFiles,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 尝试再次更新静态版本
|
|
||||||
/// </summary>
|
|
||||||
TryUpdateStaticVersion,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 尝试再次更新补丁清单
|
|
||||||
/// </summary>
|
|
||||||
TryUpdatePatchManifest,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 尝试再次下载网络文件
|
|
||||||
/// </summary>
|
|
||||||
TryDownloadWebFiles,
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 219b7f0e5d04432429b5fcb2207fa23b
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,31 +0,0 @@
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 补丁系统更新状态
|
|
||||||
/// </summary>
|
|
||||||
public enum EPatchStates
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 更新静态的资源版本
|
|
||||||
/// </summary>
|
|
||||||
UpdateStaticVersion,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新补丁清单
|
|
||||||
/// </summary>
|
|
||||||
UpdateManifest,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 创建下载器
|
|
||||||
/// </summary>
|
|
||||||
CreateDownloader,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 下载远端文件
|
|
||||||
/// </summary>
|
|
||||||
DownloadWebFiles,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 补丁流程完毕
|
|
||||||
/// </summary>
|
|
||||||
PatchDone,
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 6f1f35b77d2285045b35f588be8f7236
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,49 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 创建文件下载器
|
|
||||||
/// </summary>
|
|
||||||
public class FsmCreateDownloader : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmCreateDownloader);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("创建补丁下载器!");
|
|
||||||
PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.CreateDownloader);
|
|
||||||
GameBoot.Instance.StartCoroutine(CreateDownloader());
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator CreateDownloader()
|
|
||||||
{
|
|
||||||
yield return new WaitForSecondsRealtime(0.5f);
|
|
||||||
|
|
||||||
int downloadingMaxNum = 10;
|
|
||||||
int failedTryAgain = 3;
|
|
||||||
PatchManager.Downloader = YooAssets.CreatePatchDownloader(downloadingMaxNum, failedTryAgain);
|
|
||||||
if (PatchManager.Downloader.TotalDownloadCount == 0)
|
|
||||||
{
|
|
||||||
Debug.Log("没有发现需要下载的资源");
|
|
||||||
FsmManager.Transition(nameof(FsmPatchDone));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log($"一共发现了{PatchManager.Downloader.TotalDownloadCount}个资源需要更新下载。");
|
|
||||||
|
|
||||||
// 发现新更新文件后,挂起流程系统
|
|
||||||
// 注意:开发者需要在下载前检测磁盘空间不足
|
|
||||||
int totalDownloadCount = PatchManager.Downloader.TotalDownloadCount;
|
|
||||||
long totalDownloadBytes = PatchManager.Downloader.TotalDownloadBytes;
|
|
||||||
PatchEventDispatcher.SendFoundUpdateFilesMsg(totalDownloadCount, totalDownloadBytes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 下载更新文件
|
|
||||||
/// </summary>
|
|
||||||
public class FsmDownloadFiles : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmDownloadFiles);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("开始下载补丁文件!");
|
|
||||||
PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.DownloadWebFiles);
|
|
||||||
GameBoot.Instance.StartCoroutine(BeginDownload());
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator BeginDownload()
|
|
||||||
{
|
|
||||||
var downloader = PatchManager.Downloader;
|
|
||||||
|
|
||||||
// 注册下载回调
|
|
||||||
downloader.OnDownloadErrorCallback = PatchEventDispatcher.SendWebFileDownloadFailedMsg;
|
|
||||||
downloader.OnDownloadProgressCallback = PatchEventDispatcher.SendDownloadProgressUpdateMsg;
|
|
||||||
downloader.BeginDownload();
|
|
||||||
yield return downloader;
|
|
||||||
|
|
||||||
// 检测下载结果
|
|
||||||
if (downloader.Status != EOperationStatus.Succeed)
|
|
||||||
yield break;
|
|
||||||
|
|
||||||
FsmManager.Transition(nameof(FsmPatchDone));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新完毕
|
|
||||||
/// </summary>
|
|
||||||
internal class FsmPatchDone : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmPatchDone);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("补丁流程更新完毕!");
|
|
||||||
PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.PatchDone);
|
|
||||||
FsmManager.Transition(nameof(FsmClearCache));
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 初始化工作
|
|
||||||
/// </summary>
|
|
||||||
internal class FsmPatchInit : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmPatchInit);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
// 加载更新面板
|
|
||||||
var go = Resources.Load<GameObject>("PatchWindow");
|
|
||||||
GameObject.Instantiate(go);
|
|
||||||
|
|
||||||
FsmManager.Transition(nameof(FsmUpdateVersion));
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 开始游戏
|
|
||||||
/// </summary>
|
|
||||||
internal class FsmStartGame : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmStartGame);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("开始游戏!");
|
|
||||||
YooAsset.YooAssets.LoadSceneAsync("scene_home");
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 1c01a6c3b0dbdaf43ad5e31634eef386
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,44 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新补丁清单
|
|
||||||
/// </summary>
|
|
||||||
public class FsmUpdateManifest : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmUpdateManifest);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("开始更新资源版本清单!");
|
|
||||||
PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.UpdateManifest);
|
|
||||||
GameBoot.Instance.StartCoroutine(UpdateManifest());
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator UpdateManifest()
|
|
||||||
{
|
|
||||||
yield return new WaitForSecondsRealtime(0.5f);
|
|
||||||
|
|
||||||
var package = YooAssets.GetAssetsPackage("DefaultPackage");
|
|
||||||
var operation = package.UpdatePackageManifestAsync(PatchManager.PackageVersion, 30);
|
|
||||||
yield return operation;
|
|
||||||
|
|
||||||
if(operation.Status == EOperationStatus.Succeed)
|
|
||||||
{
|
|
||||||
FsmManager.Transition(nameof(FsmCreateDownloader));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogWarning(operation.Error);
|
|
||||||
PatchEventDispatcher.SendPatchManifestUpdateFailedMsg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using YooAsset;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新资源版本号
|
|
||||||
/// </summary>
|
|
||||||
internal class FsmUpdateVersion : IFsmNode
|
|
||||||
{
|
|
||||||
public string Name { private set; get; } = nameof(FsmUpdateVersion);
|
|
||||||
|
|
||||||
void IFsmNode.OnEnter()
|
|
||||||
{
|
|
||||||
Debug.Log("开始获取资源版本号!");
|
|
||||||
PatchEventDispatcher.SendPatchStepsChangeMsg(EPatchStates.UpdateStaticVersion);
|
|
||||||
GameBoot.Instance.StartCoroutine(GetStaticVersion());
|
|
||||||
}
|
|
||||||
void IFsmNode.OnUpdate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
void IFsmNode.OnExit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator GetStaticVersion()
|
|
||||||
{
|
|
||||||
yield return new WaitForSecondsRealtime(0.5f);
|
|
||||||
|
|
||||||
var package = YooAssets.GetAssetsPackage("DefaultPackage");
|
|
||||||
var operation = package.UpdatePackageVersionAsync(30);
|
|
||||||
yield return operation;
|
|
||||||
|
|
||||||
if (operation.Status == EOperationStatus.Succeed)
|
|
||||||
{
|
|
||||||
PatchManager.PackageVersion = operation.PackageVersion;
|
|
||||||
FsmManager.Transition(nameof(FsmUpdateManifest));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.LogWarning(operation.Error);
|
|
||||||
PatchEventDispatcher.SendStaticVersionUpdateFailedMsg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue