commit
1167746499
21 changed files with 382 additions and 152 deletions
|
@ -59,7 +59,7 @@ AnimatorStateMachine:
|
||||||
m_ChildStates:
|
m_ChildStates:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 1102162894460579672}
|
m_State: {fileID: 1102162894460579672}
|
||||||
m_Position: {x: 200, y: 0, z: 0}
|
m_Position: {x: 240, y: 48, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 434 B |
|
@ -1,6 +1,6 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!1 &5959564480851182330
|
--- !u!1 &1538214466168189615
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
@ -8,38 +8,36 @@ GameObject:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 5959564480851182334}
|
- component: {fileID: 3243993883904879596}
|
||||||
- component: {fileID: 5959564480851182333}
|
- component: {fileID: 3212428174306319952}
|
||||||
- component: {fileID: 5959564480851182332}
|
m_Layer: 0
|
||||||
- component: {fileID: 5959564480851182331}
|
m_Name: exitDoorPrefab
|
||||||
m_Layer: 8
|
|
||||||
m_Name: bman_wall
|
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!4 &5959564480851182334
|
--- !u!4 &3243993883904879596
|
||||||
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: 5959564480851182330}
|
m_GameObject: {fileID: 1538214466168189615}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 5, y: 0, z: 0}
|
m_LocalPosition: {x: 10.299996, y: -4.6040254, z: -0.13553935}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
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!212 &5959564480851182333
|
--- !u!212 &3212428174306319952
|
||||||
SpriteRenderer:
|
SpriteRenderer:
|
||||||
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: 5959564480851182330}
|
m_GameObject: {fileID: 1538214466168189615}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_CastShadows: 0
|
m_CastShadows: 0
|
||||||
m_ReceiveShadows: 0
|
m_ReceiveShadows: 0
|
||||||
|
@ -69,62 +67,15 @@ SpriteRenderer:
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 9
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 21300000, guid: 96d3693302b284c92ba9c394bb4f72c1, type: 3}
|
m_Sprite: {fileID: 21300000, guid: ac1b266a61f9d43feb33de3a91647f99, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
m_DrawMode: 0
|
m_DrawMode: 0
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 0.32, y: 0.32}
|
||||||
m_AdaptiveModeThreshold: 0.5
|
m_AdaptiveModeThreshold: 0.5
|
||||||
m_SpriteTileMode: 0
|
m_SpriteTileMode: 0
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!50 &5959564480851182332
|
|
||||||
Rigidbody2D:
|
|
||||||
serializedVersion: 4
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5959564480851182330}
|
|
||||||
m_BodyType: 2
|
|
||||||
m_Simulated: 1
|
|
||||||
m_UseFullKinematicContacts: 0
|
|
||||||
m_UseAutoMass: 0
|
|
||||||
m_Mass: 1
|
|
||||||
m_LinearDrag: 0
|
|
||||||
m_AngularDrag: 0.05
|
|
||||||
m_GravityScale: 0
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_Interpolate: 0
|
|
||||||
m_SleepingMode: 1
|
|
||||||
m_CollisionDetection: 0
|
|
||||||
m_Constraints: 0
|
|
||||||
--- !u!61 &5959564480851182331
|
|
||||||
BoxCollider2D:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5959564480851182330}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Density: 1
|
|
||||||
m_Material: {fileID: 0}
|
|
||||||
m_IsTrigger: 0
|
|
||||||
m_UsedByEffector: 0
|
|
||||||
m_UsedByComposite: 0
|
|
||||||
m_Offset: {x: 0.5, y: 0.5}
|
|
||||||
m_SpriteTilingProperty:
|
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
pivot: {x: 0, y: 0}
|
|
||||||
oldSize: {x: 1, y: 1}
|
|
||||||
newSize: {x: 1, y: 1}
|
|
||||||
adaptiveTilingThreshold: 0.5
|
|
||||||
drawMode: 0
|
|
||||||
adaptiveTiling: 0
|
|
||||||
m_AutoTiling: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Size: {x: 1, y: 1}
|
|
||||||
m_EdgeRadius: 0
|
|
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: dd25aabed7c6c491eb405f1e5c5f4d99
|
guid: 519235375d069406f909265766078ad0
|
||||||
PrefabImporter:
|
PrefabImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
BIN
Assets/DevMocks/old_door.png
Normal file
BIN
Assets/DevMocks/old_door.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 948 B |
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 96d3693302b284c92ba9c394bb4f72c1
|
guid: ac1b266a61f9d43feb33de3a91647f99
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
fileIDToRecycleName: {}
|
fileIDToRecycleName: {}
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
@ -97,7 +97,7 @@ TextureImporter:
|
||||||
outline: []
|
outline: []
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID: 860cb4d89fb584a81bab705ec5b1d21f
|
spriteID: fa0375da4ccc24a1a804016419fbf262
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
8
Assets/Prefabs/Managers.meta
Normal file
8
Assets/Prefabs/Managers.meta
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 56431c4abf09947ed9b3f37ac715caca
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
65
Assets/Prefabs/Managers/GameManager.prefab
Normal file
65
Assets/Prefabs/Managers/GameManager.prefab
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &158905820630581597
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 158905820630581587}
|
||||||
|
- component: {fileID: 158905820630581586}
|
||||||
|
- component: {fileID: 158905820630581596}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &158905820630581587
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 158905820630581597}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 7.2735596, y: -6.5702896, z: -10.295408}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &158905820630581586
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 158905820630581597}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 697f5ae5656c74dcd8d7f5d619adb0ac, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &158905820630581596
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 158905820630581597}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 308dfc6b26c3b422faf1717231fc888b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
boardHolder: {fileID: 0}
|
||||||
|
startPosition: {fileID: 0}
|
||||||
|
indestructibleWallPrefab: {fileID: 5996206011854593075, guid: 84b92ac1e96d940bda97d1b1125887d7,
|
||||||
|
type: 3}
|
||||||
|
destructibleWallPrefabs:
|
||||||
|
- {fileID: 4177940729222266681, guid: da559e681f8d34d58bb5f3457045664a, type: 3}
|
||||||
|
- {fileID: 8729402555587492036, guid: 7e54504f1e1de4334be2e6a115b838c2, type: 3}
|
7
Assets/Prefabs/Managers/GameManager.prefab.meta
Normal file
7
Assets/Prefabs/Managers/GameManager.prefab.meta
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fdaa7451ab31b477b930076bbc888bab
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -71,7 +71,7 @@ SpriteRenderer:
|
||||||
m_LightmapParameters: {fileID: 0}
|
m_LightmapParameters: {fileID: 0}
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 1
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 21300000, guid: 69237087e6b0b42ac8d25d0035b2e01b, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 69237087e6b0b42ac8d25d0035b2e01b, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
|
@ -97,8 +97,6 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
movementSpeed: 4
|
movementSpeed: 4
|
||||||
respawnPosition: {fileID: 0}
|
respawnPosition: {fileID: 0}
|
||||||
bombPrefab: {fileID: 5909392949477884267, guid: 28467e0d65b5d3844bf1862ac0c49ad9,
|
|
||||||
type: 3}
|
|
||||||
--- !u!50 &6843575828445418653
|
--- !u!50 &6843575828445418653
|
||||||
Rigidbody2D:
|
Rigidbody2D:
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
|
|
|
@ -12,6 +12,7 @@ GameObject:
|
||||||
- component: {fileID: 4177940729222266823}
|
- component: {fileID: 4177940729222266823}
|
||||||
- component: {fileID: 4177940729222266822}
|
- component: {fileID: 4177940729222266822}
|
||||||
- component: {fileID: 2823577682722293689}
|
- component: {fileID: 2823577682722293689}
|
||||||
|
- component: {fileID: 4525879622828546227}
|
||||||
m_Layer: 8
|
m_Layer: 8
|
||||||
m_Name: bman_destructible_wall1
|
m_Name: bman_destructible_wall1
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -50,7 +51,7 @@ Rigidbody2D:
|
||||||
m_LinearDrag: 0
|
m_LinearDrag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 6200000, guid: dc8eb6133faaf45f6820487d0d28b47f, type: 2}
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_SleepingMode: 1
|
m_SleepingMode: 1
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
|
@ -93,6 +94,22 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: b30e7124fcdf4e1f92fc7dd42d8c7298, type: 3}
|
m_Script: {fileID: 11500000, guid: b30e7124fcdf4e1f92fc7dd42d8c7298, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
explosionPrefab: {fileID: 2086996798441195857, guid: 13213ac562d960e4e8c33d53d40a516c,
|
||||||
|
type: 3}
|
||||||
|
exitDoorPrefab: {fileID: 1538214466168189615, guid: 519235375d069406f909265766078ad0,
|
||||||
|
type: 3}
|
||||||
|
--- !u!114 &4525879622828546227
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4177940729222266681}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f76d22fdcb894023bd111d6b5bc1da5e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &5688352134163068791
|
--- !u!1 &5688352134163068791
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -91,6 +91,7 @@ GameObject:
|
||||||
- component: {fileID: 8360026854687715433}
|
- component: {fileID: 8360026854687715433}
|
||||||
- component: {fileID: 1860172021824364478}
|
- component: {fileID: 1860172021824364478}
|
||||||
- component: {fileID: 3937551180478767488}
|
- component: {fileID: 3937551180478767488}
|
||||||
|
- component: {fileID: 2850266447828806432}
|
||||||
m_Layer: 8
|
m_Layer: 8
|
||||||
m_Name: bman_destructible_wall2
|
m_Name: bman_destructible_wall2
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -129,7 +130,7 @@ Rigidbody2D:
|
||||||
m_LinearDrag: 0
|
m_LinearDrag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 6200000, guid: dc8eb6133faaf45f6820487d0d28b47f, type: 2}
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_SleepingMode: 1
|
m_SleepingMode: 1
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
|
@ -172,3 +173,19 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: b30e7124fcdf4e1f92fc7dd42d8c7298, type: 3}
|
m_Script: {fileID: 11500000, guid: b30e7124fcdf4e1f92fc7dd42d8c7298, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
explosionPrefab: {fileID: 2086996798441195857, guid: 13213ac562d960e4e8c33d53d40a516c,
|
||||||
|
type: 3}
|
||||||
|
exitDoorPrefab: {fileID: 1538214466168189615, guid: 519235375d069406f909265766078ad0,
|
||||||
|
type: 3}
|
||||||
|
--- !u!114 &2850266447828806432
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8729402555587492036}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f76d22fdcb894023bd111d6b5bc1da5e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
|
|
@ -11,6 +11,7 @@ GameObject:
|
||||||
- component: {fileID: 3400997238130971262}
|
- component: {fileID: 3400997238130971262}
|
||||||
- component: {fileID: 3305047832243218078}
|
- component: {fileID: 3305047832243218078}
|
||||||
- component: {fileID: 7808374684255412738}
|
- component: {fileID: 7808374684255412738}
|
||||||
|
- component: {fileID: 9150705305556807559}
|
||||||
m_Layer: 8
|
m_Layer: 8
|
||||||
m_Name: bman_indestructible_wall1
|
m_Name: bman_indestructible_wall1
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -49,7 +50,7 @@ Rigidbody2D:
|
||||||
m_LinearDrag: 0
|
m_LinearDrag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 6200000, guid: dc8eb6133faaf45f6820487d0d28b47f, type: 2}
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_SleepingMode: 1
|
m_SleepingMode: 1
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
|
@ -80,6 +81,18 @@ BoxCollider2D:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 1, y: 1}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
|
--- !u!114 &9150705305556807559
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5996206011854593075}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f76d22fdcb894023bd111d6b5bc1da5e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &6716060611887421146
|
--- !u!1 &6716060611887421146
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -7781,7 +7781,7 @@ CompositeCollider2D:
|
||||||
m_GameObject: {fileID: 69346940}
|
m_GameObject: {fileID: 69346940}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Density: 1
|
m_Density: 1
|
||||||
m_Material: {fileID: 6200000, guid: dc8eb6133faaf45f6820487d0d28b47f, type: 2}
|
m_Material: {fileID: 0}
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_UsedByComposite: 0
|
m_UsedByComposite: 0
|
||||||
|
@ -7835,7 +7835,7 @@ Rigidbody2D:
|
||||||
m_LinearDrag: 0
|
m_LinearDrag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_GravityScale: 1
|
m_GravityScale: 1
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 6200000, guid: 09a32766a59c24bef94b71414d0ccda5, type: 2}
|
||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_SleepingMode: 1
|
m_SleepingMode: 1
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
|
@ -8018,7 +8018,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 266944714}
|
m_GameObject: {fileID: 266944714}
|
||||||
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: -2.7893844}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 97386695}
|
- {fileID: 97386695}
|
||||||
|
@ -8156,7 +8156,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 519420028}
|
m_GameObject: {fileID: 519420028}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 7.7645655, y: -4.0430503, z: -2.7893844}
|
m_LocalPosition: {x: 10.590895, y: -4.0430503, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
|
@ -8206,69 +8206,6 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &840487110
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 840487112}
|
|
||||||
- component: {fileID: 840487113}
|
|
||||||
- component: {fileID: 840487111}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: GameManager
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &840487111
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 840487110}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 308dfc6b26c3b422faf1717231fc888b, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
boardHolder: {fileID: 585332173}
|
|
||||||
startPosition: {fileID: 185746015}
|
|
||||||
indestructibleWallPrefab: {fileID: 5996206011854593075, guid: 84b92ac1e96d940bda97d1b1125887d7,
|
|
||||||
type: 3}
|
|
||||||
destructibleWallPrefabs:
|
|
||||||
- {fileID: 4177940729222266681, guid: da559e681f8d34d58bb5f3457045664a, type: 3}
|
|
||||||
- {fileID: 8729402555587492036, guid: 7e54504f1e1de4334be2e6a115b838c2, type: 3}
|
|
||||||
--- !u!4 &840487112
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 840487110}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 7.2735596, y: -6.5702896, z: -10.295408}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 6
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &840487113
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 840487110}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 697f5ae5656c74dcd8d7f5d619adb0ac, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &1135949884
|
--- !u!1 &1135949884
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8408,6 +8345,85 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: c9b7903151183144dbf30c9b2ab371b2, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: c9b7903151183144dbf30c9b2ab371b2, type: 3}
|
||||||
|
--- !u!1001 &158905819792232859
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 158905820630581597, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: GameManager
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 7.2735596
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: -6.5702896
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: -10.295408
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 6
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581587, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 158905820630581596, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: boardHolder
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 585332173}
|
||||||
|
- target: {fileID: 158905820630581596, guid: fdaa7451ab31b477b930076bbc888bab,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: startPosition
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 185746015}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: fdaa7451ab31b477b930076bbc888bab, type: 3}
|
||||||
--- !u!1001 &6843575829779162303
|
--- !u!1001 &6843575829779162303
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8420,6 +8436,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Player
|
value: Player
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6843575828445418657, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Layer
|
||||||
|
value: 15
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
@ -8433,7 +8454,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: 7.2106156
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
- target: {fileID: 6843575828445418654, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
@ -8480,10 +8501,5 @@ PrefabInstance:
|
||||||
propertyPath: respawnPosition
|
propertyPath: respawnPosition
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 185746015}
|
objectReference: {fileID: 185746015}
|
||||||
- target: {fileID: 6843575828445418655, guid: d3055091a17dc4aa1accf2e33ccef144,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_SortingOrder
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3}
|
||||||
|
|
59
Assets/Scripts/src/Helpers/DebugHelper.cs
Normal file
59
Assets/Scripts/src/Helpers/DebugHelper.cs
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
// ReSharper disable UnusedMember.Local
|
||||||
|
// ReSharper disable ArrangeTypeMemberModifiers
|
||||||
|
|
||||||
|
namespace src.Helpers
|
||||||
|
{
|
||||||
|
public static class DebugHelper
|
||||||
|
{
|
||||||
|
public static void LogInfo(string message)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.Log(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LogWarning(string message)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.LogWarning(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LogError(string message)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.LogError(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LogException(Exception ex)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.LogException(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DrawRay(Vector3 position, Vector3 direction, Color color)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.DrawRay(position, direction, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DrawLine(Vector3 position, Vector3 direction, Color color)
|
||||||
|
{
|
||||||
|
if (Debug.isDebugBuild)
|
||||||
|
{
|
||||||
|
Debug.DrawLine(position, direction, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Scripts/src/Helpers/DebugHelper.cs.meta
Normal file
3
Assets/Scripts/src/Helpers/DebugHelper.cs.meta
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 36a93a2c984d44bd8d65a9a3ad28894e
|
||||||
|
timeCreated: 1560272684
|
|
@ -8,6 +8,8 @@ namespace src.Wall
|
||||||
{
|
{
|
||||||
private bool _spawnExit;
|
private bool _spawnExit;
|
||||||
private bool _spawnUpgrade;
|
private bool _spawnUpgrade;
|
||||||
|
public GameObject explosionPrefab;
|
||||||
|
public GameObject exitDoorPrefab;
|
||||||
|
|
||||||
public void SpawnsExit()
|
public void SpawnsExit()
|
||||||
{
|
{
|
||||||
|
@ -22,22 +24,28 @@ namespace src.Wall
|
||||||
public float XCoordinate => transform.position.x;
|
public float XCoordinate => transform.position.x;
|
||||||
public float YCoordinate => transform.position.y;
|
public float YCoordinate => transform.position.y;
|
||||||
|
|
||||||
public void OnDestroy()
|
private void BeforeDestroy()
|
||||||
{
|
{
|
||||||
|
var currentPosition = transform.position;
|
||||||
|
Destroy(GetComponent<SpriteRenderer>());
|
||||||
|
Instantiate(explosionPrefab, currentPosition, Quaternion.identity);
|
||||||
if (_spawnExit)
|
if (_spawnExit)
|
||||||
{
|
{
|
||||||
// TODO Spawn an exit
|
Debug.Log($"Destructible spawned exit {transform.position}");
|
||||||
|
Instantiate(exitDoorPrefab, currentPosition, Quaternion.identity);
|
||||||
}
|
}
|
||||||
else if (_spawnUpgrade)
|
else if (_spawnUpgrade)
|
||||||
{
|
{
|
||||||
// TODO Spawn an upgrade, use composition to UpgradeManager
|
Debug.Log($"Destructible spawned upgrade {transform.position}");
|
||||||
// to get random / desired upgrade
|
// TODO: Get and instantiate upgrade from manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onExplosion()
|
public void onExplosion()
|
||||||
{
|
{
|
||||||
Debug.Log("Destructible wall hitted by explosion");
|
Debug.Log($"Destructible wall hit by explosion {transform.position}");
|
||||||
|
BeforeDestroy();
|
||||||
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
65
Assets/Scripts/src/Wall/WallTransparency.cs
Normal file
65
Assets/Scripts/src/Wall/WallTransparency.cs
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using src.Base;
|
||||||
|
using src.Helpers;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace src.Wall
|
||||||
|
{
|
||||||
|
public class WallTransparency : GameplayComponent
|
||||||
|
{
|
||||||
|
private SpriteRenderer _spriteRenderer;
|
||||||
|
private Color _originalSpriteColor;
|
||||||
|
private bool _isTransparent;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
_spriteRenderer = GetComponentInChildren<SpriteRenderer>();
|
||||||
|
_originalSpriteColor = _spriteRenderer.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
var position = transform.position;
|
||||||
|
/* RayCast from the center of the tile up one distance and set layerMask to Player only! */
|
||||||
|
var hit = Physics2D.Raycast(new Vector2(position.x + .5f, position.y + 0.5f),
|
||||||
|
Vector2.up, 1f, 1 << 15);
|
||||||
|
if (hit.collider)
|
||||||
|
{
|
||||||
|
BecomeTransparent();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BecomeOpaque();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeSpriteAlpha(float alpha)
|
||||||
|
{
|
||||||
|
_spriteRenderer.color =
|
||||||
|
new Color(_originalSpriteColor.r, _originalSpriteColor.g, _originalSpriteColor.b, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BecomeTransparent()
|
||||||
|
{
|
||||||
|
if (_isTransparent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isTransparent = true;
|
||||||
|
ChangeSpriteAlpha(0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BecomeOpaque()
|
||||||
|
{
|
||||||
|
if (!_isTransparent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isTransparent = false;
|
||||||
|
ChangeSpriteAlpha(1f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Scripts/src/Wall/WallTransparency.cs.meta
Normal file
3
Assets/Scripts/src/Wall/WallTransparency.cs.meta
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f76d22fdcb894023bd111d6b5bc1da5e
|
||||||
|
timeCreated: 1560273099
|
|
@ -53,4 +53,4 @@ Physics2DSettings:
|
||||||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||||
m_LayerCollisionMatrix: fffbfffffffbfffffffbfffffffffffffffbfffffffbfffffffffffffffffffffffbffffffffffffc8faffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
m_LayerCollisionMatrix: fffbffffff7bffffff7bffffffffffffff7bfffffffbfffffffffffffffffffffffbffffffffffffc87affffffffffffffffffffffffffffffffffffe9fbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
|
|
@ -22,7 +22,7 @@ TagManager:
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
- Player
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in a new issue