Gradual jump and started orb events
This commit is contained in:
parent
e874c23647
commit
b4e11ac33f
11 changed files with 1035 additions and 99 deletions
|
@ -234,6 +234,90 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &75232997
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 75232999}
|
||||
- component: {fileID: 75232998}
|
||||
m_Layer: 0
|
||||
m_Name: GameManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &75232998
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 75232997}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0f92eb99eeecf254ab1db681d9f7d3e5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
orbEffects:
|
||||
list:
|
||||
- Key: 0
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 1
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 2
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 3
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 4
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 5
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 6
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 7
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
- Key: 8
|
||||
Value:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
keyCollision: 0
|
||||
currentType: 0
|
||||
--- !u!4 &75232999
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 75232997}
|
||||
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: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &208838962
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1918,6 +2002,107 @@ MonoBehaviour:
|
|||
- {x: 0.5, y: -0.5, z: 0}
|
||||
- {x: 0.5, y: 0.5, z: 0}
|
||||
- {x: -0.5, y: 0.5, z: 0}
|
||||
--- !u!1 &264481247
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 264481251}
|
||||
- component: {fileID: 264481250}
|
||||
- component: {fileID: 264481249}
|
||||
- component: {fileID: 264481248}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &264481248
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 264481247}
|
||||
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 &264481249
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 264481247}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &264481250
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 264481247}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 519420031}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 1364324917
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &264481251
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 264481247}
|
||||
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: 1218928453}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
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 &483756969
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2010,10 +2195,10 @@ Camera:
|
|||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0.07034909
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0.8593666
|
||||
height: 0.99963677
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
|
@ -2105,6 +2290,82 @@ MonoBehaviour:
|
|||
m_CropFrameX: 0
|
||||
m_CropFrameY: 0
|
||||
m_StretchFill: 0
|
||||
--- !u!1 &658829298
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 658829299}
|
||||
- component: {fileID: 658829301}
|
||||
- component: {fileID: 658829300}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &658829299
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 658829298}
|
||||
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: 1921539878}
|
||||
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: 37.5}
|
||||
m_SizeDelta: {x: 10, y: 75}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &658829300
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 658829298}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_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 &658829301
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 658829298}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &832780273
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2258,6 +2519,7 @@ MonoBehaviour:
|
|||
acceleration: 0.05
|
||||
flipSmooth: 0.05
|
||||
jumpForce: 30
|
||||
gradualJumpMultiplier: 0.5
|
||||
groundMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 8
|
||||
|
@ -2265,7 +2527,7 @@ MonoBehaviour:
|
|||
feetWidth: 0.85
|
||||
feetPos: {fileID: 2122059437}
|
||||
coyoteTime: 0.3
|
||||
jumpBuffer: 0.3
|
||||
jumpBuffer: 0.2
|
||||
--- !u!1 &971952096
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7203,6 +7465,151 @@ Transform:
|
|||
m_Father: {fileID: 832780277}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1218928452
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1218928453}
|
||||
- component: {fileID: 1218928455}
|
||||
- component: {fileID: 1218928454}
|
||||
m_Layer: 5
|
||||
m_Name: Clock
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1218928453
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218928452}
|
||||
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:
|
||||
- {fileID: 1921539878}
|
||||
m_Father: {fileID: 264481251}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -50, y: -50}
|
||||
m_SizeDelta: {x: 200, y: 200}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!114 &1218928454
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218928452}
|
||||
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: -2413806693520163455, guid: e72f7cea6d4b14f41b3c725b217a3e52, 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!222 &1218928455
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1218928452}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1477198635
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1477198638}
|
||||
- component: {fileID: 1477198637}
|
||||
- component: {fileID: 1477198636}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1477198636
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1477198635}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1477198637
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1477198635}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1477198638
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1477198635}
|
||||
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: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1502401422
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7287,6 +7694,43 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1921539877
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1921539878}
|
||||
m_Layer: 5
|
||||
m_Name: Pivot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1921539878
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1921539877}
|
||||
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:
|
||||
- {fileID: 658829299}
|
||||
m_Father: {fileID: 1218928453}
|
||||
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: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2122059436
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
184
Assets/Scripts/GenericDictionary.cs
Normal file
184
Assets/Scripts/GenericDictionary.cs
Normal file
|
@ -0,0 +1,184 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GometGames.Tools
|
||||
{
|
||||
/// <summary>
|
||||
/// Generic Serializable Dictionary for Unity 2020.1 and above.
|
||||
/// Simply declare your key/value types and you're good to go - zero boilerplate.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class GenericDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ISerializationCallbackReceiver
|
||||
{
|
||||
// Internal
|
||||
[SerializeField]
|
||||
private List<KeyValuePair> list = new List<KeyValuePair>();
|
||||
[SerializeField, HideInInspector]
|
||||
private Dictionary<TKey, int> indexByKey = new Dictionary<TKey, int>();
|
||||
[SerializeField, HideInInspector]
|
||||
private Dictionary<TKey, TValue> dict = new Dictionary<TKey, TValue>();
|
||||
|
||||
#pragma warning disable 0414
|
||||
[SerializeField, HideInInspector]
|
||||
private bool keyCollision;
|
||||
#pragma warning restore 0414
|
||||
|
||||
[Serializable]
|
||||
private struct KeyValuePair
|
||||
{
|
||||
public TKey Key;
|
||||
public TValue Value;
|
||||
public KeyValuePair(TKey Key, TValue Value)
|
||||
{
|
||||
this.Key = Key;
|
||||
this.Value = Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Lists are serialized natively by Unity, no custom implementation needed.
|
||||
public void OnBeforeSerialize() { }
|
||||
|
||||
// Populate dictionary with pairs from list and flag key-collisions.
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
dict.Clear();
|
||||
indexByKey.Clear();
|
||||
keyCollision = false;
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
var key = list[i].Key;
|
||||
if (key != null && !ContainsKey(key))
|
||||
{
|
||||
dict.Add(key, list[i].Value);
|
||||
indexByKey.Add(key, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
keyCollision = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// IDictionary
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get => dict[key];
|
||||
set
|
||||
{
|
||||
dict[key] = value;
|
||||
if (indexByKey.ContainsKey(key))
|
||||
{
|
||||
var index = indexByKey[key];
|
||||
list[index] = new KeyValuePair(key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(new KeyValuePair(key, value));
|
||||
indexByKey.Add(key, list.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ICollection<TKey> Keys => dict.Keys;
|
||||
public ICollection<TValue> Values => dict.Values;
|
||||
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
dict.Add(key, value);
|
||||
list.Add(new KeyValuePair(key, value));
|
||||
indexByKey.Add(key, list.Count - 1);
|
||||
}
|
||||
|
||||
public bool ContainsKey(TKey key) => dict.ContainsKey(key);
|
||||
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
if (dict.Remove(key))
|
||||
{
|
||||
var index = indexByKey[key];
|
||||
list.RemoveAt(index);
|
||||
UpdateIndexLookup(index);
|
||||
indexByKey.Remove(key);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateIndexLookup(int removedIndex) {
|
||||
for (int i = removedIndex; i < list.Count; i++) {
|
||||
var key = list[i].Key;
|
||||
indexByKey[key]--;
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryGetValue(TKey key, out TValue value) => dict.TryGetValue(key, out value);
|
||||
|
||||
// ICollection
|
||||
public int Count => dict.Count;
|
||||
public bool IsReadOnly { get; set; }
|
||||
|
||||
public void Add(KeyValuePair<TKey, TValue> pair)
|
||||
{
|
||||
Add(pair.Key, pair.Value);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
dict.Clear();
|
||||
list.Clear();
|
||||
indexByKey.Clear();
|
||||
}
|
||||
|
||||
public bool Contains(KeyValuePair<TKey, TValue> pair)
|
||||
{
|
||||
TValue value;
|
||||
if (dict.TryGetValue(pair.Key, out value))
|
||||
{
|
||||
return EqualityComparer<TValue>.Default.Equals(value, pair.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||
{
|
||||
if (array == null)
|
||||
throw new ArgumentException("The array cannot be null.");
|
||||
if (arrayIndex < 0)
|
||||
throw new ArgumentOutOfRangeException("The starting array index cannot be negative.");
|
||||
if (array.Length - arrayIndex < dict.Count)
|
||||
throw new ArgumentException("The destination array has fewer elements than the collection.");
|
||||
|
||||
foreach (var pair in dict)
|
||||
{
|
||||
array[arrayIndex] = pair;
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Remove(KeyValuePair<TKey, TValue> pair)
|
||||
{
|
||||
TValue value;
|
||||
if (dict.TryGetValue(pair.Key, out value))
|
||||
{
|
||||
bool valueMatch = EqualityComparer<TValue>.Default.Equals(value, pair.Value);
|
||||
if (valueMatch)
|
||||
{
|
||||
return Remove(pair.Key);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// IEnumerable
|
||||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => dict.GetEnumerator();
|
||||
IEnumerator IEnumerable.GetEnumerator() => dict.GetEnumerator();
|
||||
}
|
||||
}
|
11
Assets/Scripts/GenericDictionary.cs.meta
Normal file
11
Assets/Scripts/GenericDictionary.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8dee231b3f6acd04fb6f88737505c0bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/Managers.meta
Normal file
8
Assets/Scripts/Managers.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 854339740fd089942ba32bfdc1ff49c7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
40
Assets/Scripts/Managers/GameManager.cs
Normal file
40
Assets/Scripts/Managers/GameManager.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using GometGames.Tools;
|
||||
using MyBox;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
[System.Serializable]
|
||||
public enum OrbTypes {
|
||||
Blue,
|
||||
Red,
|
||||
InvertedControls,
|
||||
HighGravity,
|
||||
LowGravity,
|
||||
InvertedGravity,
|
||||
DarkRoom,
|
||||
HighSpeed,
|
||||
LowSpeed
|
||||
};
|
||||
|
||||
public class GameManager : MonoBehaviour {
|
||||
|
||||
[SerializeField] GenericDictionary<OrbTypes, UnityEvent> orbEffects;
|
||||
[SerializeField] OrbTypes currentType;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start(){
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
|
||||
}
|
||||
|
||||
void ChangeEventCall(OrbTypes type) {
|
||||
currentType = type;
|
||||
orbEffects[currentType].Invoke();
|
||||
}
|
||||
}
|
11
Assets/Scripts/Managers/GameManager.cs.meta
Normal file
11
Assets/Scripts/Managers/GameManager.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0f92eb99eeecf254ab1db681d9f7d3e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -6,17 +6,20 @@ using UnityEngine.Serialization;
|
|||
|
||||
public class PlayerController : MonoBehaviour {
|
||||
|
||||
[Header("Stats")]
|
||||
[SerializeField] float speed = 50f;
|
||||
[SerializeField, Range(0f, .5f)] float acceleration = .1f;
|
||||
[SerializeField, Range(0f, .5f)] float flipSmooth = .1f;
|
||||
[SerializeField] float jumpForce = 10f;
|
||||
[SerializeField, Range(0f, 1f)] float gradualJumpMultiplier = .5f;
|
||||
|
||||
Vector2 _input;
|
||||
float _xVelocity, _flipVelocity;
|
||||
int _facingDirection = 1;
|
||||
bool _cancelJump;
|
||||
Rigidbody2D _rb2d;
|
||||
|
||||
[Space]
|
||||
[Header("Jump Management")]
|
||||
[SerializeField] LayerMask groundMask;
|
||||
[SerializeField, Range(0f, 1f)] float feetHeight;
|
||||
[SerializeField, Range(0f, 2f)] float feetWidth;
|
||||
|
@ -40,13 +43,16 @@ public class PlayerController : MonoBehaviour {
|
|||
_ => _facingDirection
|
||||
};
|
||||
|
||||
transform.localScale =
|
||||
new Vector3(Mathf.SmoothDamp(transform.localScale.x, _facingDirection, ref _flipVelocity, flipSmooth),
|
||||
transform.localScale.y, transform.localScale.z);
|
||||
Vector3 localScale = transform.localScale;
|
||||
localScale = new Vector3(Mathf.SmoothDamp(localScale.x, _facingDirection, ref _flipVelocity, flipSmooth),
|
||||
localScale.y, localScale.z);
|
||||
transform.localScale = localScale;
|
||||
|
||||
_isGrounded = Physics2D.OverlapBox(feetPos.position, new Vector2(feetWidth, feetHeight), 0f, groundMask);
|
||||
if (_isGrounded && _rb2d.velocity.y <= 0f) _coyoteTime = coyoteTime;
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Space)) _jumpBuffer = jumpBuffer;
|
||||
if (Input.GetKeyUp(KeyCode.Space)) _cancelJump = true;
|
||||
|
||||
_jumpBuffer -= Time.deltaTime;
|
||||
_coyoteTime -= Time.deltaTime;
|
||||
|
@ -60,6 +66,11 @@ public class PlayerController : MonoBehaviour {
|
|||
_rb2d.AddForce(Vector2.up * jumpForce, ForceMode2D.Impulse);
|
||||
_coyoteTime = _jumpBuffer = 0f;
|
||||
}
|
||||
|
||||
if (_cancelJump) {
|
||||
if(_rb2d.velocity.y > 0f) _rb2d.velocity = new Vector2(_rb2d.velocity.x, _rb2d.velocity.y * gradualJumpMultiplier);
|
||||
_cancelJump = false;
|
||||
}
|
||||
}
|
||||
|
||||
void OnDrawGizmosSelected() {
|
||||
|
|
BIN
Assets/Sprites/Circle.png
(Stored with Git LFS)
Normal file
BIN
Assets/Sprites/Circle.png
(Stored with Git LFS)
Normal file
Binary file not shown.
248
Assets/Sprites/Circle.png.meta
Normal file
248
Assets/Sprites/Circle.png.meta
Normal file
|
@ -0,0 +1,248 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e72f7cea6d4b14f41b3c725b217a3e52
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -2413806693520163455
|
||||
second: Circle
|
||||
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: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 256
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: 0
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
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: 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: iPhone
|
||||
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: 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:
|
||||
- serializedVersion: 2
|
||||
name: Circle
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 256
|
||||
height: 256
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
outline:
|
||||
- - {x: 33, y: 128}
|
||||
- {x: -33, y: 128}
|
||||
- {x: -95, y: 95}
|
||||
- {x: -128, y: 33}
|
||||
- {x: -128, y: -33}
|
||||
- {x: -95, y: -95}
|
||||
- {x: -33, y: -128}
|
||||
- {x: 33, y: -128}
|
||||
- {x: 95, y: -95}
|
||||
- {x: 128, y: -33}
|
||||
- {x: 128, y: 33}
|
||||
- {x: 95, y: 95}
|
||||
physicsShape:
|
||||
- - {x: 0, y: 128}
|
||||
- {x: -39, y: 121}
|
||||
- {x: -75, y: 103}
|
||||
- {x: -103, y: 75}
|
||||
- {x: -121, y: 39}
|
||||
- {x: -128, y: 0}
|
||||
- {x: -121, y: -39}
|
||||
- {x: -103, y: -75}
|
||||
- {x: -75, y: -103}
|
||||
- {x: -39, y: -121}
|
||||
- {x: 0, y: -128}
|
||||
- {x: 39, y: -121}
|
||||
- {x: 75, y: -103}
|
||||
- {x: 103, y: -75}
|
||||
- {x: 121, y: -39}
|
||||
- {x: 128, y: 0}
|
||||
- {x: 121, y: 39}
|
||||
- {x: 103, y: 75}
|
||||
- {x: 75, y: 103}
|
||||
- {x: 39, y: 121}
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 18d3544e99f608ed0800000000000000
|
||||
internalID: -2413806693520163455
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline:
|
||||
- - {x: 33, y: 128}
|
||||
- {x: -33, y: 128}
|
||||
- {x: -95, y: 95}
|
||||
- {x: -128, y: 33}
|
||||
- {x: -128, y: -33}
|
||||
- {x: -95, y: -95}
|
||||
- {x: -33, y: -128}
|
||||
- {x: 33, y: -128}
|
||||
- {x: 95, y: -95}
|
||||
- {x: 128, y: -33}
|
||||
- {x: 128, y: 33}
|
||||
- {x: 95, y: 95}
|
||||
physicsShape:
|
||||
- - {x: 0, y: 128}
|
||||
- {x: -39, y: 121}
|
||||
- {x: -75, y: 103}
|
||||
- {x: -103, y: 75}
|
||||
- {x: -121, y: 39}
|
||||
- {x: -128, y: 0}
|
||||
- {x: -121, y: -39}
|
||||
- {x: -103, y: -75}
|
||||
- {x: -75, y: -103}
|
||||
- {x: -39, y: -121}
|
||||
- {x: 0, y: -128}
|
||||
- {x: 39, y: -121}
|
||||
- {x: 75, y: -103}
|
||||
- {x: 103, y: -75}
|
||||
- {x: 121, y: -39}
|
||||
- {x: 128, y: 0}
|
||||
- {x: 121, y: 39}
|
||||
- {x: 103, y: 75}
|
||||
- {x: 75, y: 103}
|
||||
- {x: 39, y: 121}
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable:
|
||||
Circle: -2413806693520163455
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue