fix: Made it so that you can repeatedly bounce on bounce pads
This commit is contained in:
parent
14fe75dd44
commit
9057a159c0
@ -245,8 +245,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1f75445772cf608f6a46acd7fd8dd323, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceDirection: 1
|
||||
bounceForce: 10
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!4 &196154908
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -338,7 +339,8 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceForce: 10
|
||||
bounceForce: 13
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!4 &272640807
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -532,6 +534,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceForce: 10
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!4 &331544222
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -622,8 +625,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1f75445772cf608f6a46acd7fd8dd323, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceForce: 10
|
||||
bounceDirection: 1
|
||||
bounceForce: 15
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!4 &380422483
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -831,7 +835,8 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceForce: 10
|
||||
bounceForce: 13
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!1 &607668448
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1445,6 +1450,16 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 29, y: 18, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 0
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 31, y: 18, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -1475,6 +1490,16 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 23, y: 21, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 0
|
||||
m_TileMatrixIndex: 1
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 31, y: 21, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -1545,6 +1570,16 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 29, y: 28, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 0
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 31, y: 28, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -1575,6 +1610,16 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 23, y: 31, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 0
|
||||
m_TileSpriteIndex: 0
|
||||
m_TileMatrixIndex: 1
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 31, y: 31, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -2157,7 +2202,7 @@ Tilemap:
|
||||
m_AllTileFlags: 1073741825
|
||||
m_AnimatedTiles: {}
|
||||
m_TileAssetArray:
|
||||
- m_RefCount: 2
|
||||
- m_RefCount: 6
|
||||
m_Data: {fileID: 11400000, guid: 29d5dd975f4e7a027b8dfc0440618bc5, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 0252ec1ca7ac8f947b35ae9aac4aafc1, type: 2}
|
||||
@ -2284,7 +2329,7 @@ Tilemap:
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 95f342caf78bc7167bd1e7c5cb2109c7, type: 2}
|
||||
m_TileSpriteArray:
|
||||
- m_RefCount: 2
|
||||
- m_RefCount: 6
|
||||
m_Data: {fileID: -1104956726, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
|
||||
- m_RefCount: 25
|
||||
m_Data: {fileID: 1220180446, guid: 6d23faee729f0597ca5ce6f9aa53adcd, type: 3}
|
||||
@ -2411,7 +2456,7 @@ Tilemap:
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -1640357544, guid: 6d23faee729f0597ca5ce6f9aa53adcd, type: 3}
|
||||
m_TileMatrixArray:
|
||||
- m_RefCount: 89
|
||||
- m_RefCount: 91
|
||||
m_Data:
|
||||
e00: 1
|
||||
e01: 0
|
||||
@ -2429,8 +2474,26 @@ Tilemap:
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
- m_RefCount: 2
|
||||
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: 89
|
||||
- m_RefCount: 93
|
||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TileObjectToInstantiateArray: []
|
||||
m_AnimationFrameRate: 1
|
||||
@ -4049,6 +4112,7 @@ GameObject:
|
||||
- component: {fileID: 1842244994}
|
||||
- component: {fileID: 1842244997}
|
||||
- component: {fileID: 1842244996}
|
||||
- component: {fileID: 1842244998}
|
||||
m_Layer: 6
|
||||
m_Name: Ground
|
||||
m_TagString: wall
|
||||
@ -5999,16 +6063,6 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 29, y: 18, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 10
|
||||
m_TileSpriteIndex: 10
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 30, y: 18, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -6119,16 +6173,6 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 23, y: 21, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 10
|
||||
m_TileSpriteIndex: 10
|
||||
m_TileMatrixIndex: 1
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 30, y: 21, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -6339,16 +6383,6 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 29, y: 28, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 10
|
||||
m_TileSpriteIndex: 10
|
||||
m_TileMatrixIndex: 0
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 30, y: 28, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -6439,16 +6473,6 @@ Tilemap:
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 23, y: 31, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
m_TileIndex: 10
|
||||
m_TileSpriteIndex: 10
|
||||
m_TileMatrixIndex: 1
|
||||
m_TileColorIndex: 0
|
||||
m_TileObjectToInstantiateIndex: 65535
|
||||
dummyAlignment: 0
|
||||
m_AllTileFlags: 1073741825
|
||||
- first: {x: 30, y: 31, z: 0}
|
||||
second:
|
||||
serializedVersion: 2
|
||||
@ -6811,8 +6835,8 @@ Tilemap:
|
||||
m_Data: {fileID: 11400000, guid: 1cf5b3c86741b8ac4abb3a62710c0395, type: 2}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 2585ccf85276f3c7daeb3b2d8bb3be59, type: 2}
|
||||
- m_RefCount: 4
|
||||
m_Data: {fileID: 11400000, guid: 29d5dd975f4e7a027b8dfc0440618bc5, type: 2}
|
||||
- m_RefCount: 0
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: 11400000, guid: 14b33a59fa3e06d1296c7d10a4c58d31, type: 2}
|
||||
- m_RefCount: 1
|
||||
@ -6942,8 +6966,8 @@ Tilemap:
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 3
|
||||
m_Data: {fileID: 1416093966, guid: 6d23faee729f0597ca5ce6f9aa53adcd, type: 3}
|
||||
- m_RefCount: 4
|
||||
m_Data: {fileID: -1104956726, guid: 577ba1ea470cbfb068f24f10dcee1629, type: 3}
|
||||
- m_RefCount: 0
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 0
|
||||
m_Data: {fileID: 0}
|
||||
- m_RefCount: 15
|
||||
@ -7053,7 +7077,7 @@ Tilemap:
|
||||
- m_RefCount: 1
|
||||
m_Data: {fileID: -1773148243, guid: 6d23faee729f0597ca5ce6f9aa53adcd, type: 3}
|
||||
m_TileMatrixArray:
|
||||
- m_RefCount: 260
|
||||
- m_RefCount: 258
|
||||
m_Data:
|
||||
e00: 1
|
||||
e01: 0
|
||||
@ -7071,7 +7095,7 @@ Tilemap:
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
- m_RefCount: 2
|
||||
- m_RefCount: 0
|
||||
m_Data:
|
||||
e00: -1
|
||||
e01: 0
|
||||
@ -7108,7 +7132,7 @@ Tilemap:
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_TileColorArray:
|
||||
- m_RefCount: 266
|
||||
- m_RefCount: 262
|
||||
m_Data: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_TileObjectToInstantiateArray: []
|
||||
m_AnimationFrameRate: 1
|
||||
@ -7192,11 +7216,233 @@ TilemapCollider2D:
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_UsedByComposite: 1
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_MaximumTileChangeCount: 1000
|
||||
m_ExtrusionFactor: 0
|
||||
m_UseDelaunayMesh: 1
|
||||
--- !u!66 &1842244998
|
||||
CompositeCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1842244992}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_GeometryType: 0
|
||||
m_GenerationType: 1
|
||||
m_EdgeRadius: 0
|
||||
m_ColliderPaths:
|
||||
- m_Collider: {fileID: 1842244997}
|
||||
m_ColliderPaths:
|
||||
- - X: 230000000
|
||||
Y: 342187488
|
||||
- X: 223437504
|
||||
Y: 345624992
|
||||
- X: 220624992
|
||||
Y: 346875008
|
||||
- X: 218437504
|
||||
Y: 346875008
|
||||
- X: 210000000
|
||||
Y: 342500000
|
||||
- X: 210000000
|
||||
Y: 150000000
|
||||
- X: 230000000
|
||||
Y: 150000000
|
||||
- - X: 310000000
|
||||
Y: 330000000
|
||||
- X: 560000000
|
||||
Y: 330000000
|
||||
- X: 560000000
|
||||
Y: 340000000
|
||||
- X: 300000000
|
||||
Y: 340000000
|
||||
- X: 300000000
|
||||
Y: 150000000
|
||||
- X: 310000000
|
||||
Y: 150000000
|
||||
- - X: -180000000
|
||||
Y: 163437504
|
||||
- X: -184375008
|
||||
Y: 170000000
|
||||
- X: -185312496
|
||||
Y: 170000000
|
||||
- X: -185312496
|
||||
Y: 175937504
|
||||
- X: -185624992
|
||||
Y: 178437504
|
||||
- X: -186875008
|
||||
Y: 180000000
|
||||
- X: -180000000
|
||||
Y: 180000000
|
||||
- X: -180000000
|
||||
Y: 192187504
|
||||
- X: -186562496
|
||||
Y: 195624992
|
||||
- X: -189375008
|
||||
Y: 196875008
|
||||
- X: -191562496
|
||||
Y: 196875008
|
||||
- X: -200000000
|
||||
Y: 192500000
|
||||
- X: -200000000
|
||||
Y: 180000000
|
||||
- X: -193124992
|
||||
Y: 180000000
|
||||
- X: -193124992
|
||||
Y: 173124992
|
||||
- X: -192187504
|
||||
Y: 170000000
|
||||
- X: -200000000
|
||||
Y: 170000000
|
||||
- X: -200000000
|
||||
Y: 167812496
|
||||
- X: -199062496
|
||||
Y: 165937504
|
||||
- X: -190624992
|
||||
Y: 161875008
|
||||
- X: -190000000
|
||||
Y: 161875008
|
||||
- X: -190000000
|
||||
Y: 161250000
|
||||
- X: -187187504
|
||||
Y: 160000000
|
||||
- X: -180000000
|
||||
Y: 160000000
|
||||
- - X: 30000000
|
||||
Y: 150000000
|
||||
- X: -140000000
|
||||
Y: 150000000
|
||||
- X: -140000000
|
||||
Y: 130000000
|
||||
- X: 30000000
|
||||
Y: 130000000
|
||||
- - X: 80000000
|
||||
Y: 120000000
|
||||
- X: 280000000
|
||||
Y: 120000000
|
||||
- X: 280000000
|
||||
Y: 130000000
|
||||
- X: 50000000
|
||||
Y: 130000000
|
||||
- X: 50000000
|
||||
Y: -20000000
|
||||
- X: -20000000
|
||||
Y: -20000000
|
||||
- X: -20000000
|
||||
Y: -40000000
|
||||
- X: -80000000
|
||||
Y: -40000000
|
||||
- X: -80000000
|
||||
Y: -60000000
|
||||
- X: 80000000
|
||||
Y: -60000000
|
||||
- - X: -210000000
|
||||
Y: 80000000
|
||||
- X: -300000000
|
||||
Y: 80000000
|
||||
- X: -300000000
|
||||
Y: 70000000
|
||||
- X: -210000000
|
||||
Y: 70000000
|
||||
- - X: -110000000
|
||||
Y: 30000000
|
||||
- X: -210000000
|
||||
Y: 30000000
|
||||
- X: -210000000
|
||||
Y: 20000000
|
||||
- X: -110000000
|
||||
Y: 20000000
|
||||
m_CompositePaths:
|
||||
m_Paths:
|
||||
- - {x: 23, y: 34.21875}
|
||||
- {x: 22.34375, y: 34.5625}
|
||||
- {x: 22.0625, y: 34.6875}
|
||||
- {x: 21.84375, y: 34.6875}
|
||||
- {x: 21, y: 34.25}
|
||||
- {x: 21, y: 15}
|
||||
- {x: 23, y: 15}
|
||||
- - {x: 31, y: 33}
|
||||
- {x: 56, y: 33}
|
||||
- {x: 56, y: 34}
|
||||
- {x: 30, y: 34}
|
||||
- {x: 30, y: 15}
|
||||
- {x: 31, y: 15}
|
||||
- - {x: -18, y: 16.34375}
|
||||
- {x: -18.437502, y: 17}
|
||||
- {x: -18.53125, y: 17}
|
||||
- {x: -18.53125, y: 17.59375}
|
||||
- {x: -18.5625, y: 17.84375}
|
||||
- {x: -18.687502, y: 18}
|
||||
- {x: -18, y: 18}
|
||||
- {x: -18, y: 19.21875}
|
||||
- {x: -18.65625, y: 19.5625}
|
||||
- {x: -18.937502, y: 19.687502}
|
||||
- {x: -19.15625, y: 19.687502}
|
||||
- {x: -20, y: 19.25}
|
||||
- {x: -20, y: 18}
|
||||
- {x: -19.3125, y: 18}
|
||||
- {x: -19.3125, y: 17.3125}
|
||||
- {x: -19.21875, y: 17}
|
||||
- {x: -20, y: 17}
|
||||
- {x: -20, y: 16.78125}
|
||||
- {x: -19.90625, y: 16.59375}
|
||||
- {x: -19.0625, y: 16.187502}
|
||||
- {x: -19, y: 16.187502}
|
||||
- {x: -19, y: 16.125}
|
||||
- {x: -18.71875, y: 16}
|
||||
- {x: -18, y: 16}
|
||||
- - {x: 3, y: 15}
|
||||
- {x: -14, y: 15}
|
||||
- {x: -14, y: 13}
|
||||
- {x: 3, y: 13}
|
||||
- - {x: 8, y: 12}
|
||||
- {x: 28, y: 12}
|
||||
- {x: 28, y: 13}
|
||||
- {x: 5, y: 13}
|
||||
- {x: 5, y: -2}
|
||||
- {x: -2, y: -2}
|
||||
- {x: -2, y: -4}
|
||||
- {x: -8, y: -4}
|
||||
- {x: -8, y: -6}
|
||||
- {x: 8, y: -6}
|
||||
- - {x: -21, y: 8}
|
||||
- {x: -30, y: 8}
|
||||
- {x: -30, y: 7}
|
||||
- {x: -21, y: 7}
|
||||
- - {x: -11, y: 3}
|
||||
- {x: -21, y: 3}
|
||||
- {x: -21, y: 2}
|
||||
- {x: -11, y: 2}
|
||||
m_VertexDistance: 0.11
|
||||
m_OffsetDistance: 0
|
||||
m_UseDelaunayMesh: 0
|
||||
m_CompositeGameObject: {fileID: 1842244992}
|
||||
--- !u!1 &1924433555
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -7371,6 +7617,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
bounceDirection: 0
|
||||
bounceForce: 10
|
||||
verticalMultiplier: 1.5
|
||||
--- !u!4 &1932598060
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -15,6 +15,8 @@ public class Bouncepad : MonoBehaviour
|
||||
|
||||
[SerializeField]
|
||||
public float bounceForce = 20f;
|
||||
[SerializeField]
|
||||
public float verticalMultiplier = 1.0f;
|
||||
|
||||
public Facing Direction()
|
||||
{
|
||||
|
@ -296,20 +296,25 @@ public class PlayerBehavior : MonoBehaviour
|
||||
{
|
||||
// Assign the player's velocity to zero so that the player can
|
||||
// bounce on the same jump pad
|
||||
this.playerController.RB.velocity = new Vector2(
|
||||
this.playerController.RB.velocity.x,
|
||||
0
|
||||
);
|
||||
// this.playerController.RB.velocity = new Vector2(
|
||||
// this.playerController.RB.velocity.x,
|
||||
// 0
|
||||
// );
|
||||
this.playerController.RB.velocity = Vector2.zero;
|
||||
Bouncepad pad = col.GetComponent<Bouncepad>();
|
||||
switch (pad.Direction())
|
||||
{
|
||||
case Bouncepad.Facing.Left:
|
||||
this.playerController.RB.AddForce(
|
||||
new Vector2(-pad.bounceForce, pad.bounceForce),
|
||||
new Vector2(-pad.bounceForce, pad.verticalMultiplier * pad.bounceForce),
|
||||
ForceMode2D.Impulse
|
||||
);
|
||||
break;
|
||||
case Bouncepad.Facing.Right:
|
||||
this.playerController.RB.AddForce(
|
||||
new Vector2(pad.bounceForce, pad.verticalMultiplier * pad.bounceForce),
|
||||
ForceMode2D.Impulse
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user