Pull request #42: ajout de transition avant de loader le level
Merge in CGD/gather-and-defend from prog/load_level_transition to main * commit '8adc563d47b55bdd37fede8466d0b455d6ecd49c': make transition fool proof repair camera calibrating + finish adding configs added some doc + some global configs ajout de transition avant de loader le level
This commit is contained in:
commit
fc9da646c6
@ -123,7 +123,7 @@ Important considerations :
|
|||||||
tilemap.tileAnchor = Vector3.zero;
|
tilemap.tileAnchor = Vector3.zero;
|
||||||
tilemap.gameObject.AddComponent<TilemapRenderer>();
|
tilemap.gameObject.AddComponent<TilemapRenderer>();
|
||||||
tilemap.transform.SetParent(targ.transform);
|
tilemap.transform.SetParent(targ.transform);
|
||||||
tilemapData.LoadToTilemap(tilemap);
|
tilemapData.LoadToTilemapEditor(tilemap);
|
||||||
}
|
}
|
||||||
_infoText = string.Empty;
|
_infoText = string.Empty;
|
||||||
EditorSceneManager.MarkAllScenesDirty();
|
EditorSceneManager.MarkAllScenesDirty();
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
public class SceneAttribute : PropertyAttribute { }
|
|
||||||
|
|
||||||
[CustomPropertyDrawer(typeof(SceneAttribute))]
|
[CustomPropertyDrawer(typeof(SceneAttribute))]
|
||||||
public class SceneDrawer : PropertyDrawer
|
public class SceneDrawer : PropertyDrawer
|
||||||
{
|
{
|
||||||
@ -188,4 +188,4 @@ MonoBehaviour:
|
|||||||
_renderLayer: Default
|
_renderLayer: Default
|
||||||
_position: {x: 0, y: 0}
|
_position: {x: 0, y: 0}
|
||||||
_scale: {x: 1, y: 1}
|
_scale: {x: 1, y: 1}
|
||||||
_waveConfig: {fileID: 11400000, guid: 21b0f85f7c746974db1e72f2df646f5d, type: 2}
|
_waveConfig: {fileID: 0}
|
||||||
|
|||||||
BIN
Assets/Nuage.png
Normal file
BIN
Assets/Nuage.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 922 B |
147
Assets/Nuage.png.meta
Normal file
147
Assets/Nuage.png.meta
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5c46c86f0bc20847ba28d9f215cce42
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 0
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 10
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -12,7 +12,6 @@ GameObject:
|
|||||||
- component: {fileID: 3028288566889208750}
|
- component: {fileID: 3028288566889208750}
|
||||||
- component: {fileID: 3028288566889208749}
|
- component: {fileID: 3028288566889208749}
|
||||||
- component: {fileID: -245230096461627285}
|
- component: {fileID: -245230096461627285}
|
||||||
- component: {fileID: 5626804684391367242}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: LevelManager
|
m_Name: LevelManager
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -47,6 +46,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c8f415d45fd9659408ac8c5ce2e96aba, type: 3}
|
m_Script: {fileID: 11500000, guid: c8f415d45fd9659408ac8c5ce2e96aba, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
loadOnStart: 0
|
||||||
firstLevel: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2}
|
firstLevel: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2}
|
||||||
--- !u!114 &3028288566889208749
|
--- !u!114 &3028288566889208749
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -120,16 +120,3 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 37c0aa967043d974783120d6ea9b136c, type: 3}
|
m_Script: {fileID: 11500000, guid: 37c0aa967043d974783120d6ea9b136c, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
--- !u!114 &5626804684391367242
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 3028288566889208744}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: c8f878516c4a3324aa1a9672f8b336c9, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
_current: {fileID: 11400000, guid: 132e291fc51a8f445b1183b11a5d6b39, type: 2}
|
|
||||||
|
|||||||
109
Assets/Prefabs/UI/UICloud.prefab
Normal file
109
Assets/Prefabs/UI/UICloud.prefab
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4897909026855453892
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4897909026855453895}
|
||||||
|
- component: {fileID: 4897909026855453888}
|
||||||
|
- component: {fileID: 4897909026855453889}
|
||||||
|
- component: {fileID: 4897909026855453894}
|
||||||
|
- component: {fileID: 1209880087491985449}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: UICloud
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4897909026855453895
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4897909026855453892}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
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: 1392, y: 683}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4897909026855453888
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4897909026855453892}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &4897909026855453889
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4897909026855453892}
|
||||||
|
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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 73b56022ea22aa34fa14d354f2264194, 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!225 &4897909026855453894
|
||||||
|
CanvasGroup:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4897909026855453892}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Alpha: 0
|
||||||
|
m_Interactable: 0
|
||||||
|
m_BlocksRaycasts: 0
|
||||||
|
m_IgnoreParentGroups: 1
|
||||||
|
--- !u!114 &1209880087491985449
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4897909026855453892}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 53b285ec0113524479b4bcd7a30632bf, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
properties:
|
||||||
|
fadeInTime: 1
|
||||||
|
stayTime: 1
|
||||||
|
fadeOutTime: 1
|
||||||
|
speed: 1
|
||||||
7
Assets/Prefabs/UI/UICloud.prefab.meta
Normal file
7
Assets/Prefabs/UI/UICloud.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3918c7d48763f184a92c7d61380ca258
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -458,7 +458,6 @@ GameObject:
|
|||||||
- component: {fileID: 519420031}
|
- component: {fileID: 519420031}
|
||||||
- component: {fileID: 519420029}
|
- component: {fileID: 519420029}
|
||||||
- component: {fileID: 519420030}
|
- component: {fileID: 519420030}
|
||||||
- component: {fileID: 519420033}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: Main Camera
|
||||||
m_TagString: MainCamera
|
m_TagString: MainCamera
|
||||||
@ -565,18 +564,6 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &519420033
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 519420028}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e1e75c8792eeaf44a8afc3d3fa678c74, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &619394800
|
--- !u!1 &619394800
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -823,6 +810,51 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 635793715}
|
m_GameObject: {fileID: 635793715}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &684588057
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 684588059}
|
||||||
|
- component: {fileID: 684588058}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GlobalConfig
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &684588058
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 684588057}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: c8f878516c4a3324aa1a9672f8b336c9, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_current: {fileID: 11400000, guid: 132e291fc51a8f445b1183b11a5d6b39, type: 2}
|
||||||
|
--- !u!4 &684588059
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 684588057}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -2.6812747, y: -2.3953135, z: 0.25616607}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 7
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &719426790
|
--- !u!1 &719426790
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1048,6 +1080,10 @@ PrefabInstance:
|
|||||||
propertyPath: _firstLevel
|
propertyPath: _firstLevel
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2}
|
objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2}
|
||||||
|
- target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3}
|
||||||
|
propertyPath: loadOnStart
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3028288566889208751, guid: 02daecb0115395844b4932445d039051, type: 3}
|
- target: {fileID: 3028288566889208751, guid: 02daecb0115395844b4932445d039051, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 2
|
value: 2
|
||||||
@ -1519,7 +1555,7 @@ Transform:
|
|||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 884382838}
|
- {fileID: 884382838}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 7
|
m_RootOrder: 8
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1001 &1370991965
|
--- !u!1001 &1370991965
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
@ -1608,6 +1644,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1144883118211503064, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1144883118211503064, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1144883118211503064, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1144883118211503064, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1361171379191865150, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
- target: {fileID: 1361171379191865150, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 0
|
||||||
@ -1800,6 +1852,38 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3028311141574704260, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3028311141574704260, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3028311141574704260, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3028311141574704260, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3030999274206192747, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3030999274206192747, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3030999274206192747, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3030999274206192747, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3964878483247902818, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
- target: {fileID: 3964878483247902818, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 0
|
||||||
@ -1908,6 +1992,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4911214996900807424, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4911214996900807424, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4911214996900807424, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4911214996900807424, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5316389173819650276, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
- target: {fileID: 5316389173819650276, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 0
|
||||||
@ -2652,7 +2752,7 @@ MonoBehaviour:
|
|||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 1760532842}
|
- m_Target: {fileID: 1760532842}
|
||||||
m_TargetAssemblyTypeName: ClickBehavior, GameAssembly
|
m_TargetAssemblyTypeName: ClickBehavior, GameAssembly
|
||||||
m_MethodName: stopGame
|
m_MethodName: StopGame
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
@ -2797,8 +2897,8 @@ MonoBehaviour:
|
|||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 2064630367}
|
- m_Target: {fileID: 2064630367}
|
||||||
m_TargetAssemblyTypeName: ChangeScene, GameAssembly
|
m_TargetAssemblyTypeName: GoToScene, GameAssembly
|
||||||
m_MethodName: LoadScene
|
m_MethodName: Execute
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
@ -2855,9 +2955,10 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 2064630362}
|
m_GameObject: {fileID: 2064630362}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 5013085c123fae4499f80b0a896f63af, type: 3}
|
m_Script: {fileID: 11500000, guid: a71d8cb1374fce94592f4b1c232f38d8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
scene: LevelSelect
|
_useLoadingScreen: 1
|
||||||
sceneAction: 0
|
_loadingScreenScene: LoadingScreen
|
||||||
loadSceneMode: 0
|
_sceneToLoad: LevelSelect
|
||||||
|
_levelToLoad: -1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8c9cfa26abfee488c85f1582747f6a02
|
guid: 435ced5e4c7807f409bbc420fc6b95ad
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@ -241,7 +241,7 @@ Transform:
|
|||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &857764657
|
--- !u!1 &492460954
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@ -249,9 +249,9 @@ GameObject:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 857764658}
|
- component: {fileID: 492460955}
|
||||||
- component: {fileID: 857764660}
|
- component: {fileID: 492460957}
|
||||||
- component: {fileID: 857764659}
|
- component: {fileID: 492460956}
|
||||||
m_Layer: 6
|
m_Layer: 6
|
||||||
m_Name: Spawners
|
m_Name: Spawners
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -259,13 +259,13 @@ GameObject:
|
|||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!4 &857764658
|
--- !u!4 &492460955
|
||||||
Transform:
|
Transform:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 857764657}
|
m_GameObject: {fileID: 492460954}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 0}
|
m_LocalScale: {x: 1, y: 1, z: 0}
|
||||||
@ -274,13 +274,13 @@ Transform:
|
|||||||
m_Father: {fileID: 1827197199}
|
m_Father: {fileID: 1827197199}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!483693784 &857764659
|
--- !u!483693784 &492460956
|
||||||
TilemapRenderer:
|
TilemapRenderer:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 857764657}
|
m_GameObject: {fileID: 492460954}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_CastShadows: 0
|
m_CastShadows: 0
|
||||||
m_ReceiveShadows: 0
|
m_ReceiveShadows: 0
|
||||||
@ -316,22 +316,32 @@ TilemapRenderer:
|
|||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 2
|
m_SortingOrder: 2
|
||||||
m_ChunkSize: {x: 32, y: 32, z: 32}
|
m_ChunkSize: {x: 32, y: 32, z: 32}
|
||||||
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
|
m_ChunkCullingBounds: {x: 0.22500002, y: 0.22500002, z: 0}
|
||||||
m_MaxChunkCount: 16
|
m_MaxChunkCount: 16
|
||||||
m_MaxFrameAge: 16
|
m_MaxFrameAge: 16
|
||||||
m_SortOrder: 0
|
m_SortOrder: 0
|
||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_DetectChunkCullingBounds: 0
|
m_DetectChunkCullingBounds: 0
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
--- !u!1839735485 &857764660
|
--- !u!1839735485 &492460957
|
||||||
Tilemap:
|
Tilemap:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 857764657}
|
m_GameObject: {fileID: 492460954}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Tiles:
|
m_Tiles:
|
||||||
|
- first: {x: -1, y: -3, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
- first: {x: -1, y: -2, z: 0}
|
- first: {x: -1, y: -2, z: 0}
|
||||||
second:
|
second:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@ -342,11 +352,41 @@ Tilemap:
|
|||||||
m_TileObjectToInstantiateIndex: 65535
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
dummyAlignment: 0
|
dummyAlignment: 0
|
||||||
m_AllTileFlags: 0
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -1, y: -1, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -1, y: 0, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -1, y: 1, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
- first: {x: -1, y: 2, z: 0}
|
- first: {x: -1, y: 2, z: 0}
|
||||||
second:
|
second:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_TileIndex: 1
|
m_TileIndex: 0
|
||||||
m_TileSpriteIndex: 1
|
m_TileSpriteIndex: 0
|
||||||
m_TileMatrixIndex: 0
|
m_TileMatrixIndex: 0
|
||||||
m_TileColorIndex: 0
|
m_TileColorIndex: 0
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
@ -354,17 +394,17 @@ Tilemap:
|
|||||||
m_AllTileFlags: 0
|
m_AllTileFlags: 0
|
||||||
m_AnimatedTiles: {}
|
m_AnimatedTiles: {}
|
||||||
m_TileAssetArray:
|
m_TileAssetArray:
|
||||||
- m_RefCount: 0
|
- m_RefCount: 5
|
||||||
m_Data: {fileID: 0}
|
|
||||||
- m_RefCount: 2
|
|
||||||
m_Data: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2}
|
m_Data: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2}
|
||||||
|
- m_RefCount: 1
|
||||||
|
m_Data: {fileID: 11400000, guid: 15606c8c503e8164fb69178aa7016f58, type: 2}
|
||||||
m_TileSpriteArray:
|
m_TileSpriteArray:
|
||||||
- m_RefCount: 0
|
- m_RefCount: 5
|
||||||
m_Data: {fileID: 0}
|
|
||||||
- m_RefCount: 2
|
|
||||||
m_Data: {fileID: 21300000, guid: b85a4b2ec6433d04895612d791edc260, type: 3}
|
m_Data: {fileID: 21300000, guid: b85a4b2ec6433d04895612d791edc260, type: 3}
|
||||||
|
- m_RefCount: 1
|
||||||
|
m_Data: {fileID: 21300000, guid: 8354a544f4ca3514e87d40d2de9afaee, type: 3}
|
||||||
m_TileMatrixArray:
|
m_TileMatrixArray:
|
||||||
- m_RefCount: 2
|
- m_RefCount: 6
|
||||||
m_Data:
|
m_Data:
|
||||||
e00: 1
|
e00: 1
|
||||||
e01: 0
|
e01: 0
|
||||||
@ -383,13 +423,13 @@ Tilemap:
|
|||||||
e32: 0
|
e32: 0
|
||||||
e33: 1
|
e33: 1
|
||||||
m_TileColorArray:
|
m_TileColorArray:
|
||||||
- m_RefCount: 2
|
- m_RefCount: 6
|
||||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_TileObjectToInstantiateArray: []
|
m_TileObjectToInstantiateArray: []
|
||||||
m_AnimationFrameRate: 1
|
m_AnimationFrameRate: 1
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_Origin: {x: -10, y: -4, z: 0}
|
m_Origin: {x: -1, y: -3, z: 0}
|
||||||
m_Size: {x: 21, y: 7, z: 1}
|
m_Size: {x: 1, y: 6, z: 1}
|
||||||
m_TileAnchor: {x: 0, y: 0, z: 0}
|
m_TileAnchor: {x: 0, y: 0, z: 0}
|
||||||
m_TileOrientation: 0
|
m_TileOrientation: 0
|
||||||
m_TileOrientationMatrix:
|
m_TileOrientationMatrix:
|
||||||
@ -409,7 +449,7 @@ Tilemap:
|
|||||||
e31: 0
|
e31: 0
|
||||||
e32: 0
|
e32: 0
|
||||||
e33: 1
|
e33: 1
|
||||||
--- !u!1 &1078808412
|
--- !u!1 &783540099
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@ -417,9 +457,9 @@ GameObject:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1078808413}
|
- component: {fileID: 783540100}
|
||||||
- component: {fileID: 1078808415}
|
- component: {fileID: 783540102}
|
||||||
- component: {fileID: 1078808414}
|
- component: {fileID: 783540101}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Background
|
m_Name: Background
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -427,13 +467,13 @@ GameObject:
|
|||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!4 &1078808413
|
--- !u!4 &783540100
|
||||||
Transform:
|
Transform:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 1078808412}
|
m_GameObject: {fileID: 783540099}
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 0}
|
m_LocalScale: {x: 1, y: 1, z: 0}
|
||||||
@ -442,13 +482,13 @@ Transform:
|
|||||||
m_Father: {fileID: 1827197199}
|
m_Father: {fileID: 1827197199}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!483693784 &1078808414
|
--- !u!483693784 &783540101
|
||||||
TilemapRenderer:
|
TilemapRenderer:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 1078808412}
|
m_GameObject: {fileID: 783540099}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_CastShadows: 0
|
m_CastShadows: 0
|
||||||
m_ReceiveShadows: 0
|
m_ReceiveShadows: 0
|
||||||
@ -491,13 +531,13 @@ TilemapRenderer:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_DetectChunkCullingBounds: 0
|
m_DetectChunkCullingBounds: 0
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
--- !u!1839735485 &1078808415
|
--- !u!1839735485 &783540102
|
||||||
Tilemap:
|
Tilemap:
|
||||||
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}
|
||||||
m_GameObject: {fileID: 1078808412}
|
m_GameObject: {fileID: 783540099}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Tiles:
|
m_Tiles:
|
||||||
- first: {x: -10, y: -3, z: 0}
|
- first: {x: -10, y: -3, z: 0}
|
||||||
@ -1132,444 +1172,8 @@ Tilemap:
|
|||||||
m_TileObjectToInstantiateArray: []
|
m_TileObjectToInstantiateArray: []
|
||||||
m_AnimationFrameRate: 1
|
m_AnimationFrameRate: 1
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_Origin: {x: -10, y: -4, z: 0}
|
m_Origin: {x: -10, y: -3, z: 0}
|
||||||
m_Size: {x: 21, y: 7, z: 1}
|
m_Size: {x: 10, y: 6, z: 1}
|
||||||
m_TileAnchor: {x: 0, y: 0, z: 0}
|
|
||||||
m_TileOrientation: 0
|
|
||||||
m_TileOrientationMatrix:
|
|
||||||
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
|
|
||||||
--- !u!1 &1408727360
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1408727361}
|
|
||||||
- component: {fileID: 1408727363}
|
|
||||||
- component: {fileID: 1408727362}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Entities
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &1408727361
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1408727360}
|
|
||||||
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: 0}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 1827197199}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!483693784 &1408727362
|
|
||||||
TilemapRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1408727360}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_StaticShadowCaster: 0
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 0
|
|
||||||
m_ReflectionProbeUsage: 0
|
|
||||||
m_RayTracingMode: 0
|
|
||||||
m_RayTraceProcedural: 0
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
|
||||||
m_StaticBatchInfo:
|
|
||||||
firstSubMesh: 0
|
|
||||||
subMeshCount: 0
|
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
|
||||||
m_ProbeAnchor: {fileID: 0}
|
|
||||||
m_LightProbeVolumeOverride: {fileID: 0}
|
|
||||||
m_ScaleInLightmap: 1
|
|
||||||
m_ReceiveGI: 1
|
|
||||||
m_PreserveUVs: 0
|
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
|
||||||
m_ImportantGI: 0
|
|
||||||
m_StitchLightmapSeams: 1
|
|
||||||
m_SelectedEditorRenderState: 0
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 1
|
|
||||||
m_ChunkSize: {x: 32, y: 32, z: 32}
|
|
||||||
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
|
|
||||||
m_MaxChunkCount: 16
|
|
||||||
m_MaxFrameAge: 16
|
|
||||||
m_SortOrder: 0
|
|
||||||
m_Mode: 0
|
|
||||||
m_DetectChunkCullingBounds: 0
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
--- !u!1839735485 &1408727363
|
|
||||||
Tilemap:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1408727360}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Tiles:
|
|
||||||
- first: {x: -8, y: -3, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 2
|
|
||||||
m_TileSpriteIndex: 2
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -6, y: -3, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 2
|
|
||||||
m_TileSpriteIndex: 2
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -4, y: -3, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 2
|
|
||||||
m_TileSpriteIndex: 2
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -2, y: -3, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 2
|
|
||||||
m_TileSpriteIndex: 2
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -10, y: -2, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 1
|
|
||||||
m_TileSpriteIndex: 1
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -7, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -6, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -5, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -4, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -3, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -2, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -1, y: -1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -10, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 1
|
|
||||||
m_TileSpriteIndex: 1
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -7, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -6, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -5, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -4, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -3, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -2, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -1, y: 0, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -7, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -6, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -5, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -4, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -3, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -2, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -1, y: 1, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 3
|
|
||||||
m_TileSpriteIndex: 3
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
- first: {x: -10, y: 2, z: 0}
|
|
||||||
second:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_TileIndex: 1
|
|
||||||
m_TileSpriteIndex: 1
|
|
||||||
m_TileMatrixIndex: 0
|
|
||||||
m_TileColorIndex: 0
|
|
||||||
m_TileObjectToInstantiateIndex: 65535
|
|
||||||
dummyAlignment: 0
|
|
||||||
m_AllTileFlags: 0
|
|
||||||
m_AnimatedTiles: {}
|
|
||||||
m_TileAssetArray:
|
|
||||||
- m_RefCount: 0
|
|
||||||
m_Data: {fileID: 0}
|
|
||||||
- m_RefCount: 3
|
|
||||||
m_Data: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2}
|
|
||||||
- m_RefCount: 4
|
|
||||||
m_Data: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2}
|
|
||||||
- m_RefCount: 21
|
|
||||||
m_Data: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2}
|
|
||||||
m_TileSpriteArray:
|
|
||||||
- m_RefCount: 0
|
|
||||||
m_Data: {fileID: 0}
|
|
||||||
- m_RefCount: 3
|
|
||||||
m_Data: {fileID: 21300000, guid: f67e7f54162405141b42d32ef8df76ad, type: 3}
|
|
||||||
- m_RefCount: 4
|
|
||||||
m_Data: {fileID: 21300000, guid: 5c630d8b4d37f5d4f974d38f670ad5c1, type: 3}
|
|
||||||
- m_RefCount: 21
|
|
||||||
m_Data: {fileID: 21300000, guid: 6298844400e212d40bce870425ac2a5b, type: 3}
|
|
||||||
m_TileMatrixArray:
|
|
||||||
- m_RefCount: 28
|
|
||||||
m_Data:
|
|
||||||
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_TileColorArray:
|
|
||||||
- m_RefCount: 28
|
|
||||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_TileObjectToInstantiateArray: []
|
|
||||||
m_AnimationFrameRate: 1
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_Origin: {x: -11, y: -4, z: 0}
|
|
||||||
m_Size: {x: 15, y: 7, z: 1}
|
|
||||||
m_TileAnchor: {x: 0, y: 0, z: 0}
|
m_TileAnchor: {x: 0, y: 0, z: 0}
|
||||||
m_TileOrientation: 0
|
m_TileOrientation: 0
|
||||||
m_TileOrientationMatrix:
|
m_TileOrientationMatrix:
|
||||||
@ -1603,7 +1207,7 @@ PrefabInstance:
|
|||||||
- target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3}
|
- target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3}
|
||||||
propertyPath: firstLevel
|
propertyPath: firstLevel
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 11400000, guid: f5a11cb6d0d324b47b493042c7615112, type: 2}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3028288566889208751, guid: 02daecb0115395844b4932445d039051, type: 3}
|
- target: {fileID: 3028288566889208751, guid: 02daecb0115395844b4932445d039051, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 2
|
value: 2
|
||||||
@ -1692,9 +1296,9 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1078808413}
|
- {fileID: 783540100}
|
||||||
- {fileID: 1408727361}
|
- {fileID: 2034898634}
|
||||||
- {fileID: 857764658}
|
- {fileID: 492460955}
|
||||||
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}
|
||||||
@ -1712,3 +1316,231 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_path: {fileID: 102900000, guid: c9341b1bdc1103b4e832cf62d29e5471, type: 3}
|
_path: {fileID: 102900000, guid: c9341b1bdc1103b4e832cf62d29e5471, type: 3}
|
||||||
_level: {fileID: 11400000, guid: f5a11cb6d0d324b47b493042c7615112, type: 2}
|
_level: {fileID: 11400000, guid: f5a11cb6d0d324b47b493042c7615112, type: 2}
|
||||||
|
--- !u!1 &2034898633
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2034898634}
|
||||||
|
- component: {fileID: 2034898636}
|
||||||
|
- component: {fileID: 2034898635}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Entities
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2034898634
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2034898633}
|
||||||
|
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: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1827197199}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!483693784 &2034898635
|
||||||
|
TilemapRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2034898633}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 0
|
||||||
|
m_ReflectionProbeUsage: 0
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 1
|
||||||
|
m_ChunkSize: {x: 32, y: 32, z: 32}
|
||||||
|
m_ChunkCullingBounds: {x: 0.13499999, y: 0.19, z: 0}
|
||||||
|
m_MaxChunkCount: 16
|
||||||
|
m_MaxFrameAge: 16
|
||||||
|
m_SortOrder: 0
|
||||||
|
m_Mode: 0
|
||||||
|
m_DetectChunkCullingBounds: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
--- !u!1839735485 &2034898636
|
||||||
|
Tilemap:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2034898633}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Tiles:
|
||||||
|
- first: {x: -10, y: -3, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -9, y: -3, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -10, y: -2, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -9, y: -2, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -10, y: -1, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -9, y: -1, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 0
|
||||||
|
m_TileSpriteIndex: 0
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -6, y: 2, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 1
|
||||||
|
m_TileSpriteIndex: 1
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
- first: {x: -5, y: 2, z: 0}
|
||||||
|
second:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TileIndex: 1
|
||||||
|
m_TileSpriteIndex: 1
|
||||||
|
m_TileMatrixIndex: 0
|
||||||
|
m_TileColorIndex: 0
|
||||||
|
m_TileObjectToInstantiateIndex: 65535
|
||||||
|
dummyAlignment: 0
|
||||||
|
m_AllTileFlags: 0
|
||||||
|
m_AnimatedTiles: {}
|
||||||
|
m_TileAssetArray:
|
||||||
|
- m_RefCount: 6
|
||||||
|
m_Data: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2}
|
||||||
|
- m_RefCount: 2
|
||||||
|
m_Data: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2}
|
||||||
|
m_TileSpriteArray:
|
||||||
|
- m_RefCount: 6
|
||||||
|
m_Data: {fileID: 21300000, guid: 43582b3c6b60fd144bc56d8ab3b14349, type: 3}
|
||||||
|
- m_RefCount: 2
|
||||||
|
m_Data: {fileID: 21300000, guid: 6298844400e212d40bce870425ac2a5b, type: 3}
|
||||||
|
m_TileMatrixArray:
|
||||||
|
- m_RefCount: 8
|
||||||
|
m_Data:
|
||||||
|
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_TileColorArray:
|
||||||
|
- m_RefCount: 8
|
||||||
|
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_TileObjectToInstantiateArray: []
|
||||||
|
m_AnimationFrameRate: 1
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_Origin: {x: -10, y: -3, z: 0}
|
||||||
|
m_Size: {x: 10, y: 6, z: 1}
|
||||||
|
m_TileAnchor: {x: 0, y: 0, z: 0}
|
||||||
|
m_TileOrientation: 0
|
||||||
|
m_TileOrientationMatrix:
|
||||||
|
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
|
||||||
File diff suppressed because it is too large
Load Diff
388
Assets/Scenes/LoadingScreen.unity
Normal file
388
Assets/Scenes/LoadingScreen.unity
Normal file
@ -0,0 +1,388 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 3
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 0
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 12
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_AtlasSize: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAmbientOcclusion: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 512
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVREnvironmentSampleCount: 256
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_PVRFilteringMode: 1
|
||||||
|
m_PVRDenoiserTypeDirect: 1
|
||||||
|
m_PVRDenoiserTypeIndirect: 1
|
||||||
|
m_PVRDenoiserTypeAO: 1
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVREnvironmentMIS: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &16265664
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 16265668}
|
||||||
|
- component: {fileID: 16265667}
|
||||||
|
- component: {fileID: 16265666}
|
||||||
|
- component: {fileID: 16265665}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: UI
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &16265665
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 16265664}
|
||||||
|
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 &16265666
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 16265664}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 1
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!223 &16265667
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 16265664}
|
||||||
|
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: 25
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!224 &16265668
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 16265664}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1991489726}
|
||||||
|
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!1 &444904903
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 444904904}
|
||||||
|
- component: {fileID: 444904907}
|
||||||
|
- component: {fileID: 444904906}
|
||||||
|
- component: {fileID: 444904905}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Screen
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &444904904
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 444904903}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 8.84}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1991489726}
|
||||||
|
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!225 &444904905
|
||||||
|
CanvasGroup:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 444904903}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Alpha: 0
|
||||||
|
m_Interactable: 0
|
||||||
|
m_BlocksRaycasts: 1
|
||||||
|
m_IgnoreParentGroups: 1
|
||||||
|
--- !u!114 &444904906
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 444904903}
|
||||||
|
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.19215688, g: 0.3019608, b: 0.47058827, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
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!222 &444904907
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 444904903}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1991489725
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1991489726}
|
||||||
|
- component: {fileID: 1991489727}
|
||||||
|
- component: {fileID: 1991489728}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: LoadingScreen
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1991489726
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1991489725}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 5}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 444904904}
|
||||||
|
m_Father: {fileID: 16265668}
|
||||||
|
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!114 &1991489727
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1991489725}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8a9b542d59e659741b005556831a3390, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
blueScreen: {fileID: 444904905}
|
||||||
|
fadeInDuration: 1
|
||||||
|
fadeOutDuration: 2
|
||||||
|
cloudPrefab: {fileID: 4897909026855453892, guid: 3918c7d48763f184a92c7d61380ca258, type: 3}
|
||||||
|
maxClouds: 10
|
||||||
|
cloudProperties:
|
||||||
|
fadeInTime: 2
|
||||||
|
stayTime: 10
|
||||||
|
fadeOutTime: 1
|
||||||
|
speed: 20
|
||||||
|
--- !u!114 &1991489728
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1991489725}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: aef75be033508a4498fa7f546d6ebef2, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
7
Assets/Scenes/LoadingScreen.unity.meta
Normal file
7
Assets/Scenes/LoadingScreen.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6da14f6006606f840b2df7664c50e1ec
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
50
Assets/Scripts/CloudAnimation.cs
Normal file
50
Assets/Scripts/CloudAnimation.cs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using static Codice.Client.Common.WebApi.WebApiEndpoints;
|
||||||
|
|
||||||
|
public class CloudAnimation : MonoBehaviour
|
||||||
|
{
|
||||||
|
[System.Serializable]
|
||||||
|
public class Properties
|
||||||
|
{
|
||||||
|
public float fadeInTime = 1;
|
||||||
|
public float stayTime = 1;
|
||||||
|
public float fadeOutTime = 1;
|
||||||
|
public float speed = 1;
|
||||||
|
}
|
||||||
|
CanvasGroup canvasGroup;
|
||||||
|
public Properties properties;
|
||||||
|
private Coroutine coroutine;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
canvasGroup = GetComponent<CanvasGroup>();
|
||||||
|
coroutine = StartCoroutine(AnimateCloud());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Kill()
|
||||||
|
{
|
||||||
|
StopCoroutine(coroutine);
|
||||||
|
StartCoroutine(KillCloud());
|
||||||
|
}
|
||||||
|
IEnumerator AnimateCloud()
|
||||||
|
{
|
||||||
|
|
||||||
|
canvasGroup.alpha = 0;
|
||||||
|
yield return canvasGroup.FadeTo(1, properties.fadeInTime);
|
||||||
|
yield return new WaitForSeconds(properties.stayTime);
|
||||||
|
yield return KillCloud();
|
||||||
|
}
|
||||||
|
IEnumerator KillCloud()
|
||||||
|
{
|
||||||
|
yield return canvasGroup.FadeTo(0, properties.fadeOutTime);
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
transform.position += properties.speed * Time.deltaTime * Vector3.left * Camera.main.orthographicSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/CloudAnimation.cs.meta
Normal file
11
Assets/Scripts/CloudAnimation.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 53b285ec0113524479b4bcd7a30632bf
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -4,6 +4,8 @@ using TMPro;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using GatherAndDefend.Events;
|
||||||
|
using static LevelManager;
|
||||||
|
|
||||||
[RequireComponent(typeof(Button))]
|
[RequireComponent(typeof(Button))]
|
||||||
public abstract class UnitPlacementButton : MonoBehaviour, IPointerDownHandler
|
public abstract class UnitPlacementButton : MonoBehaviour, IPointerDownHandler
|
||||||
@ -28,13 +30,30 @@ public abstract class UnitPlacementButton : MonoBehaviour, IPointerDownHandler
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private TMP_Text _rockLabel;
|
private TMP_Text _rockLabel;
|
||||||
|
|
||||||
|
private bool _canSpawn = false;
|
||||||
|
|
||||||
protected virtual void Start()
|
protected virtual void Start()
|
||||||
{
|
{
|
||||||
_button = GetComponent<Button>();
|
_button = GetComponent<Button>();
|
||||||
|
|
||||||
|
_button.enabled = false;
|
||||||
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Attach(OnLevelLoaded);
|
||||||
|
EventAggregator.Instance.GetEvent<ExitingLevelEvent>().Attach(DeactivateButton);
|
||||||
|
}
|
||||||
|
private void OnLevelLoaded(GatherAndDefend.LevelEditor.Level level)
|
||||||
|
{
|
||||||
|
_canSpawn = true;
|
||||||
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Detach(OnLevelLoaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeactivateButton()
|
||||||
|
{
|
||||||
|
EventAggregator.Instance.GetEvent<ExitingLevelEvent>().Detach(DeactivateButton);
|
||||||
|
_canSpawn = false;
|
||||||
}
|
}
|
||||||
protected virtual void Update()
|
protected virtual void Update()
|
||||||
{
|
{
|
||||||
_button.interactable = ResourceManager.Instance.EnoughFor(_rock, _wood, _food);
|
_button.interactable = ResourceManager.Instance.EnoughFor(_rock, _wood, _food) && _button.enabled && _canSpawn;
|
||||||
SetTextFor(_foodLabel, _food);
|
SetTextFor(_foodLabel, _food);
|
||||||
SetTextFor(_rockLabel, _rock);
|
SetTextFor(_rockLabel, _rock);
|
||||||
SetTextFor(_woodLabel, _wood);
|
SetTextFor(_woodLabel, _wood);
|
||||||
|
|||||||
8
Assets/Scripts/Events.meta
Normal file
8
Assets/Scripts/Events.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b232aec3472e8a7408e34c6ae8608d4a
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
28
Assets/Scripts/Events/EventAggregator.cs
Normal file
28
Assets/Scripts/Events/EventAggregator.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace GatherAndDefend.Events
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// makes it possible to add custom and centralized event observables<br/>
|
||||||
|
/// </summary>
|
||||||
|
public class EventAggregator : Singleton<EventAggregator>
|
||||||
|
{
|
||||||
|
private List<EventBase> events = new List<EventBase>();
|
||||||
|
/// <summary>
|
||||||
|
/// returns an event observable of given type. Creates it if non-existent
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T">the type of the event</typeparam>
|
||||||
|
/// <returns></returns>
|
||||||
|
public T GetEvent<T>() where T : EventBase, new()
|
||||||
|
{
|
||||||
|
var evt = events.Find(x => x is T);
|
||||||
|
if (evt == null)
|
||||||
|
{
|
||||||
|
evt = new T();
|
||||||
|
events.Add(evt);
|
||||||
|
}
|
||||||
|
return evt as T;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Events/EventAggregator.cs.meta
Normal file
11
Assets/Scripts/Events/EventAggregator.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2ac29c6e09760dc45a27054e159f1240
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
34
Assets/Scripts/Events/EventBase.cs
Normal file
34
Assets/Scripts/Events/EventBase.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
namespace GatherAndDefend.Events
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// lets you create custom events for the event aggregator
|
||||||
|
/// </summary>
|
||||||
|
public abstract class EventBase
|
||||||
|
{
|
||||||
|
private event System.Action innerEvent;
|
||||||
|
public void Invoke()
|
||||||
|
{
|
||||||
|
innerEvent?.Invoke();
|
||||||
|
}
|
||||||
|
public void Attach(System.Action handler)
|
||||||
|
{
|
||||||
|
innerEvent += handler;
|
||||||
|
}
|
||||||
|
public void Detach(System.Action handler)
|
||||||
|
{
|
||||||
|
innerEvent -= handler;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// lets you create custom event with given parameter for the event aggregator
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
public abstract class EventBase<T> : EventBase
|
||||||
|
{
|
||||||
|
private event System.Action<T> innerEvent;
|
||||||
|
public void Invoke(T value) => innerEvent?.Invoke(value);
|
||||||
|
public void Attach(System.Action<T> handler) => innerEvent += handler;
|
||||||
|
public void Detach(System.Action<T> handler) => innerEvent -= handler;
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Events/EventBase.cs.meta
Normal file
11
Assets/Scripts/Events/EventBase.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 515b3ee1c144baa4abe1951ad6039ae4
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
3
Assets/Scripts/Events/ExitingLevelEvent.cs
Normal file
3
Assets/Scripts/Events/ExitingLevelEvent.cs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
|
||||||
|
public class ExitingLevelEvent : EventBase { }
|
||||||
11
Assets/Scripts/Events/ExitingLevelEvent.cs.meta
Normal file
11
Assets/Scripts/Events/ExitingLevelEvent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ac71e91f163c3c446850b85d7b6a59c4
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
7
Assets/Scripts/Events/LevelLoadedEvent.cs
Normal file
7
Assets/Scripts/Events/LevelLoadedEvent.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
using GatherAndDefend.LevelEditor;
|
||||||
|
|
||||||
|
public class LevelLoadedEvent : EventBase<Level>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
11
Assets/Scripts/Events/LevelLoadedEvent.cs.meta
Normal file
11
Assets/Scripts/Events/LevelLoadedEvent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ccf2a9d05b59e0947b1f327a8cb970f7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
5
Assets/Scripts/Events/ScreenActivatedEvent.cs
Normal file
5
Assets/Scripts/Events/ScreenActivatedEvent.cs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
|
||||||
|
public class ScreenActivatedEvent : EventBase
|
||||||
|
{
|
||||||
|
}
|
||||||
11
Assets/Scripts/Events/ScreenActivatedEvent.cs.meta
Normal file
11
Assets/Scripts/Events/ScreenActivatedEvent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c2b6c01fae276b7448d4ed179443af4e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
5
Assets/Scripts/Events/ScreenDeactivatedEvent.cs
Normal file
5
Assets/Scripts/Events/ScreenDeactivatedEvent.cs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
|
||||||
|
public class ScreenDeactivatedEvent : EventBase
|
||||||
|
{
|
||||||
|
}
|
||||||
11
Assets/Scripts/Events/ScreenDeactivatedEvent.cs.meta
Normal file
11
Assets/Scripts/Events/ScreenDeactivatedEvent.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 864c47f40960dde46b92c49f90bd812c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
9
Assets/Scripts/General/DontDestroy.cs
Normal file
9
Assets/Scripts/General/DontDestroy.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class DontDestroy : MonoBehaviour
|
||||||
|
{
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
DontDestroyOnLoad(gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/General/DontDestroy.cs.meta
Normal file
11
Assets/Scripts/General/DontDestroy.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fa9f587ee4cf938499416afd7af15106
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -5,9 +5,17 @@ using UnityEngine;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using GatherAndDefend.LevelEditor;
|
using GatherAndDefend.LevelEditor;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
public static class Extensions
|
public static class Extensions
|
||||||
{
|
{
|
||||||
|
public static async Task WaitWhile(Func<bool> toKeepTrue)
|
||||||
|
{
|
||||||
|
while (toKeepTrue?.Invoke() == true)
|
||||||
|
{
|
||||||
|
await Task.Yield();
|
||||||
|
}
|
||||||
|
}
|
||||||
public static T[] GetAllComponents<T>(this Component component) where T : Component
|
public static T[] GetAllComponents<T>(this Component component) where T : Component
|
||||||
{
|
{
|
||||||
List<T> comps = new List<T>();
|
List<T> comps = new List<T>();
|
||||||
@ -97,7 +105,12 @@ public static class Extensions
|
|||||||
{
|
{
|
||||||
return Vector2.Distance(vect, tilePosition) < 0.5f;
|
return Vector2.Distance(vect, tilePosition) < 0.5f;
|
||||||
}
|
}
|
||||||
|
public static Vector2 RandomInRectangle(float x, float y)
|
||||||
|
{
|
||||||
|
var randX = UnityEngine.Random.Range(0, x);
|
||||||
|
var randY = UnityEngine.Random.Range(0, y);
|
||||||
|
return new Vector2(randX, randY);
|
||||||
|
}
|
||||||
public static T Minimum<T>(this IEnumerable<T> list, Func<T, float> func)
|
public static T Minimum<T>(this IEnumerable<T> list, Func<T, float> func)
|
||||||
{
|
{
|
||||||
if (list.Count() < 1) throw new Exception("in " + nameof(Minimum) + " : Cannot find minimum of empty list : " + nameof(list));
|
if (list.Count() < 1) throw new Exception("in " + nameof(Minimum) + " : Cannot find minimum of empty list : " + nameof(list));
|
||||||
@ -115,4 +128,16 @@ public static class Extensions
|
|||||||
}
|
}
|
||||||
return minT;
|
return minT;
|
||||||
}
|
}
|
||||||
|
public static IEnumerator FadeTo(this CanvasGroup item, float value, float duration)
|
||||||
|
{
|
||||||
|
var delta = value - item.alpha;
|
||||||
|
var direction = Mathf.Sign(delta);
|
||||||
|
|
||||||
|
while (Mathf.Abs(value - item.alpha) > 0)
|
||||||
|
{
|
||||||
|
item.alpha += Time.deltaTime * direction / duration;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
item.alpha = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -2,6 +2,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class GlobalConfig : SingletonBehaviour<GlobalConfig>
|
public class GlobalConfig : SingletonBehaviour<GlobalConfig>
|
||||||
{
|
{
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private GlobalConfigFile _current;
|
private GlobalConfigFile _current;
|
||||||
public GlobalConfigFile Current
|
public GlobalConfigFile Current
|
||||||
|
|||||||
@ -30,4 +30,9 @@ public class GlobalConfigFile : ScriptableObject
|
|||||||
public bool useRandomHarvestDuration = false;
|
public bool useRandomHarvestDuration = false;
|
||||||
public int randomHarvestDurationMinimum = 0;
|
public int randomHarvestDurationMinimum = 0;
|
||||||
public int randomHarvestDurationMaximum = 0;
|
public int randomHarvestDurationMaximum = 0;
|
||||||
|
|
||||||
|
[Header("loading screen")]
|
||||||
|
public float loadingAddedTime = 3;
|
||||||
|
public float baseTileSpawnSpeed = 12;
|
||||||
|
public float tileSpawnAcceleration = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
12
Assets/Scripts/General/Reference.cs
Normal file
12
Assets/Scripts/General/Reference.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
public class Reference<T>
|
||||||
|
{
|
||||||
|
private T _value;
|
||||||
|
public T Value { get => _value; set => _value = value; }
|
||||||
|
public Reference() : this(default) { }
|
||||||
|
public Reference(T initial = default)
|
||||||
|
{
|
||||||
|
_value = initial;
|
||||||
|
}
|
||||||
|
public static implicit operator Reference<T>(T value) => new Reference<T>(value);
|
||||||
|
public static implicit operator T(Reference<T> reference) => reference.Value;
|
||||||
|
}
|
||||||
11
Assets/Scripts/General/Reference.cs.meta
Normal file
11
Assets/Scripts/General/Reference.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e003bd06f19862c4cbbea35f38821ae6
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -15,6 +15,6 @@ public class SingletonBehaviour<T> : MonoBehaviour where T : SingletonBehaviour<
|
|||||||
protected virtual void Awake()
|
protected virtual void Awake()
|
||||||
{
|
{
|
||||||
if (!Instance) Instance = this as T;
|
if (!Instance) Instance = this as T;
|
||||||
else Destroy(gameObject);
|
else Destroy(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
32
Assets/Scripts/GoToScene.cs
Normal file
32
Assets/Scripts/GoToScene.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
public class GoToScene : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private bool _useLoadingScreen = true;
|
||||||
|
[SerializeField][Scene]
|
||||||
|
private string _loadingScreenScene;
|
||||||
|
[SerializeField][Scene]
|
||||||
|
private string _sceneToLoad;
|
||||||
|
[SerializeField]
|
||||||
|
private int _levelToLoad;
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
if (_useLoadingScreen)
|
||||||
|
{
|
||||||
|
PlayerPrefs.SetString(LoadingManager.SceneToLoad, _sceneToLoad);
|
||||||
|
PlayerPrefs.SetInt(LoadingManager.LevelToLoad, _levelToLoad);
|
||||||
|
SceneManager.LoadScene(_loadingScreenScene, LoadSceneMode.Additive);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneManager.LoadScene(_sceneToLoad);
|
||||||
|
}
|
||||||
|
|
||||||
|
EventAggregator.Instance.GetEvent<ExitingLevelEvent>().Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/GoToScene.cs.meta
Normal file
11
Assets/Scripts/GoToScene.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a71d8cb1374fce94592f4b1c232f38d8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,32 +1,40 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using static LevelManager;
|
||||||
|
|
||||||
public class KeepLevelAnchored : MonoBehaviour
|
public class KeepLevelAnchored : MonoBehaviour
|
||||||
{
|
{
|
||||||
Camera _camera;
|
Camera _camera;
|
||||||
Rect _levelBound;
|
Rect _levelBound;
|
||||||
|
bool _boundCalculated = false;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
LevelManager.Instance.LevelLoaded += CalculateBound;
|
|
||||||
CalculateBound(LevelManager.Instance.CurrentLevel);
|
|
||||||
_camera = Camera.main;
|
_camera = Camera.main;
|
||||||
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Attach(CalculateBound);
|
||||||
|
|
||||||
|
if (!LevelManager.Instance.CurrentLevel) return;
|
||||||
|
CalculateBound(LevelManager.Instance.CurrentLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CalculateBound(GatherAndDefend.LevelEditor.Level level)
|
private void CalculateBound(GatherAndDefend.LevelEditor.Level level)
|
||||||
{
|
{
|
||||||
|
_boundCalculated = false;
|
||||||
_levelBound = level.CalculateBounds();
|
_levelBound = level.CalculateBounds();
|
||||||
|
_boundCalculated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDestroy()
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
LevelManager.Instance.LevelLoaded -= CalculateBound;
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Attach(CalculateBound);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
if (!_boundCalculated) return;
|
||||||
//move right
|
//move right
|
||||||
var xMax = _levelBound.xMax;
|
var xMax = _levelBound.xMax;
|
||||||
var width = _camera.ScreenToWorldPoint(Vector2.one * _camera.pixelWidth).x;
|
var width = _camera.ScreenToWorldPoint(Vector2.one * _camera.pixelWidth).x;
|
||||||
|
|||||||
@ -19,13 +19,7 @@ namespace GatherAndDefend.LevelEditor
|
|||||||
data.SaveFromTilemap(tilemap);
|
data.SaveFromTilemap(tilemap);
|
||||||
_data.Add(data);
|
_data.Add(data);
|
||||||
}
|
}
|
||||||
public void LoadToTilemap(Tilemap tilemap)
|
|
||||||
{
|
|
||||||
var data = _data.Find(x => x.Key == tilemap.name);
|
|
||||||
if (data == null) return;
|
|
||||||
|
|
||||||
data.LoadToTilemap(tilemap);
|
|
||||||
}
|
|
||||||
public WaveConfig WaveConfig { get { return _waveConfig; } }
|
public WaveConfig WaveConfig { get { return _waveConfig; } }
|
||||||
|
|
||||||
public IEnumerator<TilemapData> GetEnumerator()
|
public IEnumerator<TilemapData> GetEnumerator()
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace GatherAndDefend.LevelEditor
|
namespace GatherAndDefend.LevelEditor
|
||||||
{
|
{
|
||||||
@ -33,8 +34,14 @@ namespace GatherAndDefend.LevelEditor
|
|||||||
|
|
||||||
public string Key => _key;
|
public string Key => _key;
|
||||||
|
|
||||||
public void LoadToTilemap(Tilemap reference)
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reference">the current tilemap</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void LoadToTilemapEditor(Tilemap reference)
|
||||||
{
|
{
|
||||||
|
var tilesPerSecond = Application.isPlaying ? GlobalConfig.Instance.Current.baseTileSpawnSpeed : float.Epsilon;
|
||||||
reference.transform.localPosition = _position;
|
reference.transform.localPosition = _position;
|
||||||
reference.transform.localScale = _scale;
|
reference.transform.localScale = _scale;
|
||||||
|
|
||||||
@ -48,12 +55,65 @@ namespace GatherAndDefend.LevelEditor
|
|||||||
collision.isTrigger = _isTrigger;
|
collision.isTrigger = _isTrigger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//all tiles are loaded after their animation is over. use a task to asyncroneously load them and keep control over the flow
|
||||||
|
var tasks = new List<Task>();
|
||||||
foreach (TileData data in _tiles)
|
foreach (TileData data in _tiles)
|
||||||
{
|
{
|
||||||
reference.SetTile(data.Position, data.Tile);
|
reference.SetTile(data.Position, data.Tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reference">the current tilemap</param>
|
||||||
|
/// <param name="placementAnimation">the tiles falling on the tilemap</param>
|
||||||
|
/// <param name="allTilesSpawned">a reference value that is used in caller method to detect when all tiles have been spawned</param>
|
||||||
|
/// <param name="tileSpawnAcceleration">a delegate which speeds up the spawning of the tiles over time</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task LoadToTilemap(Tilemap reference, Func<bool> shouldKillTask, PlacementAnimationHandler placementAnimation = null, Action allTilesSpawned = default, Func<float> tileSpawnAcceleration = default)
|
||||||
|
{
|
||||||
|
// if the function we receive is null, we just make it constant 1
|
||||||
|
if (tileSpawnAcceleration == default) tileSpawnAcceleration = () => 1;
|
||||||
|
if (placementAnimation == null) placementAnimation = (tileData, placer, killer) =>
|
||||||
|
{
|
||||||
|
reference.SetTile(tileData.Position, tileData.Tile);
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var tilesPerSecond = Application.isPlaying ? GlobalConfig.Instance.Current.baseTileSpawnSpeed : float.Epsilon;
|
||||||
|
reference.transform.localPosition = _position;
|
||||||
|
reference.transform.localScale = _scale;
|
||||||
|
|
||||||
|
var rend = reference.GetComponent<TilemapRenderer>();
|
||||||
|
rend.sortingOrder = _renderOrder;
|
||||||
|
rend.sortingLayerName = _renderLayer;
|
||||||
|
if (_isInvisible) rend.gameObject.layer = INVISIBLE_LAYER;
|
||||||
|
if (_isCollidable)
|
||||||
|
{
|
||||||
|
var collision = rend.gameObject.AddComponent<TilemapCollider2D>();
|
||||||
|
collision.isTrigger = _isTrigger;
|
||||||
|
}
|
||||||
|
|
||||||
|
//all tiles are loaded after their animation is over. use a task to asyncroneously load them and keep control over the flow
|
||||||
|
var tasks = new List<Task>();
|
||||||
|
foreach (TileData data in _tiles)
|
||||||
|
{
|
||||||
|
tasks.Add(placementAnimation(data, () => reference.SetTile(data.Position, data.Tile), shouldKillTask));
|
||||||
|
if (shouldKillTask())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Task.Delay((int)(1000f / (tilesPerSecond * tileSpawnAcceleration())));
|
||||||
|
}
|
||||||
|
allTilesSpawned?.Invoke();
|
||||||
|
if (shouldKillTask())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Task.WhenAll(tasks);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// saves a tilemap into the level object
|
/// saves a tilemap into the level object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="reference"></param>
|
/// <param name="reference"></param>
|
||||||
|
|||||||
@ -6,6 +6,9 @@ using UnityEngine;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using GatherAndDefend.Events;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// data class for containing everything level related
|
/// data class for containing everything level related
|
||||||
@ -14,8 +17,6 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
{
|
{
|
||||||
string SavePath => Application.dataPath + "/save.txt";
|
string SavePath => Application.dataPath + "/save.txt";
|
||||||
|
|
||||||
public event OnLevelLoaded LevelLoaded;
|
|
||||||
|
|
||||||
public delegate void OnLevelLoaded(Level level);
|
public delegate void OnLevelLoaded(Level level);
|
||||||
public delegate void LevelAction(ILevelObject levelObject);
|
public delegate void LevelAction(ILevelObject levelObject);
|
||||||
public delegate bool LevelPredicate<T>(T levelObject) where T : ILevelObject;
|
public delegate bool LevelPredicate<T>(T levelObject) where T : ILevelObject;
|
||||||
@ -24,6 +25,8 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
private readonly List<ILevelObject> _toRemove;
|
private readonly List<ILevelObject> _toRemove;
|
||||||
private readonly List<ILevelObject> _levelObjects;
|
private readonly List<ILevelObject> _levelObjects;
|
||||||
private WaveObserver _waveObserver;
|
private WaveObserver _waveObserver;
|
||||||
|
private bool _isLoading = true;
|
||||||
|
private bool _shouldKillTask = false;
|
||||||
|
|
||||||
private Tilemap _dynamicTilemap;
|
private Tilemap _dynamicTilemap;
|
||||||
public Tilemap DynamicTilemap
|
public Tilemap DynamicTilemap
|
||||||
@ -50,6 +53,8 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Loading { get; private set; } = false;
|
||||||
|
|
||||||
public LevelManager()
|
public LevelManager()
|
||||||
{
|
{
|
||||||
_toAdd = new List<ILevelObject>();
|
_toAdd = new List<ILevelObject>();
|
||||||
@ -97,7 +102,7 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
|
|
||||||
#region [Level management]
|
#region [Level management]
|
||||||
|
|
||||||
public void AddAndRemoveObjects()
|
void AddAndRemoveObjects()
|
||||||
{
|
{
|
||||||
//add and remove
|
//add and remove
|
||||||
var toAdd = new List<ILevelObject>(_toAdd);
|
var toAdd = new List<ILevelObject>(_toAdd);
|
||||||
@ -119,6 +124,7 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
|
|
||||||
public void UpdateLevel()
|
public void UpdateLevel()
|
||||||
{
|
{
|
||||||
|
if (_isLoading) return;
|
||||||
AddAndRemoveObjects();
|
AddAndRemoveObjects();
|
||||||
|
|
||||||
_levelObjects.ForEach(levelObject =>
|
_levelObjects.ForEach(levelObject =>
|
||||||
@ -138,17 +144,25 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
public void KillLoading()
|
||||||
/// permet de loader un scriptable object de niveau
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="level">le niveau à loader</param>
|
|
||||||
/// <param name="shouldClear">est ce qu'on veut effacer ce qui est déjà là?</param>
|
|
||||||
public void LoadLevel(Level level, bool shouldClear = false)
|
|
||||||
{
|
{
|
||||||
if (shouldClear)
|
_shouldKillTask = true;
|
||||||
{
|
|
||||||
ClearLevel();
|
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// loads a Level scriptable object
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="level">the level to load</param>
|
||||||
|
/// <param name="shouldClear">do we want to clear what's already there before loading?</param>
|
||||||
|
/// <param name="placementAnimation">the tiles falling from the top of the screen</param>
|
||||||
|
public async Task LoadLevel(Level level, PlacementAnimationHandler placementAnimation = null)
|
||||||
|
{
|
||||||
|
_isLoading = true;
|
||||||
|
_shouldKillTask = false;
|
||||||
|
float accelerationOfAcceleration = GlobalConfig.Instance.Current.tileSpawnAcceleration;
|
||||||
|
float tileCurrentAcceleration = 1;
|
||||||
|
float tileSpawnAccelerationFunc() => (tileCurrentAcceleration += accelerationOfAcceleration * Time.deltaTime);
|
||||||
|
|
||||||
|
ClearLevel();
|
||||||
|
|
||||||
_currentLevel = level;
|
_currentLevel = level;
|
||||||
_waveObserver = WaveObserver.Instance;
|
_waveObserver = WaveObserver.Instance;
|
||||||
@ -170,36 +184,49 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tasks = new List<Task>();
|
||||||
//generate all tilemaps
|
//generate all tilemaps
|
||||||
foreach (TilemapData tilemapData in _currentLevel)
|
foreach (TilemapData tilemapData in _currentLevel)
|
||||||
{
|
{
|
||||||
|
bool allTilesSpawned = false;
|
||||||
|
System.Action OnAllTilesSpawned = () => allTilesSpawned = true;
|
||||||
var tilemap = new GameObject(tilemapData.Key).AddComponent<Tilemap>();
|
var tilemap = new GameObject(tilemapData.Key).AddComponent<Tilemap>();
|
||||||
tilemap.tileAnchor = Vector3.zero;
|
tilemap.tileAnchor = Vector3.zero;
|
||||||
tilemap.gameObject.AddComponent<TilemapRenderer>();
|
tilemap.gameObject.AddComponent<TilemapRenderer>();
|
||||||
tilemapData.LoadToTilemap(tilemap);
|
|
||||||
tilemap.transform.SetParent(grid.transform);
|
tilemap.transform.SetParent(grid.transform);
|
||||||
|
|
||||||
|
tasks.Add(tilemapData.LoadToTilemap(tilemap, () => _shouldKillTask, placementAnimation, OnAllTilesSpawned, tileSpawnAccelerationFunc));
|
||||||
|
|
||||||
|
if (_shouldKillTask)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Extensions.WaitWhile(() => !allTilesSpawned);
|
||||||
}
|
}
|
||||||
|
|
||||||
LevelLoaded?.Invoke(level);
|
if (_shouldKillTask)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Task.WhenAll(tasks);
|
||||||
|
|
||||||
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Invoke(level);
|
||||||
|
_isLoading = false;
|
||||||
Debug.Log("level loaded successfully");
|
Debug.Log("level loaded successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// permet de loader un scriptable object de niveau
|
/// load a Level scriptable object using its name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="levelName">le nom du niveau à loader</param>
|
/// <param name="levelName">the name of the loaded Level</param>
|
||||||
/// <param name="shouldClear">est ce qu'on veut effacer ce qui est déjà là?</param>
|
/// <param name="shouldClear">should we clear what's already there?</param>
|
||||||
public void LoadLevel(string levelName, bool shouldClear = false)
|
/// <param name="placementAnimation">the tiles falling animation</param>
|
||||||
|
public async Task LoadLevel(string levelName, PlacementAnimationHandler placementAnimation = null)
|
||||||
{
|
{
|
||||||
if (shouldClear)
|
|
||||||
{
|
|
||||||
ClearLevel();
|
|
||||||
}
|
|
||||||
|
|
||||||
//fetch level from database
|
//fetch level from database
|
||||||
_currentLevel = Database.Instance.ScriptableObjects[levelName] as Level;
|
_currentLevel = Database.Instance.ScriptableObjects[levelName] as Level;
|
||||||
|
|
||||||
LoadLevel(_currentLevel, shouldClear);
|
await LoadLevel(_currentLevel, placementAnimation).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveFile()
|
public void SaveFile()
|
||||||
@ -239,8 +266,7 @@ public class LevelManager : Singleton<LevelManager>
|
|||||||
var otherDict = dicts.Find(x => x[nameof(ILevelObject.ObjectType)].ToString() == nameof(ILevelObject.ObjectType.Other));
|
var otherDict = dicts.Find(x => x[nameof(ILevelObject.ObjectType)].ToString() == nameof(ILevelObject.ObjectType.Other));
|
||||||
DictToOtherValues(otherDict);
|
DictToOtherValues(otherDict);
|
||||||
|
|
||||||
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Invoke(_currentLevel);
|
||||||
LevelLoaded?.Invoke(_currentLevel);
|
|
||||||
Debug.Log("game loaded successfully");
|
Debug.Log("game loaded successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,34 +1,113 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using GatherAndDefend.LevelEditor;
|
||||||
using Level = GatherAndDefend.LevelEditor.Level;
|
using System.Collections;
|
||||||
public class LevelManagerScript : MonoBehaviour
|
using UnityEngine.Tilemaps;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
using GatherAndDefend.Events;
|
||||||
|
using static LevelManager;
|
||||||
|
|
||||||
|
/// <param name="position">The position the tile should be placed on</param>
|
||||||
|
/// <param name="tile">the tile we should place</param>
|
||||||
|
/// <param name="tilePlacement">the action of placing the tile on the tilemap</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public delegate Task PlacementAnimationHandler(GatherAndDefend.LevelEditor.TileData tileData, Action tilePlacement, Func<bool> shouldKillTask);
|
||||||
|
public class LevelManagerScript : SingletonBehaviour<LevelManagerScript>
|
||||||
{
|
{
|
||||||
[Scene][SerializeField]
|
private Action updateAction = null;
|
||||||
private string _gameScene;
|
public bool loadOnStart = false;
|
||||||
[SerializeField]
|
public Level firstLevel;
|
||||||
private Level _firstLevel;
|
async void Start()
|
||||||
private void Start()
|
|
||||||
{
|
{
|
||||||
LevelManager.Instance.LevelTransform = transform;
|
//only when the level is loaded do we start updating
|
||||||
int levelToLoadFromWorldMap = PlayerPrefs.GetInt("LevelToLoad", -1);
|
EventAggregator.Instance.GetEvent<LevelLoadedEvent>().Attach(Instance_LevelLoaded);
|
||||||
if (levelToLoadFromWorldMap != -1)
|
EventAggregator.Instance.GetEvent<ExitingLevelEvent>().Attach(KillLoading);
|
||||||
|
if (loadOnStart && firstLevel)
|
||||||
{
|
{
|
||||||
string lvlName = $"Level{levelToLoadFromWorldMap}";
|
await LevelManager.Instance.LoadLevel(firstLevel, PlacementAnimation);
|
||||||
LevelManager.Instance.LoadLevel(lvlName, true);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else if (_firstLevel)
|
|
||||||
{
|
|
||||||
LevelManager.Instance.LoadLevel(_firstLevel, true);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
void OnDestroy()
|
||||||
{
|
{
|
||||||
Debug.LogWarning("there is no first level set in the level manager script");
|
EventAggregator.Instance.GetEvent<ExitingLevelEvent>().Detach(KillLoading);
|
||||||
}
|
updateAction = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
LevelManager.Instance.UpdateLevel();
|
updateAction?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Instance_LevelLoaded(Level level)
|
||||||
|
{
|
||||||
|
//only when the level is loaded do we start updating
|
||||||
|
updateAction = LevelManager.Instance.UpdateLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// the tile falls from the top of the screen, up to it's position on the tilemap
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="position">where it should land</param>
|
||||||
|
/// <param name="tile">what the tile represents</param>
|
||||||
|
/// <param name="putTileOnTilemap">the action of actually placing the tile</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task PlacementAnimation(GatherAndDefend.LevelEditor.TileData tile, Action putTileOnTilemap, Func<bool> shouldKillTask)
|
||||||
|
{
|
||||||
|
const string layer = "Unit";
|
||||||
|
float speed = 0;
|
||||||
|
float acceleration = -9.81f;
|
||||||
|
|
||||||
|
//create the falling GameObject that will placehold for the tile
|
||||||
|
var tilePlaceholder = new GameObject("tile");
|
||||||
|
tilePlaceholder.transform.SetParent(Instance.transform);
|
||||||
|
var rend = tilePlaceholder.AddComponent<SpriteRenderer>();
|
||||||
|
rend.sortingOrder = 10;
|
||||||
|
rend.sortingLayerName = layer;
|
||||||
|
|
||||||
|
if (tile.Tile is LevelTile)
|
||||||
|
{
|
||||||
|
rend.sprite = (tile.Tile as LevelTile).Sprite;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rend.sprite = (tile.Tile as Tile).sprite;
|
||||||
|
}
|
||||||
|
|
||||||
|
//position the tile over the board (past the camera's FOV)
|
||||||
|
tilePlaceholder.transform.position = tile.Position + Vector3.up * Camera.main.orthographicSize * 2;
|
||||||
|
|
||||||
|
var delta = tilePlaceholder.transform.position - tile.Position;
|
||||||
|
var direction = delta.normalized;
|
||||||
|
var signY = delta.y / Mathf.Abs(delta.y);
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
//if the placeholder was destroyed, stop
|
||||||
|
if (!tilePlaceholder) break;
|
||||||
|
|
||||||
|
//make the placeholder fall and check if we went past the target position
|
||||||
|
speed += acceleration * Time.deltaTime;
|
||||||
|
tilePlaceholder.transform.position += speed * Time.deltaTime * direction;
|
||||||
|
var newDelta = tilePlaceholder.transform.position - tile.Position;
|
||||||
|
var newSign = newDelta.y / Mathf.Abs(newDelta.y);
|
||||||
|
|
||||||
|
if (newSign != signY) break;
|
||||||
|
|
||||||
|
if (shouldKillTask())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await Task.Yield();
|
||||||
|
}
|
||||||
|
|
||||||
|
//place the tile and destroy the placeholder
|
||||||
|
putTileOnTilemap.Invoke();
|
||||||
|
Destroy(tilePlaceholder);
|
||||||
|
}
|
||||||
|
void KillLoading()
|
||||||
|
{
|
||||||
|
LevelManager.Instance.KillLoading();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
109
Assets/Scripts/LoadingManager.cs
Normal file
109
Assets/Scripts/LoadingManager.cs
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
using GatherAndDefend.Events;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// manages the logic of loading
|
||||||
|
/// </summary>
|
||||||
|
public class LoadingManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public const string LevelToLoad = nameof(LevelToLoad);
|
||||||
|
public const string SceneToLoad = nameof(SceneToLoad);
|
||||||
|
public const int NoLevel = -1;
|
||||||
|
|
||||||
|
private LoadingScreen loadingScreen;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
loadingScreen = GetComponent<LoadingScreen>();
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenActivatedEvent>().Attach(LoadTargetSceneAndCloseOthers);
|
||||||
|
loadingScreen.ShowLoadingScreen();
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
foreach (var button in FindObjectsOfType<Button>())
|
||||||
|
{
|
||||||
|
button.enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
foreach (var button in FindObjectsOfType<Button>())
|
||||||
|
{
|
||||||
|
button.enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// loads the target scene after given time
|
||||||
|
/// </summary>
|
||||||
|
private void LoadTargetSceneAndCloseOthers()
|
||||||
|
{
|
||||||
|
StartCoroutine(LoadSceneAfterTime());
|
||||||
|
|
||||||
|
IEnumerator LoadSceneAfterTime()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(GlobalConfig.Instance.Current.loadingAddedTime);
|
||||||
|
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenActivatedEvent>().Detach(LoadTargetSceneAndCloseOthers);
|
||||||
|
SceneManager.sceneLoaded += StartHidingLoadingScreen;
|
||||||
|
|
||||||
|
var sceneToLoad = PlayerPrefs.GetString(SceneToLoad);
|
||||||
|
|
||||||
|
//unload all scenes except loading screen
|
||||||
|
for (int i = 0; i < SceneManager.sceneCount; i++)
|
||||||
|
{
|
||||||
|
var scene = SceneManager.GetSceneAt(i);
|
||||||
|
if (scene.name == gameObject.scene.name) continue;
|
||||||
|
SceneManager.UnloadSceneAsync(scene.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
SceneManager.LoadScene(sceneToLoad, LoadSceneMode.Additive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// hide loading screen after target scene has finished loading
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="arg0">unused</param>
|
||||||
|
/// <param name="arg1">unused</param>
|
||||||
|
private void StartHidingLoadingScreen(Scene arg0, LoadSceneMode arg1)
|
||||||
|
{
|
||||||
|
SceneManager.sceneLoaded -= StartHidingLoadingScreen;
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenDeactivatedEvent>().Attach(StartLoadingLevel);
|
||||||
|
loadingScreen.HideLoadingScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// when loading screen is hidden, we load the level if we have a level to load (might not, if we have loaded another scene than the Game scene)
|
||||||
|
/// </summary>
|
||||||
|
private void StartLoadingLevel()
|
||||||
|
{
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenDeactivatedEvent>().Detach(StartLoadingLevel);
|
||||||
|
|
||||||
|
var levelToLoad = PlayerPrefs.GetInt(LevelToLoad, NoLevel);
|
||||||
|
if(levelToLoad != NoLevel)
|
||||||
|
{
|
||||||
|
string lvlName = $"Level{levelToLoad}";
|
||||||
|
_ = LevelManager.Instance.LoadLevel(lvlName, LevelManagerScript.PlacementAnimation);
|
||||||
|
}
|
||||||
|
UnloadLoadingScreenScene();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// close the loading screen scene and start playing! w00t w00t
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="level"></param>
|
||||||
|
private void UnloadLoadingScreenScene()
|
||||||
|
{
|
||||||
|
SceneManager.UnloadSceneAsync(gameObject.scene.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
11
Assets/Scripts/LoadingManager.cs.meta
Normal file
11
Assets/Scripts/LoadingManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aef75be033508a4498fa7f546d6ebef2
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
80
Assets/Scripts/LoadingScreen.cs
Normal file
80
Assets/Scripts/LoadingScreen.cs
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using UnityEditor;
|
||||||
|
using GatherAndDefend.Events;
|
||||||
|
|
||||||
|
[CustomEditor(typeof(LoadingScreen))]
|
||||||
|
public class LoadingScreenEditor : Editor
|
||||||
|
{
|
||||||
|
public override void OnInspectorGUI()
|
||||||
|
{
|
||||||
|
DrawDefaultInspector();
|
||||||
|
if (!Application.isPlaying) return;
|
||||||
|
if (GUILayout.Button("start"))
|
||||||
|
{
|
||||||
|
(target as LoadingScreen).ShowLoadingScreen();
|
||||||
|
}
|
||||||
|
else if (GUILayout.Button("stop"))
|
||||||
|
{
|
||||||
|
(target as LoadingScreen).HideLoadingScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// the view-model associated with the loading screen view.
|
||||||
|
/// </summary>
|
||||||
|
public class LoadingScreen : SingletonBehaviour<LoadingScreen>
|
||||||
|
{
|
||||||
|
[Header("Screen")]
|
||||||
|
public CanvasGroup blueScreen;
|
||||||
|
public float fadeInDuration = 1;
|
||||||
|
public float fadeOutDuration = 1;
|
||||||
|
|
||||||
|
public GameObject cloudPrefab;
|
||||||
|
public int maxClouds = 10;
|
||||||
|
public CloudAnimation.Properties cloudProperties;
|
||||||
|
private List<CloudAnimation> clouds = new List<CloudAnimation>();
|
||||||
|
private Coroutine screenCoroutine, cloudCoroutine;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private IEnumerator SpawnClouds()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
var randPos = Extensions.RandomInRectangle(Screen.width + 100, Screen.height - 100);
|
||||||
|
var cloudInstance = Instantiate(cloudPrefab, randPos, Quaternion.identity);
|
||||||
|
cloudInstance.transform.SetParent(transform);
|
||||||
|
var cloudComponent = cloudInstance.GetComponent<CloudAnimation>();
|
||||||
|
|
||||||
|
cloudComponent.properties = cloudProperties;
|
||||||
|
clouds.Add(cloudComponent);
|
||||||
|
yield return new WaitForSeconds(fadeInDuration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private IEnumerator EnableLoadingScreen()
|
||||||
|
{
|
||||||
|
yield return blueScreen.FadeTo(1, fadeInDuration);
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenActivatedEvent>().Invoke();
|
||||||
|
}
|
||||||
|
private IEnumerator DisableLoadingScreen()
|
||||||
|
{
|
||||||
|
yield return blueScreen.FadeTo(0, fadeOutDuration);
|
||||||
|
EventAggregator.Instance.GetEvent<ScreenDeactivatedEvent>().Invoke();
|
||||||
|
}
|
||||||
|
public void ShowLoadingScreen()
|
||||||
|
{
|
||||||
|
screenCoroutine = StartCoroutine(EnableLoadingScreen());
|
||||||
|
cloudCoroutine = StartCoroutine(SpawnClouds());
|
||||||
|
}
|
||||||
|
public void HideLoadingScreen()
|
||||||
|
{
|
||||||
|
StopCoroutine(screenCoroutine);
|
||||||
|
StopCoroutine(cloudCoroutine);
|
||||||
|
clouds.FindAll(x => x).ForEach(x => x.Kill());
|
||||||
|
StartCoroutine(DisableLoadingScreen());
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/LoadingScreen.cs.meta
Normal file
11
Assets/Scripts/LoadingScreen.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8a9b542d59e659741b005556831a3390
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -68,6 +68,7 @@ public class ResourceMaker : MonoBehaviour
|
|||||||
|
|
||||||
public void GenerateResource()
|
public void GenerateResource()
|
||||||
{
|
{
|
||||||
|
if (!_rigidbody) return;
|
||||||
_isPlaying = true;
|
_isPlaying = true;
|
||||||
_rigidbody.gravityScale = 0.0f;
|
_rigidbody.gravityScale = 0.0f;
|
||||||
_rigidbody.velocity = Vector2.zero;
|
_rigidbody.velocity = Vector2.zero;
|
||||||
|
|||||||
@ -24,6 +24,8 @@ public class Root : MonoBehaviour
|
|||||||
Rigidbody2D _rigidbodyAlly;
|
Rigidbody2D _rigidbodyAlly;
|
||||||
Rigidbody2D _rigidbodyOpponent;
|
Rigidbody2D _rigidbodyOpponent;
|
||||||
_rigidbodyAlly = _entity.GetComponent<Rigidbody2D>();
|
_rigidbodyAlly = _entity.GetComponent<Rigidbody2D>();
|
||||||
|
|
||||||
|
if (!_entity.Enemy) return;
|
||||||
_rigidbodyOpponent = _entity.Enemy.GetComponent<Rigidbody2D>();
|
_rigidbodyOpponent = _entity.Enemy.GetComponent<Rigidbody2D>();
|
||||||
|
|
||||||
Vector3 spawnPos = (_projectileSpawn == null) ? _rigidbodyAlly.position : _projectileSpawn.position;
|
Vector3 spawnPos = (_projectileSpawn == null) ? _rigidbodyAlly.position : _projectileSpawn.position;
|
||||||
|
|||||||
5
Assets/Scripts/SceneAttribute.cs
Normal file
5
Assets/Scripts/SceneAttribute.cs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class SceneAttribute : PropertyAttribute
|
||||||
|
{
|
||||||
|
}
|
||||||
11
Assets/Scripts/SceneAttribute.cs.meta
Normal file
11
Assets/Scripts/SceneAttribute.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 81fe69393310ffa48ae32ee2a2d0b677
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,13 +1,13 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using System;
|
|
||||||
using UnityEditor;
|
|
||||||
|
|
||||||
public class WorldMapManager : MonoBehaviour
|
public class WorldMapManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[Scene][SerializeField]
|
||||||
|
private string _loadingScreenScene;
|
||||||
|
[Scene][SerializeField]
|
||||||
|
private string _gameScene;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private GameObject[] _buttonList;
|
private GameObject[] _buttonList;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
@ -16,8 +16,6 @@ public class WorldMapManager : MonoBehaviour
|
|||||||
private Sprite _lockedIcon;
|
private Sprite _lockedIcon;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Sprite _savedIcon;
|
private Sprite _savedIcon;
|
||||||
[Scene][SerializeField]
|
|
||||||
private string gameScene;
|
|
||||||
|
|
||||||
private WorldMapSave _worldMapSave;
|
private WorldMapSave _worldMapSave;
|
||||||
|
|
||||||
@ -72,10 +70,12 @@ public class WorldMapManager : MonoBehaviour
|
|||||||
|
|
||||||
public void CallLevelWorld1(int levelToCall)
|
public void CallLevelWorld1(int levelToCall)
|
||||||
{
|
{
|
||||||
|
string levelToGet = "1-" + levelToCall;
|
||||||
if (_buttonList[levelToCall - 1].GetComponent<Image>().sprite.name != "worldmap_level_locked")
|
if (_buttonList[levelToCall - 1].GetComponent<Image>().sprite.name != "worldmap_level_locked")
|
||||||
{
|
{
|
||||||
PlayerPrefs.SetInt("LevelToLoad", levelToCall);
|
PlayerPrefs.SetString(LoadingManager.SceneToLoad, _gameScene);
|
||||||
SceneManager.LoadScene(gameScene);
|
PlayerPrefs.SetInt(LoadingManager.LevelToLoad, levelToCall);
|
||||||
|
SceneManager.LoadScene(_loadingScreenScene, LoadSceneMode.Additive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Assets/bridge_cloud_1.png
Normal file
BIN
Assets/bridge_cloud_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 211 KiB |
147
Assets/bridge_cloud_1.png.meta
Normal file
147
Assets/bridge_cloud_1.png.meta
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 73b56022ea22aa34fa14d354f2264194
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -8,8 +8,11 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/LevelSelect.unity
|
path: Assets/Scenes/LevelSelect.unity
|
||||||
guid: c1efd9104a876984eb669c4bd54598d1
|
guid: c1efd9104a876984eb669c4bd54598d1
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/LoadingScreen.unity
|
||||||
|
guid: 6da14f6006606f840b2df7664c50e1ec
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/Game.unity
|
path: Assets/Scenes/Game.unity
|
||||||
guid: 8c9cfa26abfee488c85f1582747f6a02
|
guid: 435ced5e4c7807f409bbc420fc6b95ad
|
||||||
m_configObjects:
|
m_configObjects:
|
||||||
com.unity.input.settings: {fileID: 11400000, guid: 2670dfbb5772b0248b8c8ccaa6470d9a, type: 2}
|
com.unity.input.settings: {fileID: 11400000, guid: 2670dfbb5772b0248b8c8ccaa6470d9a, type: 2}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user