day one complete

This commit is contained in:
2020-02-01 01:47:44 -05:00
parent 31528efac5
commit 4d72e6851b
7 changed files with 634 additions and 84 deletions

View File

@@ -121,9 +121,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e5f777aa09d2ced42baa1cc6bf9dbe54, type: 3} m_Script: {fileID: 11500000, guid: e5f777aa09d2ced42baa1cc6bf9dbe54, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
secondsLeft: 1 secondsGoingLeft: 1
secondsRight: 1 secondsGoingRight: 1
movementSpeed: 1 movementSpeed: 5
playerCollider: {fileID: 0}
--- !u!50 &3827363133515929334 --- !u!50 &3827363133515929334
Rigidbody2D: Rigidbody2D:
serializedVersion: 4 serializedVersion: 4

View File

@@ -120,6 +120,136 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &113303864
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 113303865}
- component: {fileID: 113303867}
- component: {fileID: 113303866}
- component: {fileID: 113303868}
m_Layer: 0
m_Name: Event Controls
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &113303865
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 113303864}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1713017494}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!483693784 &113303866
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 113303864}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
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: 0
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 &113303867
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 113303864}
m_Enabled: 1
m_Tiles: {}
m_AnimatedTiles: {}
m_TileAssetArray: []
m_TileSpriteArray: []
m_TileMatrixArray: []
m_TileColorArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: 0, y: 0, z: 0}
m_Size: {x: 0, y: 0, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, 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!114 &113303868
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 113303864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 555a3f8aa89a0e84fb6c43249a117f93, type: 3}
m_Name:
m_EditorClassIdentifier:
camera: {fileID: 1146013791}
tile: {fileID: 11400000, guid: 45e32cdeeb7c7994cbd282d9fd4279ec, type: 2}
--- !u!1 &1008122161 --- !u!1 &1008122161
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -187,6 +317,12 @@ MonoBehaviour:
player: {fileID: 1671840916} player: {fileID: 1671840916}
offsetY: 5 offsetY: 5
interpolate: 0.2 interpolate: 0.2
--- !u!20 &1146013791 stripped
Camera:
m_CorrespondingSourceObject: {fileID: 5711328081315814051, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
m_PrefabInstance: {fileID: 1337282921}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1247097598 stripped --- !u!4 &1247097598 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 3827363133515929330, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a, m_CorrespondingSourceObject: {fileID: 3827363133515929330, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
@@ -290,7 +426,6 @@ GameObject:
- component: {fileID: 1671840919} - component: {fileID: 1671840919}
- component: {fileID: 1671840918} - component: {fileID: 1671840918}
- component: {fileID: 1671840921} - component: {fileID: 1671840921}
- component: {fileID: 1671840922}
m_Layer: 10 m_Layer: 10
m_Name: Player m_Name: Player
m_TagString: Untagged m_TagString: Untagged
@@ -423,27 +558,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: dec097e595825c54ebc84fbd9a143fae, type: 3} m_Script: {fileID: 11500000, guid: dec097e595825c54ebc84fbd9a143fae, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
runSpeed: 16 runSpeed: 14
jumpSpeed: 20 jumpSpeed: 22
runFasterFactor: 1.5 runFasterFactor: 1.5
--- !u!68 &1671840922 groundErrorThreshold: 0.05
EdgeCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1671840916}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_EdgeRadius: 0
m_Points:
- {x: -1, y: -1.01}
- {x: 1, y: -1.01}
--- !u!1 &1713017493 --- !u!1 &1713017493
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -474,6 +592,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2120494077} - {fileID: 2120494077}
- {fileID: 113303865}
m_Father: {fileID: 1008122163} m_Father: {fileID: 1008122163}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -639,52 +758,74 @@ CompositeCollider2D:
m_ColliderPaths: m_ColliderPaths:
- m_Collider: {fileID: 2120494080} - m_Collider: {fileID: 2120494080}
m_ColliderPaths: m_ColliderPaths:
- - X: 300000100 - - X: 60000041
Y: -40000041 Y: -100
- X: 300000100 - X: 60000100
Y: -29999959 Y: -41
- X: 300000041 - X: 60000100
Y: -29999900 Y: 9999900
- X: 20000100 - X: 140000041
Y: -29999900 Y: 9999900
- X: 20000100 - X: 140000100
Y: -30000041 Y: 9999959
- X: 20000041 - X: 140000100
Y: -30000100 Y: 20000041
- X: 140000041
Y: 20000100
- X: 60000100
Y: 20000100
- X: 60000100
Y: 40000041
- X: 60000041
Y: 40000100
- X: 50000100
Y: 40000100
- X: 50000100
Y: 50000041
- X: 50000041
Y: 50000100
- X: 9999959 - X: 9999959
Y: -30000100 Y: 50000100
- X: 9999900 - X: 9999900
Y: -30000041 Y: 50000041
- X: 9999900 - X: 9999900
Y: -29999900 Y: -9999900
- X: 100 - X: -10000041
Y: -29999900 Y: -9999900
- X: 100 - X: -10000100
Y: -30000041 Y: -9999959
- X: 41 - X: -10000100
Y: -30000100
- X: -20000041
Y: -30000100
- X: -20000100
Y: -30000041
- X: -20000100
Y: -30000000 Y: -30000000
- X: -160000000 - X: -160000000
Y: -30000000 Y: -30000000
- X: -160000000 - X: -160000000
Y: -40000000 Y: -40000000
- X: -100 - X: 300000000
Y: -40000000 Y: -40000000
- X: -100 - X: 300000000
Y: -40000041 Y: -30000000
- X: -41 - X: 30000100
Y: -40000100 Y: -30000000
- X: 300000041 - X: 30000100
Y: -40000100 Y: -100
m_CompositePaths: m_CompositePaths:
m_Paths: m_Paths:
- - {x: 29.999975, y: -4.00001} - - {x: 29.999971, y: -4}
- {x: 29.999975, y: -2.99999} - {x: 29.999971, y: -3}
- {x: 3.00001, y: -2.9999707}
- {x: 3.0000393, y: -0.00001}
- {x: 6.00001, y: 0.0000252}
- {x: 6.000039, y: 0.99999}
- {x: 14.00001, y: 1.0000252}
- {x: 13.999974, y: 2.00001}
- {x: 6.00001, y: 2.0000393}
- {x: 5.9999747, y: 4.00001}
- {x: 5.00001, y: 4.000039}
- {x: 4.9999747, y: 5.00001}
- {x: 0.99999, y: 4.9999747}
- {x: 0.9999606, y: -0.99999}
- {x: -1.00001, y: -1.0000252}
- {x: -1.0000395, y: -3}
- {x: -16, y: -3.0000293} - {x: -16, y: -3.0000293}
- {x: -15.999971, y: -4} - {x: -15.999971, y: -4}
m_VertexDistance: 0.0005 m_VertexDistance: 0.0005
@@ -765,7 +906,7 @@ TilemapRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32} m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0.5, y: 0.5, z: 0} m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16 m_MaxChunkCount: 16
m_MaxFrameAge: 16 m_MaxFrameAge: 16
m_SortOrder: 0 m_SortOrder: 0
@@ -1195,15 +1336,393 @@ Tilemap:
m_ObjectToInstantiate: {fileID: 0} m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1 m_TileFlags: 1
m_ColliderType: 1 m_ColliderType: 1
- first: {x: -1, y: -3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 0, y: -3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: -3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: -3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: -1, y: -2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 0, y: -2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: -2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: -2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: -1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: -1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 3, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 4, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 5, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 3, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 4, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 5, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 6, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 7, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 8, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 9, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 10, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 11, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 12, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 13, y: 1, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: 2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: 2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 3, y: 2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 4, y: 2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 5, y: 2, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: 3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: 3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 3, y: 3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 4, y: 3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 5, y: 3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 1, y: 4, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 2, y: 4, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 3, y: 4, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
- first: {x: 4, y: 4, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
m_AnimatedTiles: {} m_AnimatedTiles: {}
m_TileAssetArray: m_TileAssetArray:
- m_RefCount: 46 - m_RefCount: 88
m_Data: {fileID: 11400000, guid: 45e32cdeeb7c7994cbd282d9fd4279ec, type: 2} m_Data: {fileID: 11400000, guid: 45e32cdeeb7c7994cbd282d9fd4279ec, type: 2}
m_TileSpriteArray: m_TileSpriteArray:
- m_RefCount: 46 - m_RefCount: 88
m_Data: {fileID: 21300000, guid: 37077009adda5004cad02be3083a5bff, type: 3} m_Data: {fileID: 21300000, guid: 37077009adda5004cad02be3083a5bff, type: 3}
m_TileMatrixArray: m_TileMatrixArray:
- m_RefCount: 46 - m_RefCount: 88
m_Data: m_Data:
e00: 1 e00: 1
e01: 0 e01: 0
@@ -1222,12 +1741,12 @@ Tilemap:
e32: 0 e32: 0
e33: 1 e33: 1
m_TileColorArray: m_TileColorArray:
- m_RefCount: 46 - m_RefCount: 88
m_Data: {r: 1, g: 1, b: 1, a: 1} m_Data: {r: 1, g: 1, b: 1, a: 1}
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: -16, y: -5, z: 0} m_Origin: {x: -16, y: -5, z: 0}
m_Size: {x: 52, y: 8, z: 1} m_Size: {x: 52, y: 10, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0} m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0 m_TileOrientation: 0
m_TileOrientationMatrix: m_TileOrientationMatrix:
@@ -1329,21 +1848,6 @@ PrefabInstance:
propertyPath: m_GravityScale propertyPath: m_GravityScale
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3827363133515929335, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
type: 3}
propertyPath: movementSpeed
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3827363133515929335, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
type: 3}
propertyPath: secondsGoingLeft
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 3827363133515929335, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
type: 3}
propertyPath: secondsGoingRight
value: 0.8
objectReference: {fileID: 0}
- target: {fileID: 3827363133515929335, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a, - target: {fileID: 3827363133515929335, guid: ef13d4cb4d0a2b043b4f2a6cc75ca48a,
type: 3} type: 3}
propertyPath: playerCollider propertyPath: playerCollider

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class EventControlsDisplay : MonoBehaviour
{
[SerializeField] private Camera camera;
private Tilemap tilemap;
[SerializeField] private Tile tile;
void Start()
{
tilemap = GetComponent<Tilemap>();
}
void Update()
{
tilemap.SetTile(new Vector3Int((int)camera.transform.position.x, (int)camera.transform.position.y, (int)camera.transform.position.z), tile);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 555a3f8aa89a0e84fb6c43249a117f93
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -7,18 +7,22 @@ public class Player : MonoBehaviour
[SerializeField] private float runSpeed = 10f; [SerializeField] private float runSpeed = 10f;
[SerializeField] private float jumpSpeed = 10f; [SerializeField] private float jumpSpeed = 10f;
[SerializeField] private float runFasterFactor = 1.5f; [SerializeField] private float runFasterFactor = 1.5f;
[SerializeField] private float groundErrorThreshold = 0.01f;
private Rigidbody2D rigidbody; private Rigidbody2D rigidbody;
private PolygonCollider2D collider;
private bool isInEncounter = false; private bool isInEncounter = false;
private void Start() private void Start()
{ {
rigidbody = GetComponent<Rigidbody2D>(); rigidbody = GetComponent<Rigidbody2D>();
collider = GetComponent<PolygonCollider2D>();
} }
private void Update() private void Update()
{ {
Debug.Log(HasEncounteredEnemy()); //isInEncounter = HasEncounteredEnemy();
//if (isInEncounter)
MovePlayer(); MovePlayer();
} }
@@ -30,10 +34,8 @@ public class Player : MonoBehaviour
private void Jump() private void Jump()
{ {
var playerOnGround = rigidbody.IsTouchingLayers(LayerMask.GetMask(LayerNames.Ground));
// Jump // Jump
if (Input.GetKey(KeyCode.Space) && playerOnGround) if (Input.GetKey(KeyCode.Space) && IsPlayerOnGround())
{ {
rigidbody.velocity += new Vector2(0, jumpSpeed); rigidbody.velocity += new Vector2(0, jumpSpeed);
rigidbody.velocity = new Vector2(rigidbody.velocity.x, rigidbody.velocity = new Vector2(rigidbody.velocity.x,
@@ -62,6 +64,16 @@ public class Player : MonoBehaviour
} }
} }
private bool IsPlayerOnGround()
{
RaycastHit2D hit = Physics2D.Raycast(transform.position,
-Vector2.up,
1f + groundErrorThreshold,
LayerMask.GetMask(LayerNames.Ground));
return hit.collider != null && hit.collider.IsTouching(collider);
}
private bool HasEncounteredEnemy() private bool HasEncounteredEnemy()
{ {
return rigidbody.IsTouchingLayers(LayerMask.GetMask(LayerNames.Enemies)); return rigidbody.IsTouchingLayers(LayerMask.GetMask(LayerNames.Enemies));