mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-14 13:25:16 -05:00
Merge branch 'main' of https://github.com/Lautha1/TheKingsRace
This commit is contained in:
@@ -12,7 +12,7 @@ GameObject:
|
||||
- component: {fileID: 4218115116556111917}
|
||||
- component: {fileID: 3002996098184099835}
|
||||
- component: {fileID: 2615064647535143224}
|
||||
m_Layer: 0
|
||||
m_Layer: 14
|
||||
m_Name: Arch
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
||||
@@ -16,7 +16,7 @@ GameObject:
|
||||
- component: {fileID: 4121269670625047655}
|
||||
- component: {fileID: 4550182660015704559}
|
||||
- component: {fileID: 4869347295655275014}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: LeftDoor
|
||||
m_TagString: kickable
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -30,7 +30,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2600877024947699237}
|
||||
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
|
||||
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
@@ -38,7 +38,7 @@ Transform:
|
||||
- {fileID: 6871662126972329396}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!33 &7317664724232857934
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -206,7 +206,7 @@ GameObject:
|
||||
- component: {fileID: 8360243053779946927}
|
||||
- component: {fileID: 215130377004824692}
|
||||
- component: {fileID: 3862225755302144756}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: LeftHandle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -287,7 +287,7 @@ GameObject:
|
||||
- component: {fileID: 6871662126972329396}
|
||||
- component: {fileID: 7775466228100032066}
|
||||
- component: {fileID: 508314590947380972}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: LeftKnocker
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
||||
@@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 8044612620057779272}
|
||||
- component: {fileID: 8044612620057779273}
|
||||
- component: {fileID: -2884972987869746759}
|
||||
m_Layer: 0
|
||||
m_Name: ResetZoneFoothills
|
||||
m_TagString: Untagged
|
||||
@@ -44,3 +45,16 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1700, y: 2000, z: 1200}
|
||||
m_Center: {x: -2850, y: 0, z: 500}
|
||||
--- !u!114 &-2884972987869746759
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8044612620057779274}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6560db454bf09ef49bdb0240a370b8aa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RespawnZone: 2
|
||||
|
||||
@@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 8977215705378820474}
|
||||
- component: {fileID: 8977215705378820485}
|
||||
- component: {fileID: -3220977901539271234}
|
||||
m_Layer: 0
|
||||
m_Name: ResetZoneMountain
|
||||
m_TagString: Untagged
|
||||
@@ -44,3 +45,16 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1400, y: 2500, z: 1200}
|
||||
m_Center: {x: -4400, y: 0, z: 500}
|
||||
--- !u!114 &-3220977901539271234
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8977215705378820484}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6560db454bf09ef49bdb0240a370b8aa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RespawnZone: 3
|
||||
|
||||
@@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1578817158580045979}
|
||||
- component: {fileID: 1578817158580045978}
|
||||
- component: {fileID: -4917741327760879080}
|
||||
m_Layer: 0
|
||||
m_Name: ResetZonePlains
|
||||
m_TagString: Untagged
|
||||
@@ -44,3 +45,16 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 2000, y: 1000, z: 1200}
|
||||
m_Center: {x: -1000, y: 0, z: 500}
|
||||
--- !u!114 &-4917741327760879080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1578817158580045977}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6560db454bf09ef49bdb0240a370b8aa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RespawnZone: 1
|
||||
|
||||
@@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 6676345594231214399}
|
||||
- component: {fileID: 6676345594231214396}
|
||||
- component: {fileID: -7956066325359681501}
|
||||
m_Layer: 0
|
||||
m_Name: ResetZoneValley
|
||||
m_TagString: Untagged
|
||||
@@ -44,3 +45,16 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1200, y: 1000, z: 1200}
|
||||
m_Center: {x: 600, y: 0, z: 500}
|
||||
--- !u!114 &-7956066325359681501
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6676345594231214397}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6560db454bf09ef49bdb0240a370b8aa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RespawnZone: 0
|
||||
|
||||
@@ -16,7 +16,7 @@ GameObject:
|
||||
- component: {fileID: 2828097643214473696}
|
||||
- component: {fileID: 7980481746424238940}
|
||||
- component: {fileID: 3653011703778519387}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: RightDoor
|
||||
m_TagString: kickable
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -206,7 +206,7 @@ GameObject:
|
||||
- component: {fileID: 6702006673828507876}
|
||||
- component: {fileID: 6718938087178912854}
|
||||
- component: {fileID: 3431465945459635273}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: RightHandle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -287,7 +287,7 @@ GameObject:
|
||||
- component: {fileID: 945210126440020914}
|
||||
- component: {fileID: 3100385083289979938}
|
||||
- component: {fileID: 1365865449014584479}
|
||||
m_Layer: 0
|
||||
m_Layer: 13
|
||||
m_Name: RightKnocker
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@ Canvas:
|
||||
m_GameObject: {fileID: 493130849356474543}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_RenderMode: 1
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
|
||||
@@ -1,5 +1,258 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2892316208689564
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 458936276257707492}
|
||||
- component: {fileID: 5372132919776677937}
|
||||
- component: {fileID: 8364176932711527241}
|
||||
- component: {fileID: 5174671100426909216}
|
||||
- component: {fileID: 7684134515880227463}
|
||||
m_Layer: 12
|
||||
m_Name: WheelButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &458936276257707492
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892316208689564}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -1191.0625}
|
||||
m_LocalScale: {x: 5, y: 5, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 461393241204552141}
|
||||
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: 1696.6062, y: 395.8017}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5372132919776677937
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892316208689564}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8364176932711527241
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892316208689564}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 630520e8bcf49ec4cacb92a219a79c5c, 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!114 &5174671100426909216
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892316208689564}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 8364176932711527241}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 7684134515880227463}
|
||||
m_TargetAssemblyTypeName: WeatherWheel, Assembly-CSharp
|
||||
m_MethodName: SpinWheel
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &7684134515880227463
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2892316208689564}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7abbd564e39545e41ae2b0f2f4529121, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isSpinning: 0
|
||||
--- !u!1 &482820676534364632
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1541186099529016182}
|
||||
- component: {fileID: 1660637878758554570}
|
||||
- component: {fileID: 2431844289648417773}
|
||||
m_Layer: 12
|
||||
m_Name: Pointer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1541186099529016182
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 482820676534364632}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0.38268343, w: 0.92387956}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -1191.0625}
|
||||
m_LocalScale: {x: 0.49999994, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 461393241204552141}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -45}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 1528.6069, y: 241.8039}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1660637878758554570
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 482820676534364632}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2431844289648417773
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 482820676534364632}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 4f3ff2a93920421488d4b875bb5126c5, 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!1 &7713330914688437217
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 461393241204552141}
|
||||
m_Layer: 12
|
||||
m_Name: WeatherWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &461393241204552141
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7713330914688437217}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -550, y: 248, z: 2560}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 458936276257707492}
|
||||
- {fileID: 1541186099529016182}
|
||||
m_Father: {fileID: 8183403963077248725}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &8183403963077248722
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -31,6 +284,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 8183403963399572358}
|
||||
- {fileID: 461393241204552141}
|
||||
m_Father: {fileID: 8183403963968820400}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -582,12 +836,14 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1b197075b52c7e644a525bf0ff3f69a7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Thunderstorm: {fileID: 0}
|
||||
Block: {fileID: 8322169750614848705, guid: 14529042a14497c499bdce8f966e884c, type: 3}
|
||||
BlockWithoutNetwork: {fileID: 5704254083382235334, guid: f56dedeb24725ab4a844690df1d5d3cd, type: 3}
|
||||
HailSprite: {fileID: 0}
|
||||
HailObject: {fileID: 0}
|
||||
Slime: {fileID: 0}
|
||||
Panel: {fileID: 0}
|
||||
FirstPlacing: 0
|
||||
Thunderstorm: {fileID: 0}
|
||||
KingCam: {fileID: 8183403964090928733}
|
||||
LayerMask:
|
||||
serializedVersion: 2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -511,7 +511,7 @@ Camera:
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 767
|
||||
m_Bits: 27391
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
@@ -1193,6 +1193,7 @@ MonoBehaviour:
|
||||
vel: {x: 0, y: 0, z: 0}
|
||||
driftVel: {x: 0, y: 0, z: 0}
|
||||
calculatedCurVel: 0
|
||||
layerMask: 0
|
||||
minAngle: -18
|
||||
maxAngle: 30
|
||||
sensitivity: 200
|
||||
|
||||
8
Assets/Prefabs/Player/Deprecated.meta
Normal file
8
Assets/Prefabs/Player/Deprecated.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e15b8322c1f56a4d90884c0e8de7e4c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -4597,6 +4597,7 @@ GameObject:
|
||||
- component: {fileID: 7688428083034862389}
|
||||
- component: {fileID: 7688428083034862390}
|
||||
- component: {fileID: 7688428083034862391}
|
||||
- component: {fileID: 7391821093297401085}
|
||||
m_Layer: 0
|
||||
m_Name: T-Pose
|
||||
m_TagString: ArcherTarget
|
||||
@@ -4846,6 +4847,7 @@ MonoBehaviour:
|
||||
vel: {x: 0, y: 0, z: 0}
|
||||
driftVel: {x: 0, y: 0, z: 0}
|
||||
calculatedCurVel: 0
|
||||
layerMask: 0
|
||||
minAngle: -18
|
||||
maxAngle: 30
|
||||
sensitivity: 200
|
||||
@@ -4905,6 +4907,18 @@ MonoBehaviour:
|
||||
pStats: {fileID: 0}
|
||||
mSM: {fileID: 0}
|
||||
aSM: {fileID: 0}
|
||||
--- !u!114 &7391821093297401085
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7688428083034862386}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f942eeaa888c98468c9ad196fb88115, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7740096766088430285
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5183,7 +5197,7 @@ Camera:
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 767
|
||||
m_Bits: 27391
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2938,6 +2938,72 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2059816015
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2059816018}
|
||||
- component: {fileID: 2059816017}
|
||||
- component: {fileID: 2059816016}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2059816016
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2059816015}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &2059816017
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2059816015}
|
||||
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 &2059816018
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2059816015}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2061208975
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3062,7 +3128,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5759777694531189237, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
value: 4.72
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5759777694531189237, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
@@ -3100,5 +3166,9 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: DebugSMPlayerPrefab
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7053551988629990270, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3}
|
||||
|
||||
@@ -72763,7 +72763,7 @@ Camera:
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 255
|
||||
m_Bits: 24831
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ public class GateDespawner : NetworkBehaviour {
|
||||
// Only have the host start the timer
|
||||
if (IsHost) {
|
||||
StartCoroutine(DespawnTimer());
|
||||
Physics.IgnoreLayerCollision(13,14);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
45
Assets/Scripts/Environment/ResetZonesGlobal.cs
Normal file
45
Assets/Scripts/Environment/ResetZonesGlobal.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using MLAPI;
|
||||
using MLAPI.Messaging;
|
||||
|
||||
public class ResetZonesGlobal : MonoBehaviour {
|
||||
|
||||
private bool cooldown = false;
|
||||
|
||||
[SerializeField]
|
||||
private int RespawnZone;
|
||||
|
||||
private void OnTriggerEnter(Collider other) {
|
||||
if (cooldown == false && other.transform.gameObject.tag == "PlayerTrigger" && other.gameObject.transform.root.gameObject.GetComponent<NetworkObject>().OwnerClientId == NetworkManager.Singleton.LocalClientId) {
|
||||
SetClientRespawnZoneServerRPC(other.gameObject.transform.root.gameObject.GetComponent<NetworkObject>().OwnerClientId, RespawnZone);
|
||||
cooldown = true;
|
||||
StartCoroutine(CoolItDown());
|
||||
}
|
||||
}
|
||||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
private void SetClientRespawnZoneServerRPC(ulong clientID, int RespawnZone) {
|
||||
SetClientRespawnZoneClientRPC(clientID, RespawnZone);
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
private void SetClientRespawnZoneClientRPC(ulong clientID, int RespawnZone) {
|
||||
// Get all players in the scene
|
||||
GameObject[] playableCharacters = GameObject.FindGameObjectsWithTag("Player");
|
||||
|
||||
// Find our player first
|
||||
foreach (GameObject character in playableCharacters) {
|
||||
if (character.GetComponent<NetworkObject>().OwnerClientId == clientID) {
|
||||
// Set their zone
|
||||
character.GetComponent<ResetZones>().SetCurrentZone(RespawnZone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator CoolItDown() {
|
||||
yield return new WaitForSecondsRealtime(1f);
|
||||
cooldown = false;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Environment/ResetZonesGlobal.cs.meta
Normal file
11
Assets/Scripts/Environment/ResetZonesGlobal.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6560db454bf09ef49bdb0240a370b8aa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -7,7 +7,10 @@ public class GridReveal : MonoBehaviour
|
||||
private GameObject[] Rows;
|
||||
private float TempKingPos = 0;
|
||||
private int Index = 0;
|
||||
private int ROSCount = 130;
|
||||
private int ROSCount = 100;
|
||||
private int BoxSize = 20;
|
||||
private int ValleyStr = -670;
|
||||
private int MountainStr = -2960;
|
||||
|
||||
void Start() {
|
||||
List<GameObject> RowsList = new List<GameObject>();
|
||||
@@ -27,10 +30,10 @@ public class GridReveal : MonoBehaviour
|
||||
|
||||
//A function for enabling and disabalimg the Visability of the King's Grid as the King Moves
|
||||
public void DynGridReveal(float KingPos, float MovDir) {
|
||||
if(KingPos > -670 || KingPos < -2960) { //Cancels out the function if the King is in the valley or the mountain
|
||||
if(KingPos > ValleyStr || KingPos < MountainStr) { //Cancels out the function if the King is in the valley or the mountain
|
||||
return;
|
||||
}
|
||||
if(TempKingPos >= KingPos + 20 || TempKingPos <= KingPos - 20) { //Moves the Grid Everytime is King has moved 20 Units
|
||||
if(TempKingPos >= KingPos + BoxSize || TempKingPos <= KingPos - BoxSize) { //Moves the Grid Everytime is King has moved 20 Units
|
||||
TempKingPos = KingPos;
|
||||
if (MovDir == 0) {
|
||||
return;
|
||||
|
||||
@@ -7,14 +7,16 @@ public class KingMove : MonoBehaviour
|
||||
public float speed = 240.0f;
|
||||
|
||||
private Vector3 newPos;
|
||||
private Vector3 MountCent = new Vector3(-4500, 620, 510);
|
||||
private Vector3 KingStrPos = new Vector3(350, 625, 1130);
|
||||
private Vector3 KingMontStr = new Vector3(-4500, 625, 1130);
|
||||
private Vector3 MountCent = new Vector3(-4500, 820, 510);
|
||||
private Vector3 KingStrPos = new Vector3(350, 825, 1130);
|
||||
private Vector3 KingMontStr = new Vector3(-4500, 825, 1130);
|
||||
private Vector3 KingMontEnd = new Vector3(-4500, 825, -110);
|
||||
private GameObject Grid;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
Grid = GameObject.FindGameObjectWithTag("KingGrid");
|
||||
transform.position = KingStrPos;
|
||||
}
|
||||
|
||||
void Start()
|
||||
@@ -48,9 +50,9 @@ public class KingMove : MonoBehaviour
|
||||
else if (transform.position.x < KingMontStr.x) {//Once they rech a certain point they begin to cirlce around the mountain (radius of 1050, (x+4500)^2+(z-510)^2=620^2)
|
||||
float z = transform.position.z;
|
||||
z -= translation; //Moves the player's X forward slightly
|
||||
if (z > -110 && z <= KingMontStr.z) { //Stops this from breaking the circle's formula
|
||||
float x = -Mathf.Sqrt((MountCent.y * MountCent.y) - ((z - MountCent.z) * (z - MountCent.z))) + MountCent.x; //Snaps the player onto a circle that is around the mountain, so the player orbits it smoothly
|
||||
newPos = new Vector3(x, 625, z); //make a Vector3 out of the new X and Z
|
||||
if (z > KingMontEnd.z && z <= KingMontStr.z) { //Stops this from breaking the circle's formula
|
||||
float x = -Mathf.Sqrt((620 * 620) - ((z - MountCent.z) * (z - MountCent.z))) + MountCent.x; //Snaps the player onto a circle that is around the mountain, so the player orbits it smoothly
|
||||
newPos = new Vector3(x, KingMontStr.y, z); //make a Vector3 out of the new X and Z
|
||||
transform.position = newPos;//Sets the player's new position on the cirlce
|
||||
transform.LookAt(MountCent);//Rotates the player as they move along the circumfurance
|
||||
}
|
||||
|
||||
@@ -25,11 +25,12 @@ public class KingPlace : NetworkBehaviour
|
||||
|
||||
private int SlimeDir;
|
||||
private int BoxSize = 20;
|
||||
private Vector3 MontStr = new Vector3(-4000, 300, 495);
|
||||
|
||||
private KingAbility KABlock = new KingAbility(1, 5);
|
||||
private KingAbility KASlime = new KingAbility(1, 15);
|
||||
private KingAbility KAHail = new KingAbility(1, 15);
|
||||
private KingAbility KAThund = new KingAbility(1, 10);
|
||||
private KingAbility KABlock = new KingAbility(2, 5);
|
||||
private KingAbility KASlime = new KingAbility(2, 15);
|
||||
private KingAbility KAHail = new KingAbility(2, 15);
|
||||
private KingAbility KAThund = new KingAbility(2, 10);
|
||||
|
||||
public GameObject Thunderstorm;
|
||||
//Is called when the King clicks on the Thunderstorm button
|
||||
@@ -115,6 +116,9 @@ public class KingPlace : NetworkBehaviour
|
||||
SlimeDir = DrawArrow();
|
||||
if (Input.GetMouseButtonUp(0)) {//Reads the player releasing the left mouse button
|
||||
PlaceTemp.GetComponent<Slime>().GooStart(SlimeDir);
|
||||
foreach (Transform child in PlaceTemp.transform) {
|
||||
child.gameObject.SetActive(false);
|
||||
}
|
||||
SlimePlacing = false;
|
||||
KASlime.UseItem();
|
||||
}
|
||||
@@ -136,13 +140,18 @@ public class KingPlace : NetworkBehaviour
|
||||
int zOffset = 906;
|
||||
private GameObject Row;
|
||||
private void FindGridBox() {
|
||||
float i = ((PlaceTemp.transform.position.x) - xOffset) / -BoxSize; //Finds the Row the cursor is in
|
||||
int RowNumb = (int)i; //Rounds it down
|
||||
float y = ((PlaceTemp.transform.position.z) - zOffset) / -BoxSize; //Finds the Box in the Row the cursor is in
|
||||
int Box = (int)y; //Rounds it down
|
||||
int x = (RowNumb * -BoxSize) + xOffset;//Sets it's X to the X of the Row
|
||||
int z = (Box * -BoxSize) + zOffset;//Sets its Z to the Z of the Box
|
||||
|
||||
int RowNumb = 0, Box = 0, x = 0, z = 0;
|
||||
if (PlaceTemp.transform.position.x < MontStr.x) {//King is trying to place on the mountain
|
||||
Debug.Log("Mount Place");
|
||||
}
|
||||
else {
|
||||
float i = ((PlaceTemp.transform.position.x) - xOffset) / -BoxSize; //Finds the Row the cursor is in
|
||||
RowNumb = (int)i; //Rounds it down
|
||||
float y = ((PlaceTemp.transform.position.z) - zOffset) / -BoxSize; //Finds the Box in the Row the cursor is in
|
||||
Box = (int)y; //Rounds it down
|
||||
x = (RowNumb * -BoxSize) + xOffset;//Sets it's X to the X of the Row
|
||||
z = (Box * -BoxSize) + zOffset;//Sets its Z to the Z of the Box
|
||||
}
|
||||
// Grid Check first for valid location
|
||||
GridCheck(RowNumb, Box, ref FirstPlacing);//Makes sure the Box is a valid position
|
||||
|
||||
@@ -220,17 +229,23 @@ public class KingPlace : NetworkBehaviour
|
||||
if (Physics.Raycast(Ray, out RaycastHit RayCastHit, float.MaxValue, LayerMask)) {
|
||||
MosPos = RayCastHit.point;
|
||||
}
|
||||
//TODO Draw arrow
|
||||
if (MosPos.x > PlaceTemp.transform.position.x && MosPos.z < PlaceTemp.transform.position.z) {//Temp function to change Slime's dir //TODO convert mouse position to arrow direction. then return the int of what direction it is
|
||||
foreach (Transform child in PlaceTemp.transform) {
|
||||
child.gameObject.SetActive(false);
|
||||
}//y=x(PlaceTemp.y - PlaceTemp.x) y=-x(PlaceTemp.y - PlaceTemp.x)
|
||||
if (MosPos.x > PlaceTemp.transform.position.x && MosPos.z < PlaceTemp.transform.position.z) {//Temp function to change Slime's dir
|
||||
PlaceTemp.transform.Find("ArrowUP").gameObject.SetActive(true);
|
||||
return 0;//Up
|
||||
}
|
||||
else if (MosPos.x < PlaceTemp.transform.position.x && MosPos.z < PlaceTemp.transform.position.z) {
|
||||
PlaceTemp.transform.Find("ArrowRIGHT").gameObject.SetActive(true);
|
||||
return 1;//Right
|
||||
}
|
||||
else if (MosPos.x < PlaceTemp.transform.position.x && MosPos.z > PlaceTemp.transform.position.z) {
|
||||
PlaceTemp.transform.Find("ArrowDOWN").gameObject.SetActive(true);
|
||||
return 2;//Down
|
||||
}
|
||||
else if (MosPos.x > PlaceTemp.transform.position.x && MosPos.z > PlaceTemp.transform.position.z) {
|
||||
PlaceTemp.transform.Find("ArrowLEFT").gameObject.SetActive(true);
|
||||
return 3;//Left
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -13,6 +13,7 @@ public class dPlayCam : NetworkBehaviour
|
||||
void Start ()
|
||||
{
|
||||
rad = (transform.position - player.transform.position);
|
||||
|
||||
}
|
||||
|
||||
void Update ()
|
||||
|
||||
@@ -4,19 +4,17 @@ using UnityEngine;
|
||||
|
||||
public class dAerialGlidingState : dAerialBaseState
|
||||
{
|
||||
float tempTraction; // temp traction to store the actual player traction
|
||||
|
||||
public override void EnterState(dAerialStateManager aSM, dAerialBaseState previousState){
|
||||
|
||||
//Modify base traction
|
||||
tempTraction = aSM.pStats.Traction;
|
||||
aSM.pStats.Traction = 1.0f;
|
||||
aSM.pStats.CurTraction = 1.0f;
|
||||
}
|
||||
|
||||
public override void ExitState(dAerialStateManager aSM, dAerialBaseState nextState){
|
||||
|
||||
//return traction to normal
|
||||
aSM.pStats.Traction = tempTraction;
|
||||
aSM.pStats.CurTraction = aSM.pStats.Traction;
|
||||
}
|
||||
|
||||
public override void UpdateState(dAerialStateManager aSM){
|
||||
|
||||
@@ -5,16 +5,14 @@ using UnityEngine;
|
||||
public class dMoveSlideState : dMoveBaseState
|
||||
{
|
||||
//Slide Variables
|
||||
float originalTraction; // Traction before slide started
|
||||
RaycastHit slideRay; // slide raycast
|
||||
|
||||
public override void EnterState(dMoveStateManager mSM, dMoveBaseState previousState){
|
||||
|
||||
//Rotate player and adjust height and adjust traction
|
||||
mSM.pStats.CurVel = 0;
|
||||
originalTraction = mSM.pStats.Traction;
|
||||
mSM.moveController.height *= .5f;
|
||||
mSM.pStats.Traction = 0.01f;
|
||||
mSM.pStats.CurTraction = 0.01f;
|
||||
mSM.moveController.center = new Vector3(0,mSM.moveController.center.y - mSM.moveController.height * .5f,0);
|
||||
//mSM.moveController.Move(new Vector3(0,-0.1f,0));
|
||||
}
|
||||
@@ -25,14 +23,14 @@ public class dMoveSlideState : dMoveBaseState
|
||||
if(nextState != mSM.CrouchState){
|
||||
mSM.gameObject.transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||
mSM.pStats.CurVel = mSM.calculatedCurVel;
|
||||
mSM.pStats.Traction = originalTraction;
|
||||
mSM.pStats.CurTraction = mSM.pStats.Traction;
|
||||
mSM.moveController.height *= 2.0f;
|
||||
mSM.moveController.center = new Vector3(0,mSM.moveController.center.y + mSM.moveController.height * .25f,0);
|
||||
}
|
||||
|
||||
//if state is crouch revert traction
|
||||
else{
|
||||
mSM.pStats.Traction = originalTraction;
|
||||
mSM.pStats.CurTraction = mSM.pStats.Traction;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class dMoveStateManager : NetworkBehaviour
|
||||
public Vector3 driftVel; // Lerped Movement Vector
|
||||
public float calculatedCurVel; // calculated current vel using driftVel
|
||||
public int layerMask; // LayerMask to exclude player
|
||||
RaycastHit wallHitTop, wallHitBot; // Raycast for momentum loss on wall hit
|
||||
RaycastHit wallHitTop, wallHitBot, wallExitTop, wallExitBot; // Raycast for momentum loss on wall hit
|
||||
private Vector3 lastVel; // previous vel
|
||||
private bool firstWallHit = false; // hit the wall for the first time
|
||||
|
||||
@@ -116,6 +116,8 @@ public class dMoveStateManager : NetworkBehaviour
|
||||
|
||||
//if (!IsLocalPlayer) { return; }
|
||||
Cursor.lockState = CursorLockMode.Locked; // Lock cursor on start if you are the local player
|
||||
pStats.Traction = pStats.CurTraction;
|
||||
pStats.CurAcc = pStats.Acc;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -180,7 +182,7 @@ public class dMoveStateManager : NetworkBehaviour
|
||||
// while the speed is below max speed slowly increase it
|
||||
else if ((pStats.CurVel >= pStats.MinVel) && (pStats.CurVel < pStats.MaxVel))
|
||||
{
|
||||
pStats.CurVel += pStats.Acc;
|
||||
pStats.CurVel += pStats.CurAcc;
|
||||
return pStats.CurVel;
|
||||
}
|
||||
//If the players speed is above or equal to max speed set speed to max
|
||||
@@ -210,18 +212,19 @@ public class dMoveStateManager : NetworkBehaviour
|
||||
Vector3 rayOffset = moveXZ - lastVel;
|
||||
|
||||
//Check if wall is in direction player is moving
|
||||
if (((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == true) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .5f, layerMask) == true))) && !firstWallHit){
|
||||
if (((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .18f, layerMask) == true) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .18f, layerMask) == true))) && !firstWallHit){
|
||||
CancelMomentum();
|
||||
Debug.Log("Collide");
|
||||
firstWallHit = true;
|
||||
}
|
||||
else if((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == false) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .5f, layerMask) == false))){
|
||||
if(((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallExitBot, .3f, layerMask) == false) && ((currentState == SlideState || currentState == CrouchState) || (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallExitTop, .3f, layerMask) == false))) && firstWallHit){
|
||||
firstWallHit = false;
|
||||
}
|
||||
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,2.2f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,.4f,0) + (rayOffset/2), moveXZ.normalized * 1f, Color.red);
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,2.2f,0) + rayOffset, moveXZ.normalized * .2f, Color.red);
|
||||
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
if(currentState == GrappleAirState){
|
||||
driftVel = Vector3.zero;
|
||||
}
|
||||
@@ -240,7 +243,7 @@ public class dMoveStateManager : NetworkBehaviour
|
||||
//player vector should be under the circumstances
|
||||
vel = moveX + moveZ;
|
||||
Vector3 moveXZ = new Vector3(vel.x, 0, vel.z);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
|
||||
//need to have move controller involved for correct movement
|
||||
if(currentState == CrouchState){
|
||||
|
||||
@@ -7,19 +7,17 @@ public class dNitroNitroingState : dNitroBaseState
|
||||
|
||||
private float tempTimer; // temporary timer
|
||||
private float actualMaxVel; // actual max velocity
|
||||
private float actualAcc; // actual acceleration
|
||||
|
||||
public override void EnterState(dNitroStateManager nSM, dNitroBaseState previousState){
|
||||
actualMaxVel = nSM.pStats.MaxVel; // saves previous max velocity
|
||||
actualAcc = nSM.pStats.Acc; // saves previous max acc
|
||||
nSM.pStats.Acc += nSM.nitroAccBoost; // increases acceleration
|
||||
nSM.pStats.CurAcc += nSM.nitroAccBoost; // increases acceleration
|
||||
nSM.pStats.MaxVel += nSM.nitroVelBoost; // increases max velocity
|
||||
|
||||
tempTimer = 5; // how long we will be sped up
|
||||
}
|
||||
|
||||
public override void ExitState(dNitroStateManager nSM, dNitroBaseState nextState){
|
||||
nSM.pStats.Acc = actualAcc; // reset acceleration
|
||||
nSM.pStats.CurAcc = nSM.pStats.Acc; // reset acceleration
|
||||
nSM.pStats.MaxVel = actualMaxVel; // reset maximum velocity
|
||||
}
|
||||
|
||||
|
||||
@@ -4,19 +4,17 @@ using UnityEngine;
|
||||
|
||||
public class AerialGlidingState : AerialBaseState
|
||||
{
|
||||
float tempTraction; // temp traction to store the actual player traction
|
||||
|
||||
public override void EnterState(AerialStateManager aSM, AerialBaseState previousState){
|
||||
|
||||
//Modify base traction
|
||||
tempTraction = aSM.pStats.Traction;
|
||||
aSM.pStats.Traction = 1.0f;
|
||||
aSM.pStats.CurTraction = 1.0f;
|
||||
}
|
||||
|
||||
public override void ExitState(AerialStateManager aSM, AerialBaseState nextState){
|
||||
|
||||
//return traction to normal
|
||||
aSM.pStats.Traction = tempTraction;
|
||||
aSM.pStats.CurTraction = aSM.pStats.Traction;
|
||||
}
|
||||
|
||||
public override void UpdateState(AerialStateManager aSM){
|
||||
|
||||
@@ -114,6 +114,8 @@ public class MoveStateManager : NetworkBehaviour
|
||||
|
||||
if (!IsLocalPlayer) { return; }
|
||||
Cursor.lockState = CursorLockMode.Locked; // Lock cursor on start if you are the local player
|
||||
pStats.CurTraction = pStats.Traction;
|
||||
pStats.CurAcc = pStats.Acc;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -178,7 +180,7 @@ public class MoveStateManager : NetworkBehaviour
|
||||
// while the speed is below max speed slowly increase it
|
||||
else if ((pStats.CurVel >= pStats.MinVel) && (pStats.CurVel < pStats.MaxVel))
|
||||
{
|
||||
pStats.CurVel += pStats.Acc;
|
||||
pStats.CurVel += pStats.CurAcc;
|
||||
return pStats.CurVel;
|
||||
}
|
||||
//If the players speed is above or equal to max speed set speed to max
|
||||
@@ -208,18 +210,18 @@ public class MoveStateManager : NetworkBehaviour
|
||||
Vector3 rayOffset = moveXZ - lastVel;
|
||||
|
||||
//Check if wall is in direction player is moving
|
||||
if (((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == true) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .5f, layerMask) == true))) && !firstWallHit){
|
||||
if (((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == true) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .2f, layerMask) == true))) && !firstWallHit){
|
||||
CancelMomentum();
|
||||
firstWallHit = true;
|
||||
}
|
||||
else if((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == false) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .5f, layerMask) == false))){
|
||||
else if((Physics.Raycast(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized, out wallHitBot, .2f, layerMask) == false) || ((currentState != SlideState || currentState != CrouchState) && (Physics.Raycast(gameObject.transform.position + new Vector3(0,2.2f,0), moveXZ.normalized, out wallHitTop, .2f, layerMask) == false))){
|
||||
firstWallHit = false;
|
||||
}
|
||||
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,2.2f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
if(currentState == GrappleAirState){
|
||||
driftVel = Vector3.zero;
|
||||
}
|
||||
@@ -238,7 +240,7 @@ public class MoveStateManager : NetworkBehaviour
|
||||
//player vector should be under the circumstances
|
||||
vel = moveX + moveZ;
|
||||
Vector3 moveXZ = new Vector3(vel.x, 0, vel.z);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
|
||||
//Need to have movecontroller involved for correct movement
|
||||
if(currentState == CrouchState){
|
||||
|
||||
@@ -5,16 +5,14 @@ using UnityEngine;
|
||||
public class MoveSlideState : MoveBaseState
|
||||
{
|
||||
//Slide Variables
|
||||
float originalTraction; // Traction before slide started
|
||||
RaycastHit slideRay; // slide raycast
|
||||
|
||||
public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){
|
||||
|
||||
//Rotate player and adjust height and adjust traction
|
||||
mSM.pStats.CurVel = 0;
|
||||
originalTraction = mSM.pStats.Traction;
|
||||
mSM.moveController.height *= .5f;
|
||||
mSM.pStats.Traction = 0.01f;
|
||||
mSM.pStats.CurTraction = 0.01f;
|
||||
mSM.moveController.center = new Vector3(0,mSM.moveController.center.y - mSM.moveController.height * .5f,0);
|
||||
//mSM.moveController.Move(new Vector3(0,-0.1f,0));
|
||||
}
|
||||
@@ -25,14 +23,14 @@ public class MoveSlideState : MoveBaseState
|
||||
if(nextState != mSM.CrouchState){
|
||||
mSM.gameObject.transform.localEulerAngles = new Vector3(0, 0, 0);
|
||||
mSM.pStats.CurVel = mSM.calculatedCurVel;
|
||||
mSM.pStats.Traction = originalTraction;
|
||||
mSM.pStats.CurTraction = mSM.pStats.Traction;
|
||||
mSM.moveController.height *= 2.0f;
|
||||
mSM.moveController.center = new Vector3(0,mSM.moveController.center.y + mSM.moveController.height * .25f,0);
|
||||
}
|
||||
|
||||
//if state is crouch revert traction
|
||||
else{
|
||||
mSM.pStats.Traction = originalTraction;
|
||||
mSM.pStats.CurTraction = mSM.pStats.Traction;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,19 +7,18 @@ public class NitroNitroingState : NitroBaseState
|
||||
|
||||
private float tempTimer; // temporary timer
|
||||
private float actualMaxVel; // actual max velocity
|
||||
private float actualAcc; // actual acceleration
|
||||
|
||||
public override void EnterState(NitroStateManager nSM, NitroBaseState previousState){
|
||||
actualMaxVel = nSM.pStats.MaxVel; // saves previous max velocity
|
||||
actualAcc = nSM.pStats.Acc; // saves previous max acc
|
||||
nSM.pStats.Acc += nSM.nitroAccBoost; // increases acceleration
|
||||
|
||||
nSM.pStats.CurAcc += nSM.nitroAccBoost; // increases acceleration
|
||||
nSM.pStats.MaxVel += nSM.nitroVelBoost; // increases max velocity
|
||||
|
||||
tempTimer = 5; // how long we will be sped up
|
||||
}
|
||||
|
||||
public override void ExitState(NitroStateManager nSM, NitroBaseState nextState){
|
||||
nSM.pStats.Acc = actualAcc; // reset acceleration
|
||||
nSM.pStats.CurAcc = nSM.pStats.Acc; // reset acceleration
|
||||
nSM.pStats.MaxVel = actualMaxVel; // reset maximum velocity
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ public class PlayerCam : NetworkBehaviour
|
||||
void Start ()
|
||||
{
|
||||
rad = (transform.position - player.transform.position);
|
||||
|
||||
}
|
||||
|
||||
void Update ()
|
||||
|
||||
@@ -5,6 +5,9 @@ using UnityEngine.Assertions;
|
||||
|
||||
public class PlayerStats : MonoBehaviour
|
||||
{
|
||||
|
||||
public enum Weather {Rain, Snow, Wind, Fog};
|
||||
|
||||
//Soft cap max speed a player can achieve they can achieve this speed by running
|
||||
[SerializeField] private float maxVel = 40.0f;
|
||||
public float MaxVel{
|
||||
@@ -40,6 +43,12 @@ public class PlayerStats : MonoBehaviour
|
||||
set{ acc = value; }
|
||||
}
|
||||
|
||||
[SerializeField] private float curAcc;
|
||||
public float CurAcc{
|
||||
get{ return curAcc; }
|
||||
set{ curAcc = value;}
|
||||
}
|
||||
|
||||
//Player Jump power
|
||||
[SerializeField] private float jumpPow = 60.0f;
|
||||
public float JumpPow{
|
||||
@@ -61,6 +70,12 @@ public class PlayerStats : MonoBehaviour
|
||||
set{ traction = value; }
|
||||
}
|
||||
|
||||
[SerializeField] private float curTraction;
|
||||
public float CurTraction{
|
||||
get{ return curTraction; }
|
||||
set{ curTraction = value; }
|
||||
}
|
||||
|
||||
//Player Kick Power
|
||||
[SerializeField] private float kickPow = 500.0f;
|
||||
public float KickPow{
|
||||
@@ -131,6 +146,87 @@ public class PlayerStats : MonoBehaviour
|
||||
set{ playerPoints = value; }
|
||||
}
|
||||
|
||||
[SerializeField] private bool windOn = false;
|
||||
public bool WindOn{
|
||||
get{ return windOn; }
|
||||
}
|
||||
|
||||
private float tempTraction;
|
||||
private float tempAcc;
|
||||
private float accModification;
|
||||
|
||||
public void SetWeather(Weather weather){
|
||||
switch(weather){
|
||||
case Weather.Rain:{
|
||||
Debug.Log("Rain");
|
||||
|
||||
tempTraction = traction;
|
||||
tempAcc = acc;
|
||||
|
||||
traction -= 2;
|
||||
if(curTraction - 2 > 0){
|
||||
curTraction -= 2;
|
||||
}
|
||||
|
||||
acc += 2;
|
||||
curAcc += 2;
|
||||
accModification = 2;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Weather.Snow:{
|
||||
Debug.Log("Snow");
|
||||
|
||||
tempTraction = traction;
|
||||
tempAcc = acc;
|
||||
|
||||
traction += 2;
|
||||
if(curTraction > .01 && curTraction != 1){
|
||||
curTraction += 2;
|
||||
}
|
||||
|
||||
acc *= .5f;
|
||||
curAcc *= .5f;
|
||||
accModification = -acc;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Weather.Wind:{
|
||||
Debug.Log("Wind");
|
||||
windOn = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case Weather.Fog:{
|
||||
Debug.Log("Fog");
|
||||
break;
|
||||
}
|
||||
|
||||
default:{
|
||||
Debug.Log("Incorrect thing passed in");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearWeather(){
|
||||
|
||||
acc = tempAcc;
|
||||
traction = tempTraction;
|
||||
|
||||
if(curTraction > .01 && curTraction != 1){
|
||||
curTraction = traction;
|
||||
}
|
||||
|
||||
curAcc -= accModification;
|
||||
|
||||
windOn = false;
|
||||
|
||||
}
|
||||
|
||||
void Update(){
|
||||
VariableValidation();
|
||||
}
|
||||
|
||||
162
Assets/Scripts/PlayerScripts/ResetZones.cs
Normal file
162
Assets/Scripts/PlayerScripts/ResetZones.cs
Normal file
@@ -0,0 +1,162 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using MLAPI;
|
||||
using MLAPI.Messaging;
|
||||
using MLAPI.Exceptions;
|
||||
using System.Linq;
|
||||
|
||||
public class ResetZones : MonoBehaviour {
|
||||
|
||||
private Transform ValleyRespawnPoint;
|
||||
private Transform PlainsRespawnPoint;
|
||||
private Transform FoothillsRespawnPoint;
|
||||
private Transform MountainRespawnPoint;
|
||||
|
||||
public Transform runnerPrefab;
|
||||
|
||||
private GameObject _runner;
|
||||
|
||||
public enum Zone {
|
||||
VALLEY,
|
||||
PLAINS,
|
||||
FOOTHILLS,
|
||||
MOUNTAIN
|
||||
}
|
||||
|
||||
private Zone currentZone;
|
||||
|
||||
|
||||
void Start() {
|
||||
// Make sure we are in the game scene
|
||||
if (SceneManager.GetActiveScene().buildIndex == 3) {
|
||||
ValleyRespawnPoint = GameObject.FindGameObjectWithTag("ValleyRespawnPoint").transform;
|
||||
PlainsRespawnPoint = GameObject.FindGameObjectWithTag("PlainsRespawnPoint").transform;
|
||||
FoothillsRespawnPoint = GameObject.FindGameObjectWithTag("FoothillsRespawnPoint").transform;
|
||||
MountainRespawnPoint = GameObject.FindGameObjectWithTag("MountainRespawnPoint").transform;
|
||||
}
|
||||
|
||||
// Starting zone is the valley
|
||||
currentZone = Zone.VALLEY;
|
||||
}
|
||||
|
||||
public void SetCurrentZone(int newZone) {
|
||||
currentZone = (Zone)newZone;
|
||||
}
|
||||
|
||||
private Vector3 GetRespawnPosition(Zone zone) {
|
||||
switch(zone) {
|
||||
case Zone.PLAINS:
|
||||
return PlainsRespawnPoint.position;
|
||||
case Zone.FOOTHILLS:
|
||||
return FoothillsRespawnPoint.position;
|
||||
case Zone.MOUNTAIN:
|
||||
return MountainRespawnPoint.position;
|
||||
default:
|
||||
case Zone.VALLEY:
|
||||
return ValleyRespawnPoint.position;
|
||||
}
|
||||
}
|
||||
|
||||
public void RespawnToCheckpoint() {
|
||||
RespawnPlayerServerRPC(gameObject.transform.root.gameObject.GetComponent<NetworkObject>().OwnerClientId, GetRespawnPosition(currentZone));
|
||||
}
|
||||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
private void RespawnPlayerServerRPC(ulong clientID, Vector3 respawnPos, ServerRpcParams serverRpcParams = default)
|
||||
{
|
||||
|
||||
// Get all players in the scene
|
||||
GameObject[] playableCharacters = GameObject.FindGameObjectsWithTag("Player");
|
||||
|
||||
// Find our player first
|
||||
foreach (GameObject character in playableCharacters) {
|
||||
if (character.GetComponent<NetworkObject>().OwnerClientId == clientID) {
|
||||
// Player found
|
||||
|
||||
// Despawn them
|
||||
try {
|
||||
character.GetComponent<NetworkObject>().Despawn(true);
|
||||
} catch (SpawnStateException e) {
|
||||
Debug.LogError("Spawn State Exception Exception:");
|
||||
Debug.LogError(e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Spawn the player
|
||||
if (ServerGameNetPortal.Instance.clientIdToGuid.TryGetValue(clientID, out string clientGuid)) {
|
||||
if (ServerGameNetPortal.Instance.clientData.TryGetValue(clientGuid, out PlayerData playerData)) {
|
||||
// Spawn as player
|
||||
_runner = Instantiate(runnerPrefab, respawnPos, Quaternion.Euler(0, -90, 0)).gameObject;
|
||||
_runner.GetComponent<NetworkObject>().SpawnAsPlayerObject(clientID, null, true);
|
||||
|
||||
// Handle Client Spawning Locally
|
||||
string itemsAsString = string.Join(",", playerData.pInv.NetworkItemList);
|
||||
StartCoroutine(SpawnClient(clientID, itemsAsString));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The client respawning needs a slight delay to allow for the spawn to properly sync up
|
||||
IEnumerator SpawnClient(ulong clientID, string itemsAsString) {
|
||||
|
||||
// First notify the player they are respawning (so we display stuff on screen)
|
||||
ClientRpcParams clientRpcParams = new ClientRpcParams {
|
||||
Send = new ClientRpcSendParams {
|
||||
TargetClientIds = new ulong[] { clientID }
|
||||
}
|
||||
};
|
||||
|
||||
UIRespawningClientRpc(clientID, clientRpcParams);
|
||||
|
||||
// 3 Second Respawn Delay
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
|
||||
// Now actually respawn the player
|
||||
clientRpcParams = new ClientRpcParams {
|
||||
Send = new ClientRpcSendParams {
|
||||
TargetClientIds = new ulong[] { clientID }
|
||||
}
|
||||
};
|
||||
|
||||
SpawnPlayerClientRpc(clientID, itemsAsString, clientRpcParams);
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
private void UIRespawningClientRpc(ulong clientId, ClientRpcParams clientRpcParams = default) {
|
||||
GameObject.FindGameObjectWithTag("RunnerHUD").GetComponent<PlayerHUD>().setRespawnPanelVisibility(true);
|
||||
GameObject.FindGameObjectWithTag("RunnerHUD").GetComponent<PlayerHUD>().countdown_text.enabled = false;
|
||||
}
|
||||
|
||||
// Spawn in each player
|
||||
[ClientRpc]
|
||||
public void SpawnPlayerClientRpc(ulong clientId, string itemsAsString, ClientRpcParams clientRpcParams = default) {
|
||||
|
||||
GameObject[] playableCharacters = GameObject.FindGameObjectsWithTag("Player");
|
||||
|
||||
foreach (GameObject character in playableCharacters) {
|
||||
if (character.GetComponent<NetworkObject>().OwnerClientId == clientId) {
|
||||
// Rebuild inventory
|
||||
List<string> itemList = itemsAsString.Split(',').ToList();
|
||||
character.GetComponentInChildren<PlayerInventory>().UpdateEquips(itemList, this.gameObject.GetComponent<InventoryManager>().ItemDict);
|
||||
|
||||
GameHandler.FindGameObjectInChildWithTag(character, "PlayerCam").GetComponent<Camera>().enabled = true;
|
||||
GameHandler.FindGameObjectInChildWithTag(character, "PlayerCam").GetComponent<AudioListener>().enabled = true;
|
||||
GameHandler.FindGameObjectInChildWithTag(character, "PlayerCam").GetComponent<PlayerCam>().enabled = true;
|
||||
|
||||
character.GetComponentInChildren<MoveStateManager>().enabled = true;
|
||||
character.GetComponentInChildren<DashStateManager>().enabled = true;
|
||||
character.GetComponentInChildren<NitroStateManager>().enabled = true;
|
||||
character.GetComponentInChildren<AerialStateManager>().enabled = true;
|
||||
character.GetComponentInChildren<OffenseStateManager>().enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Also turn off the respawning UI and back on the UI for the timer
|
||||
GameObject.FindGameObjectWithTag("RunnerHUD").GetComponent<PlayerHUD>().setRespawnPanelVisibility(false);
|
||||
GameObject.FindGameObjectWithTag("RunnerHUD").GetComponent<PlayerHUD>().countdown_text.enabled = true;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/PlayerScripts/ResetZones.cs.meta
Normal file
11
Assets/Scripts/PlayerScripts/ResetZones.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f942eeaa888c98468c9ad196fb88115
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -16,6 +16,9 @@ public class PauseMenu : MonoBehaviour {
|
||||
[SerializeField]
|
||||
private GameObject ConfirmationPanel;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject RespawnConfirmationPanel;
|
||||
|
||||
[SerializeField]
|
||||
private TMP_Text ControlsHeader;
|
||||
[SerializeField]
|
||||
@@ -29,6 +32,7 @@ public class PauseMenu : MonoBehaviour {
|
||||
PauseMenuPanel.SetActive(false);
|
||||
ControlsPanel.SetActive(false);
|
||||
ConfirmationPanel.SetActive(false);
|
||||
RespawnConfirmationPanel.SetActive(false);
|
||||
}
|
||||
|
||||
void Update() {
|
||||
@@ -127,4 +131,24 @@ public class PauseMenu : MonoBehaviour {
|
||||
ControlsText.text = "To-Do: Put the Runner's Controls here";
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRespawnClicked() {
|
||||
RespawnConfirmationPanel.SetActive(true);
|
||||
}
|
||||
|
||||
public void RespawnDecline() {
|
||||
RespawnConfirmationPanel.SetActive(false);
|
||||
}
|
||||
|
||||
public void RespawnConfirmed() {
|
||||
// Disable/Enable player controls
|
||||
GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
|
||||
|
||||
foreach (GameObject player in players) {
|
||||
// Find the local player
|
||||
if (player.GetComponent<NetworkObject>().IsLocalPlayer) {
|
||||
player.GetComponent<ResetZones>().RespawnToCheckpoint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class WeatherWheel : MonoBehaviour {
|
||||
|
||||
void Update() {
|
||||
if (isSpinning) {
|
||||
transform.Rotate(0, 0, wheelSpeed, Space.World);
|
||||
transform.Rotate(0, 0, wheelSpeed);
|
||||
wheelSpeed -= subtractSpeed;
|
||||
}
|
||||
|
||||
@@ -28,28 +28,28 @@ public class WeatherWheel : MonoBehaviour {
|
||||
Debug.Log("Snow");
|
||||
|
||||
// Set angle back to centered
|
||||
transform.rotation = Quaternion.Euler(0, 0, 0);
|
||||
transform.localRotation = Quaternion.Euler(0, 0, 0);
|
||||
} else if (finalAngle > 45 && finalAngle <= 135) {
|
||||
// Windy
|
||||
// TODO: Trigger Wind
|
||||
Debug.Log("Windy");
|
||||
|
||||
// Set angle back to centered
|
||||
transform.rotation = Quaternion.Euler(0, 0, 90);
|
||||
transform.localRotation = Quaternion.Euler(0, 0, 90);
|
||||
} else if (finalAngle > 135 && finalAngle <= 225) {
|
||||
// Fog
|
||||
// TODO: Trigger Fog
|
||||
Debug.Log("Fog");
|
||||
|
||||
// Set angle back to centered
|
||||
transform.rotation = Quaternion.Euler(0, 0, 180);
|
||||
transform.localRotation = Quaternion.Euler(0, 0, 180);
|
||||
} else if (finalAngle > 225 && finalAngle <= 315) {
|
||||
// Rain
|
||||
// TODO: Trigger Rain
|
||||
Debug.Log("Rain");
|
||||
|
||||
// Set angle back to centered
|
||||
transform.rotation = Quaternion.Euler(0, 0, 270);
|
||||
transform.localRotation = Quaternion.Euler(0, 0, 270);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ TagManager:
|
||||
- King UI
|
||||
- King
|
||||
- WeatherWheelUI
|
||||
-
|
||||
-
|
||||
- Door
|
||||
- DoorFrame
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
@@ -6,23 +6,23 @@ EditorUserSettings:
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedScenePath-0:
|
||||
value: 22424703114646680e0b0227036c731f1415016439262f2434
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-1:
|
||||
value: 22424703114646680e0b0227036c6b19021b1d192f2d2835633c133af6f9
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-2:
|
||||
RecentlyUsedScenePath-1:
|
||||
value: 22424703114646680e0b0227036c7b151b180b65093e273e12190f3cf6ef2021f2e225a7f234362820
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 22424703114646680e0b0227036c7b151b180b652b3a27292f260573f1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 22424703114646680e0b0227036c731f1415016439262f2434
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26
|
||||
flags: 0
|
||||
@@ -33,7 +33,7 @@ EditorUserSettings:
|
||||
value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-9:
|
||||
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb
|
||||
value: 22424703114646680e0b0227036c7b151b180b650721283704240d14f0e12d3aedff78fce9332b25
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
|
||||
Reference in New Issue
Block a user