diff --git a/Assets/Prefabs/Player/PlayerPrefab.prefab b/Assets/Prefabs/Player/PlayerPrefab.prefab index 4d0d4fb..30d923c 100644 --- a/Assets/Prefabs/Player/PlayerPrefab.prefab +++ b/Assets/Prefabs/Player/PlayerPrefab.prefab @@ -9,8 +9,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 394725941300514827} - - component: {fileID: 8132898020472409511} - - component: {fileID: 2385576226801105552} - component: {fileID: 3891196372269872751} - component: {fileID: 1779614325098168083} m_Layer: 0 @@ -34,38 +32,6 @@ Transform: m_Father: {fileID: 7188906082087890177} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!143 &8132898020472409511 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4814433541978696327} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.08 - m_MinMoveDistance: 0.001 - m_Center: {x: 0, y: 0, z: 0} ---- !u!136 &2385576226801105552 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4814433541978696327} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} --- !u!33 &3891196372269872751 MeshFilter: m_ObjectHideFlags: 0 @@ -127,6 +93,9 @@ GameObject: - component: {fileID: 7188906082087890180} - component: {fileID: 7188906082087890183} - component: {fileID: 7188906082087890185} + - component: {fileID: 6558661690282462800} + - component: {fileID: 2274833863450849408} + - component: {fileID: 471272923182148881} m_Layer: 3 m_Name: PlayerPrefab m_TagString: Player @@ -176,7 +145,6 @@ MonoBehaviour: m_EditorClassIdentifier: items: [] pStats: {fileID: 0} - invMan: {fileID: 0} --- !u!114 &7188906082087890185 MonoBehaviour: m_ObjectHideFlags: 0 @@ -196,7 +164,55 @@ MonoBehaviour: m_Bits: 4294967295 minAngle: -30 maxAngle: 45 - sensitivity: 200 + sensitivity: 301 +--- !u!143 &6558661690282462800 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7188906082087890184} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &2274833863450849408 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7188906082087890184} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &471272923182148881 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7188906082087890184} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 --- !u!1 &7188906082643956521 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Demos/InventorySelection.unity b/Assets/Scenes/Demos/InventorySelection.unity index 19ccafe..1b6d5ae 100644 --- a/Assets/Scenes/Demos/InventorySelection.unity +++ b/Assets/Scenes/Demos/InventorySelection.unity @@ -152,14 +152,94 @@ RectTransform: m_Children: - {fileID: 1647670232} - {fileID: 1598335013} + - {fileID: 591528210} m_Father: {fileID: 351537844} m_RootOrder: 2 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: 163.22, y: 0} + m_AnchoredPosition: {x: 131, y: 75} m_SizeDelta: {x: 54.45, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &105946287 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 105946288} + - component: {fileID: 105946290} + - component: {fileID: 105946289} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &105946288 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 105946287} + 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: 747127856} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &105946289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 105946287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Next Scene +--- !u!222 &105946290 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 105946287} + m_CullTransparentMesh: 1 --- !u!1 &351537840 GameObject: m_ObjectHideFlags: 0 @@ -208,7 +288,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 + m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 m_ReferenceResolution: {x: 800, y: 600} @@ -254,6 +334,7 @@ RectTransform: - {fileID: 526839286} - {fileID: 1465191467} - {fileID: 2333107} + - {fileID: 1968992433} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -470,6 +551,42 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} +--- !u!1 &591528209 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 591528210} + m_Layer: 5 + m_Name: PlayerPoints + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &591528210 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 591528209} + 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: + - {fileID: 1069645300} + m_Father: {fileID: 2333107} + m_RootOrder: 2 + 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: -79, y: -147} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &624676319 GameObject: m_ObjectHideFlags: 0 @@ -536,6 +653,139 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &747127855 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 747127856} + - component: {fileID: 747127859} + - component: {fileID: 747127858} + - component: {fileID: 747127857} + m_Layer: 5 + m_Name: Next Scene + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &747127856 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 747127855} + 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: + - {fileID: 105946288} + m_Father: {fileID: 1968992433} + 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: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &747127857 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 747127855} + 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: 747127858} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 526839287} + m_TargetAssemblyTypeName: InvSceneSettings, Assembly-CSharp + m_MethodName: nextScene + 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 &747127858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 747127855} + 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: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + 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 &747127859 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 747127855} + m_CullTransparentMesh: 1 --- !u!1 &878303281 GameObject: m_ObjectHideFlags: 0 @@ -615,6 +865,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 878303281} m_CullTransparentMesh: 1 +--- !u!1 &1069645299 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1069645300} + - component: {fileID: 1069645302} + - component: {fileID: 1069645301} + m_Layer: 5 + m_Name: PPText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1069645300 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1069645299} + 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: 591528210} + 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: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1069645301 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1069645299} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Points Left: 0' +--- !u!222 &1069645302 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1069645299} + m_CullTransparentMesh: 1 --- !u!1 &1442362579 GameObject: m_ObjectHideFlags: 0 @@ -827,7 +1156,7 @@ RectTransform: 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: -133, y: 86} + m_AnchoredPosition: {x: -200, y: 146} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1598335012 @@ -899,8 +1228,8 @@ RectTransform: 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: 333.44, y: 222.35} + m_AnchoredPosition: {x: 42.86, y: -51} + m_SizeDelta: {x: 435.94, y: 288.01} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1647670233 MonoBehaviour: @@ -1015,3 +1344,39 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1956283283} m_CullTransparentMesh: 1 +--- !u!1 &1968992432 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1968992433} + m_Layer: 5 + m_Name: Transition + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1968992433 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1968992432} + 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: + - {fileID: 747127856} + m_Father: {fileID: 351537844} + m_RootOrder: 3 + 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: 283, y: -71} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/Scenes/Demos/MovementScene.unity b/Assets/Scenes/Demos/MovementScene.unity index b860458..7c44fac 100644 --- a/Assets/Scenes/Demos/MovementScene.unity +++ b/Assets/Scenes/Demos/MovementScene.unity @@ -313,6 +313,75 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 228851343} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &279177648 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalPosition.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalPosition.y + value: 1.8 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalPosition.z + value: -0.2 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890183, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: items.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890183, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: items.Array.data[0] + value: + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890184, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_Name + value: PlayerPrefab + objectReference: {fileID: 0} + - target: {fileID: 7188906082087890184, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} --- !u!1 &478416584 GameObject: m_ObjectHideFlags: 0 @@ -1206,266 +1275,3 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2061208975} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &545839971962929857 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 545839971962929861} - - component: {fileID: 545839971962929858} - - component: {fileID: 545839971962929859} - - component: {fileID: 545839971962929863} - - component: {fileID: 545839971962929862} - - component: {fileID: 545839971962929865} - - component: {fileID: 545839971962929864} - - component: {fileID: 545839971962929860} - - component: {fileID: 545839971962929867} - m_Layer: 3 - m_Name: Player - m_TagString: Player - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!33 &545839971962929858 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &545839971962929859 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &545839971962929860 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 22ae0d31c49624d4fb9990f2f5f72fd9, type: 3} - m_Name: - m_EditorClassIdentifier: - pStats: {fileID: 0} - groundCheckDistance: 0.05 - groundCheckLayers: - serializedVersion: 2 - m_Bits: 4294967295 - minAngle: -30 - maxAngle: 45 - sensitivity: 200 ---- !u!4 &545839971962929861 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1, y: 7.49, z: -0.2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 545839973913860913} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &545839971962929862 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: addc2e37ff81c1b4989ec34b6150b4f7, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!143 &545839971962929863 -CharacterController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Height: 2 - m_Radius: 0.5 - m_SlopeLimit: 45 - m_StepOffset: 0.3 - m_SkinWidth: 0.08 - m_MinMoveDistance: 0.001 - m_Center: {x: 0, y: 0, z: 0} ---- !u!114 &545839971962929864 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 66519fc5420181e45850c591aa1179ec, type: 3} - m_Name: - m_EditorClassIdentifier: - allItems: [] ---- !u!114 &545839971962929865 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5a5d879591af1084ab5d3a35fcd53086, type: 3} - m_Name: - m_EditorClassIdentifier: - items: [] - pStats: {fileID: 0} - invMan: {fileID: 0} ---- !u!136 &545839971962929867 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839971962929857} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &545839973913860908 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 545839973913860913} - - component: {fileID: 545839973913860910} - - component: {fileID: 545839973913860911} - m_Layer: 3 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!20 &545839973913860910 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839973913860908} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!81 &545839973913860911 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839973913860908} - m_Enabled: 1 ---- !u!4 &545839973913860913 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 545839973913860908} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1.6, z: -4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 545839971962929861} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Item.cs b/Assets/Scripts/PlayerScripts/ItemScripts/Item.cs index 4f67c6c..d3597e0 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Item.cs +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Item.cs @@ -18,8 +18,9 @@ public class Item: ScriptableObject { public float kickPowM; public float recovTimeM; public float playerGravM; + public int costM; - public void Equip(PlayerStats p){ + public virtual void Equip(PlayerStats p){ if(maxVelM != 0){ p.MaxVel += maxVelM; } @@ -49,7 +50,7 @@ public class Item: ScriptableObject { } } - public void Unequip(PlayerStats p){ + public virtual void Unequip(PlayerStats p){ if(maxVelM != 0){ p.MaxVel -= maxVelM; } diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset new file mode 100644 index 0000000..65d60c5 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 220c578e08133f54a95a442eb87b3702, type: 3} + m_Name: Blink + m_EditorClassIdentifier: + id: 9 + itemName: Blink + description: Allows Blinking forwards + maxVelM: 0 + minVelM: 0 + curVelM: 0 + accM: 0 + jumpPowM: 0 + jumpNumM: 0 + tractionM: 0 + kickPowM: 0 + recovTimeM: 0 + playerGravM: 0 + costM: 5 + hasWallrunM: 0 + hasBlinkM: 1 + hasGrappleM: 0 + hasGliderM: 0 + hasNitroM: 0 + hasDashM: 0 + cooldownM: 0 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset.meta b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset.meta new file mode 100644 index 0000000..27e4f44 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Blink.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f3ec80a746c12614db0a11da845e3815 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset new file mode 100644 index 0000000..508669a --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 220c578e08133f54a95a442eb87b3702, type: 3} + m_Name: Glider + m_EditorClassIdentifier: + id: 7 + itemName: Glider + description: Player Will Fall slower + maxVelM: 0 + minVelM: 0 + curVelM: 0 + accM: 0 + jumpPowM: 0 + jumpNumM: 0 + tractionM: 0 + kickPowM: 0 + recovTimeM: 0 + playerGravM: 0 + costM: 7 + hasWallrunM: 0 + hasBlinkM: 0 + hasGrappleM: 0 + hasGliderM: 1 + hasNitroM: 0 + hasDashM: 0 + cooldownM: 10 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset.meta b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset.meta new file mode 100644 index 0000000..3b17560 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Glider.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8fe830ac457225a4ab1031a499db94fc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset new file mode 100644 index 0000000..2e21fdf --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 220c578e08133f54a95a442eb87b3702, type: 3} + m_Name: Grapple + m_EditorClassIdentifier: + id: 8 + itemName: Grapple + description: Allows the use of a grapple + maxVelM: 0 + minVelM: 0 + curVelM: 0 + accM: 0 + jumpPowM: 0 + jumpNumM: 0 + tractionM: 0 + kickPowM: 0 + recovTimeM: 0 + playerGravM: 0 + costM: 4 + hasWallrunM: 0 + hasBlinkM: 0 + hasGrappleM: 1 + hasGliderM: 0 + hasNitroM: 0 + hasDashM: 0 + cooldownM: 0 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset.meta b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset.meta new file mode 100644 index 0000000..b75f879 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Grapple.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d48485317ff858c4189d9c3a24830f42 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset new file mode 100644 index 0000000..95fe430 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 220c578e08133f54a95a442eb87b3702, type: 3} + m_Name: Nitro + m_EditorClassIdentifier: + id: 10 + itemName: Nitro + description: Boosts player speed + maxVelM: 0 + minVelM: 0 + curVelM: 0 + accM: 0 + jumpPowM: 0 + jumpNumM: 0 + tractionM: 0 + kickPowM: 0 + recovTimeM: 0 + playerGravM: 0 + costM: 6 + hasWallrunM: 0 + hasBlinkM: 0 + hasGrappleM: 0 + hasGliderM: 0 + hasNitroM: 1 + hasDashM: 0 + cooldownM: 0 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset.meta b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset.meta new file mode 100644 index 0000000..0487ff8 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Nitro.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b91f668477f6b3244b3fea3204e6cd87 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/QuickStandup.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/QuickStandup.asset index 9eff61a..99784d3 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/QuickStandup.asset +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/QuickStandup.asset @@ -25,3 +25,4 @@ MonoBehaviour: kickPowM: 0 recovTimeM: 20 playerGravM: 0 + costM: 5 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/RollerSkates.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/RollerSkates.asset index 63a2e08..1fedb9a 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/RollerSkates.asset +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/RollerSkates.asset @@ -25,3 +25,4 @@ MonoBehaviour: kickPowM: 0 recovTimeM: 0 playerGravM: 0 + costM: 6 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Springs.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Springs.asset index 48b0c55..e5a2f2e 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Springs.asset +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Springs.asset @@ -25,3 +25,4 @@ MonoBehaviour: kickPowM: 0 recovTimeM: 0 playerGravM: 0 + costM: 6 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/StrongerKick.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/StrongerKick.asset index 81dac7a..246f101 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/StrongerKick.asset +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/StrongerKick.asset @@ -25,3 +25,4 @@ MonoBehaviour: kickPowM: 30 recovTimeM: 0 playerGravM: 0 + costM: 3 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/TripleJump.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/TripleJump.asset index 83b86d9..8c90d61 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/TripleJump.asset +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/TripleJump.asset @@ -25,3 +25,4 @@ MonoBehaviour: kickPowM: 0 recovTimeM: 0 playerGravM: 0 + costM: 5 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset new file mode 100644 index 0000000..84b368d --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 220c578e08133f54a95a442eb87b3702, type: 3} + m_Name: Wall Run + m_EditorClassIdentifier: + id: 6 + itemName: Wall Run + description: Allows player to run on walls + maxVelM: 0 + minVelM: 0 + curVelM: 0 + accM: 0 + jumpPowM: 0 + jumpNumM: 0 + tractionM: 0 + kickPowM: 0 + recovTimeM: 0 + playerGravM: 0 + costM: 4 + hasWallrunM: 1 + hasBlinkM: 0 + hasGrappleM: 0 + hasGliderM: 0 + hasNitroM: 0 + hasDashM: 0 + cooldownM: 0 diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset.meta b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset.meta new file mode 100644 index 0000000..27182b9 --- /dev/null +++ b/Assets/Scripts/PlayerScripts/ItemScripts/Resources/ItemObjects/Wall Run.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 82260a3a76214e04eafa1d267c1480fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/ItemScripts/SpecialItem.cs b/Assets/Scripts/PlayerScripts/ItemScripts/SpecialItem.cs index efb9fce..f009355 100644 --- a/Assets/Scripts/PlayerScripts/ItemScripts/SpecialItem.cs +++ b/Assets/Scripts/PlayerScripts/ItemScripts/SpecialItem.cs @@ -2,6 +2,111 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +[CreateAssetMenu] public class SpecialItem : Item { + public bool hasWallrunM; + public bool hasBlinkM; + public bool hasGrappleM; + public bool hasGliderM; + public bool hasNitroM; + public bool hasDashM; + public float cooldownM; + + public override void Equip(PlayerStats p){ + if(maxVelM != 0){ + p.MaxVel += maxVelM; + } + if(minVelM != 0){ + p.MinVel += minVelM; + } + if(curVelM != 0){ + p.CurVel += curVelM; + } + if(accM != 0){ + p.Acc += accM; + } + if(jumpPowM != 0){ + p.JumpPow += jumpPowM; + } + if(jumpNumM != 0){ + p.JumpNum += jumpNumM; + } + if(tractionM != 0){ + p.Traction += tractionM; + } + if(kickPowM != 0){ + p.KickPow += kickPowM; + } + if(playerGravM != 0){ + p.PlayerGrav += playerGravM; + } + if(hasWallrunM != false){ + p.HasWallrun = hasWallrunM; + } + if(hasBlinkM != false){ + p.HasBlink = hasBlinkM; + } + if(hasGrappleM != false){ + p.HasGrapple = hasGrappleM; + } + if(hasGliderM != false){ + p.HasGlider = hasGliderM; + } + if(hasNitroM != false){ + p.HasNitro = hasNitroM; + } + if(hasDashM != false){ + p.HasDash = hasDashM; + } + } + + public override void Unequip(PlayerStats p){ + if(maxVelM != 0){ + p.MaxVel -= maxVelM; + } + if(minVelM != 0){ + p.MinVel -= minVelM; + } + if(curVelM != 0){ + p.CurVel -= curVelM; + } + if(accM != 0){ + p.Acc -= accM; + } + if(jumpPowM != 0){ + p.JumpPow -= jumpPowM; + } + if(jumpNumM != 0){ + p.JumpNum -= jumpNumM; + } + if(tractionM != 0){ + p.Traction -= tractionM; + } + if(kickPowM != 0){ + p.KickPow -= kickPowM; + } + if(playerGravM != 0){ + p.PlayerGrav -= playerGravM; + } + if(hasWallrunM != true){ + p.HasWallrun = hasWallrunM; + } + if(hasBlinkM != true){ + p.HasBlink = hasBlinkM; + } + if(hasGrappleM != true){ + p.HasGrapple = hasGrappleM; + } + if(hasGliderM != true){ + p.HasGlider = hasGliderM; + } + if(hasNitroM != true){ + p.HasNitro = hasNitroM; + } + if(hasDashM != true){ + p.HasDash = hasDashM; + } + } } + diff --git a/Assets/Scripts/PlayerScripts/PlayerInventory.cs b/Assets/Scripts/PlayerScripts/PlayerInventory.cs index 019ff4b..b504127 100644 --- a/Assets/Scripts/PlayerScripts/PlayerInventory.cs +++ b/Assets/Scripts/PlayerScripts/PlayerInventory.cs @@ -4,6 +4,7 @@ using UnityEngine; public class PlayerInventory : MonoBehaviour { + //List of items [SerializeField] List items; @@ -12,15 +13,19 @@ public class PlayerInventory : MonoBehaviour void Awake(){ pStats = GetComponent(); + DontDestroyOnLoad(this.gameObject); } - public void AddItem(Item item){ - if(!items.Contains(item)){ + public void AddItem(Item item, bool ableToAdd){ + if(!items.Contains(item) && ableToAdd){ Debug.Log("Item Added"); items.Add(item); item.Equip(pStats); } + else if(!ableToAdd && !items.Contains(item)){ + Debug.Log("Item Cannot Be Added"); + } else{ Debug.Log("Item Removed"); RemoveItem(item); @@ -41,5 +46,9 @@ public class PlayerInventory : MonoBehaviour } } + public List GetItems(){ + return items; + } + } diff --git a/Assets/Scripts/PlayerScripts/PlayerMovement.cs b/Assets/Scripts/PlayerScripts/PlayerMovement.cs index 421dc9b..ad241cc 100644 --- a/Assets/Scripts/PlayerScripts/PlayerMovement.cs +++ b/Assets/Scripts/PlayerScripts/PlayerMovement.cs @@ -64,7 +64,7 @@ public class PlayerMovement : MonoBehaviour void Awake(){ //Initialize Components - moveController = GetComponentInChildren(); + moveController = GetComponent(); pStats = GetComponent(); ignoreP = LayerMask.GetMask("Player"); @@ -74,7 +74,7 @@ public class PlayerMovement : MonoBehaviour beam.enabled = false; //camera transform - cam = GetComponent(); + cam = GetComponentInChildren(); //Wallrun //wallRun = gameObject.GetComponent(); @@ -84,18 +84,16 @@ public class PlayerMovement : MonoBehaviour void Start(){ Cursor.lockState = CursorLockMode.Locked; - distToGround = GetComponentInChildren().bounds.extents.y; + distToGround = GetComponent().bounds.extents.y; } // Update is called once per frame void FixedUpdate(){ - //input controls for movement - InputController(); //Controls for camera Rotate(); - + if(moveController.enabled == true){ //input controls for movement @@ -206,7 +204,7 @@ public class PlayerMovement : MonoBehaviour if(Input.GetAxis("Jump")==0) jumpPressed = false; } - public bool GetJumpPressed() { + public bool GetJumpPressed(){ return jumpPressed; } @@ -246,8 +244,32 @@ public class PlayerMovement : MonoBehaviour //Gravity Function for adjusting y-vel due to wallrun/glide/etc private void Gravity(){ - //Normal Gravity - vel.y -= pStats.PlayerGrav * Time.deltaTime; + //Temp Values for Glider + float tempTraction = 0.0f; + bool tempSet = false; + + //ADD CHECKER FOR GLIDER WHEN FULLY IMPLEMENTED + if(jumpPressed && pStats.HasGlider){ + + vel.y -= (pStats.PlayerGrav-18) * Time.deltaTime; + if(tempSet == false){ + tempTraction = pStats.Traction; + pStats.Traction = 1.0f; + tempSet = true; + } + + } + else{ + + if(tempSet == true){ + pStats.Traction = tempTraction; + tempSet = false; + } + + //Normal Gravity + vel.y -= pStats.PlayerGrav * Time.deltaTime; + } + //Wallrunning if (pStats.HasWallrun) { wallRun.WallRunRoutine(); } //adjusted later if we are wallrunning //If gliding diff --git a/Assets/Scripts/PlayerScripts/PlayerStats.cs b/Assets/Scripts/PlayerScripts/PlayerStats.cs index 55fd57f..9a52d96 100644 --- a/Assets/Scripts/PlayerScripts/PlayerStats.cs +++ b/Assets/Scripts/PlayerScripts/PlayerStats.cs @@ -5,6 +5,7 @@ using UnityEngine; public class PlayerStats : MonoBehaviour { //Maximum possible player speed + [SerializeField] private float maxVel = 25.0f; public float MaxVel{ get{ return maxVel; } @@ -12,6 +13,7 @@ public class PlayerStats : MonoBehaviour } //Minimum possible player speed + [SerializeField] private float minVel = 2.0f; public float MinVel{ get{ return minVel; } @@ -19,6 +21,7 @@ public class PlayerStats : MonoBehaviour } //Current player speed + [SerializeField] private float curVel = 0.0f; public float CurVel{ get{ return curVel; } @@ -26,6 +29,7 @@ public class PlayerStats : MonoBehaviour } //Player Jump power + [SerializeField] private float acc = 0.1f; public float Acc{ get{ return acc; } @@ -33,6 +37,7 @@ public class PlayerStats : MonoBehaviour } //Player Jump power + [SerializeField] private float jumpPow = 300.0f; public float JumpPow{ get{ return jumpPow; } @@ -40,6 +45,7 @@ public class PlayerStats : MonoBehaviour } //Players Number of Jumps + [SerializeField] private int jumpNum = 2; ////// UPDATE TO 2 WHEN THE JUMP ISSUE IS FIXED public int JumpNum{ get{ return jumpNum; } @@ -47,6 +53,7 @@ public class PlayerStats : MonoBehaviour } //Player Traction + [SerializeField] private float traction = 3.0f; public float Traction{ get{ return traction; } @@ -54,13 +61,15 @@ public class PlayerStats : MonoBehaviour } //Player Kick Power + [SerializeField] private float kickPow; public float KickPow{ get{ return kickPow; } set{ kickPow = value; } } - //Player Recovery Time When Knocked Down + //Player Recovery Time When Knocked Down + [SerializeField] private float recovTime; public float RecovTime{ get{ return recovTime; } @@ -69,6 +78,7 @@ public class PlayerStats : MonoBehaviour //MAY BE UNNECCESARY DEPENDING ON HOW GLIDER TURNS OUT //Gravity Affecting the player + [SerializeField] private float playerGrav = 20.0f; public float PlayerGrav{ get{ return playerGrav; } @@ -76,6 +86,7 @@ public class PlayerStats : MonoBehaviour } //If The Player Has Blink + [SerializeField] private bool hasBlink = false; public bool HasBlink{ get{ return hasBlink; } @@ -83,6 +94,7 @@ public class PlayerStats : MonoBehaviour } //If The Player Has Glider + [SerializeField] private bool hasGlider = false; public bool HasGlider{ get{ return hasGlider; } @@ -90,6 +102,7 @@ public class PlayerStats : MonoBehaviour } //If The Player Has Grapple + [SerializeField] private bool hasGrapple = false; public bool HasGrapple{ get{ return hasGrapple; } @@ -97,9 +110,33 @@ public class PlayerStats : MonoBehaviour } //If The Player Has Wallrun + [SerializeField] private bool hasWallrun = false; public bool HasWallrun{ get{ return hasWallrun; } set{ hasWallrun = value; } } + + //If The Player Has Nitro + [SerializeField] + private bool hasNitro = false; + public bool HasNitro{ + get{ return hasNitro; } + set{ hasNitro = value; } + } + + //If The Player Has Dash + [SerializeField] + private bool hasDash = false; + public bool HasDash{ + get{ return hasDash; } + set{ hasDash = value; } + } + + [SerializeField] + private int playerPoints = 15; + public int PlayerPoints{ + get{ return playerPoints; } + set{ playerPoints = value; } + } } diff --git a/Assets/Scripts/SetInvScene/InvSceneSettings.cs b/Assets/Scripts/SetInvScene/InvSceneSettings.cs index 8f8489a..0f0a213 100644 --- a/Assets/Scripts/SetInvScene/InvSceneSettings.cs +++ b/Assets/Scripts/SetInvScene/InvSceneSettings.cs @@ -2,18 +2,25 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; +using UnityEngine.SceneManagement; public class InvSceneSettings : MonoBehaviour { GameObject player1; PlayerInventory pInv; public GameObject itemOptPrefab; + private Text pointText; + private PlayerStats pStats; InventoryManager invMan; + Vector3 position; + private int pointsLeft; // Start is called before the first frame update void Awake(){ player1 = GameObject.Find("PlayerPrefab"); + pStats = player1.GetComponent(); + pointText = GameObject.Find("PlayerPoints").GetComponentInChildren(); pInv = player1.GetComponent(); player1.GetComponent().enabled = false; player1.transform.GetChild(0).gameObject.SetActive(false); @@ -23,25 +30,27 @@ public class InvSceneSettings : MonoBehaviour void Start(){ InitializeItemB(); - } - - // Update is called once per frame - void Update(){ - + pointsLeft = pStats.PlayerPoints; + pointText.text = "Points Left: " + pointsLeft; } private void InitializeItemB(){ int index = 0; if(itemOptPrefab != null){ foreach(Item item in invMan.ItemList){ - - Vector3 position = new Vector3((1+(index)),3,0); + + if(index < 5){ + position = new Vector3(((index)),3,0); + } + else{ + position = new Vector3(((index-5)),2,0); + } var iOpt = Instantiate(itemOptPrefab, position, Quaternion.identity); iOpt.name = item.itemName; iOpt.transform.SetParent(GameObject.Find("Items").transform); - iOpt.transform.localScale = new Vector3(1,1,1); - iOpt.GetComponent