Compare commits

22 Commits

Author SHA1 Message Date
Garrett Kaiser
65001c0ecb Rocket deals damage 2026-01-29 15:30:38 -08:00
Garrett Kaiser
2ae2697845 Better Rocket 2026-01-22 13:55:57 -08:00
Garrett Kaiser
3c743071c0 Rocket Go NEOM 2026-01-20 15:34:36 -08:00
Garrett Kaiser
ef830fd4ac Boss Hurts PLayer 2026-01-15 14:54:58 -08:00
Garrett Kaiser
3d0dbd029a WEEEE 2026-01-13 15:34:35 -08:00
Garrett Kaiser
6a89355a5e Boss Jump and Lunge 2026-01-09 14:45:35 -08:00
Garrett Kaiser
6929a4cdb2 Boss Jump Above you 2026-01-07 15:24:56 -08:00
Garrett Kaiser
e53a53e48f we 2026-01-05 14:05:58 -08:00
Garrett Kaiser
32cfad3525 Update Scene1-1.unity
YES
2025-12-10 15:15:44 -08:00
Garrett Kaiser
354fbbe2ba Update GunThrown.cs
GUN TURN IN AIR
2025-12-10 15:15:25 -08:00
4b5e97a13e Update PlayerMovement.cs 2025-12-02 13:56:51 -08:00
9ecd6d4cd7 move more stuff over to unity input system 2025-11-21 21:23:33 -08:00
89551b49f3 dash 2025-11-21 14:24:01 -08:00
70d60bfcd9 pause menu initialization changes 2025-11-21 13:13:04 -08:00
a98e003edc fixed gravity + jumping 2025-11-21 00:04:37 -08:00
bc5cf80f30 . 2025-11-20 19:54:40 -08:00
80be13ce72 work on switch to new input system 2025-11-19 20:24:23 -08:00
4de639cdd7 work on switch to new input system 2025-11-19 15:29:45 -08:00
Garrett Kaiser
ef170ca6c6 GUN BE THROW 2025-11-19 15:21:11 -08:00
Garrett Kaiser
178432179b . 2025-11-19 14:21:37 -08:00
Garrett Kaiser
50a5d8c527 Merge branch 'main' of https://git.wirelinestudios.com/Wireline-Studios/JourneyProject 2025-11-19 14:21:29 -08:00
Garrett Kaiser
a057798e3e GUN NO ROTATE :( 2025-11-17 15:30:29 -08:00
41 changed files with 1626 additions and 1331 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -20,8 +20,7 @@ Material:
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3

View File

@@ -20,8 +20,7 @@ Material:
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3

BIN
Assets/New Terrain 1.asset Normal file

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bb90d637fa5a642da99b630af5e39341
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 15600000
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/New Terrain 2.asset Normal file

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6007277cfe490427ea53da88a2d31543
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 15600000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,276 @@
{
"version": 1,
"name": "PlayerControls",
"maps": [
{
"name": "Walking",
"id": "1e7ba32d-4065-405c-9b0c-fe0b09743eb3",
"actions": [
{
"name": "Walk",
"type": "Value",
"id": "3a2bd67d-4457-4f11-b1fc-c86379804bb1",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Attack",
"type": "Button",
"id": "f8dcb10a-f2c6-43c1-9aaf-f11c20421cd1",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Jump",
"type": "Button",
"id": "cec6d443-6127-4956-b159-38ca8562aa98",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Pause",
"type": "Button",
"id": "5c32bd40-94aa-43cd-8964-7cc6e6fe0841",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Look",
"type": "Value",
"id": "7fba5b60-8d24-49b6-8308-c70e6a63c456",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Run",
"type": "Button",
"id": "5a6630db-ebaf-4fde-9e52-f04136a77988",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
"id": "659c7039-016f-46e9-948a-517daf323bd7",
"expectedControlType": "",
"processors": "",
"interactions": "Tap,Hold",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "2a3f4ee7-cbd7-4664-984f-750f150f8d63",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "2D Vector",
"id": "f127319e-6995-4349-bc8a-8d71b1b1c9f9",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "a90b9406-f8c9-41a6-acf9-073de4d92e91",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "1bebfb21-bb71-4512-9291-6f0500a3d82b",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "07a58494-4f87-4c68-a0ac-f51461fb40a5",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "cc51b20a-9c2b-464f-9f63-f83e8bcc34f0",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "",
"action": "Walk",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "2b5b52b2-8b25-451e-a6b7-8cf81f0d050f",
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "fe8bd868-92c9-4b6e-9bc5-14344cb2b727",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": "",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "6471cb05-e4f9-4cdc-809c-2629fdee010a",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "20ba707d-cf88-4683-9ad7-2a705b1129c6",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4e0041d6-e3b6-4e5e-88db-fa3dd30b2c4c",
"path": "<Gamepad>/start",
"interactions": "",
"processors": "",
"groups": "",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "abbc102c-00c8-4291-bfa3-39ed3704b6e8",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": "",
"action": "Pause",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "74ebb1b9-ab13-42d0-956f-019b25fb646b",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "",
"groups": "",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "2c4bb4fd-6d38-4424-a2de-e798aeef5dd7",
"path": "<Mouse>/delta",
"interactions": "",
"processors": "",
"groups": "",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ac8271b8-5a0c-498a-b97b-57546775b0b9",
"path": "<Gamepad>/leftStickPress",
"interactions": "",
"processors": "",
"groups": "",
"action": "Run",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "34fcda37-2f7d-40e9-a510-fff20ecd0672",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "",
"action": "Run",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "045d63b8-c118-4d79-a439-5f1fc422a65f",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "96d963c4-bd8d-4dd6-a8c7-fa55d8318aa2",
"path": "<Keyboard>/f",
"interactions": "",
"processors": "",
"groups": "",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 052faaac586de48259a63d0c4782560b
guid: 96337c2766116244abd3c3ed43585709
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@@ -0,0 +1,248 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6281744304644670800
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 320933365499213468}
- component: {fileID: 3592753358299808266}
- component: {fileID: 4766475707642360040}
- component: {fileID: 3004434195874442965}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &320933365499213468
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6281744304644670800}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.347}
m_LocalScale: {x: 0.5, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7162905310341900034}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3592753358299808266
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6281744304644670800}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4766475707642360040
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6281744304644670800}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &3004434195874442965
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6281744304644670800}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &8931432904472574268
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7162905310341900034}
- component: {fileID: 4267357293232814043}
- component: {fileID: 1542960080867434396}
- component: {fileID: 4388427338992522625}
- component: {fileID: 3414398117399416944}
m_Layer: 0
m_Name: Rocket
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7162905310341900034
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8931432904472574268}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 584.0582, y: 3.21429, z: 197.778}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 320933365499213468}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4267357293232814043
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8931432904472574268}
m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1542960080867434396
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8931432904472574268}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &4388427338992522625
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8931432904472574268}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Height: 2
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &3414398117399416944
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8931432904472574268}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fc567df950c9c44c2a3ada34152072e4, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Rocket
player: {fileID: 0}
TargetPosition: {x: 0, y: 0, z: 0}
playerDistance: 0
direction: {x: 0, y: 0, z: 0}
targetRotation: {x: 0, y: 0, z: 0, w: 0}
rotationSpeed: 30
isStuck: 0
despawnTimer: 10

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 943ff1d96bb9e4320be1b0be5cf63a1b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 3900353858553251828}
- component: {fileID: 2064409223717511053}
- component: {fileID: 7066644236778025839}
- component: {fileID: 6393509116105302420}
m_Layer: 0
m_Name: ThrownGun
m_TagString: Untagged
@@ -28,13 +29,14 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6611039685471789196}
serializedVersion: 2
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.4, y: 0.5, z: 0.4}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 9031458065949887395}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
--- !u!33 &5688607449888095492
MeshFilter:
m_ObjectHideFlags: 0
@@ -50,7 +52,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6611039685471789196}
m_Enabled: 1
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
@@ -111,7 +113,7 @@ CapsuleCollider:
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Height: 2
m_Height: 4
m_Direction: 1
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &7066644236778025839
@@ -126,5 +128,116 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe870c030a2b648d89c63559e7522299, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::GunThrown
rb: {fileID: 6393509116105302420}
player: {fileID: 0}
TargetPosition: {x: 0, y: 0, z: 0}
playerDistance: 0
currentRotation: {x: 0, y: 0, z: 0}
targetRotation: {x: 0, y: 0, z: 0, w: 0}
isStuck: 0
despawnTimer: 10
--- !u!54 &6393509116105302420
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6611039685471789196}
serializedVersion: 5
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 1
--- !u!1001 &9195834916317290860
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2838261725573212642}
m_Modifications:
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalScale.y
value: 0.88888884
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalScale.z
value: 0.88888884
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalRotation.z
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 90
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 685625544054550645, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
propertyPath: m_Name
value: gun(2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
--- !u!4 &9031458065949887395 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3}
m_PrefabInstance: {fileID: 9195834916317290860}
m_PrefabAsset: {fileID: 0}

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &379073252485696804
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalPosition.x
value: 527.1048
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalPosition.y
value: 25.502022
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalPosition.z
value: 216.44846
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}
propertyPath: m_Name
value: gun(2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: aab294e47e7d04c89bbe94d901f8e108
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

BIN
Assets/Scenes/Scene1-Boss.unity LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4e0c2c5470ba3477ca0849aae9f0b6e7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -2,24 +2,69 @@ using UnityEngine;
public class GunThrown : MonoBehaviour
{
public Rigidbody rb;
public GameObject player;
public Vector3 TargetPosition;
public float playerDistance;
public Vector3 currentRotation;
public Quaternion targetRotation;
public bool isStuck;
public float despawnTimer = 10;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.Find("Player");
TargetPosition = player.transform.position;
transform.LookAt(player.transform.position);
currentRotation = transform.eulerAngles;
transform.eulerAngles = new Vector3(60, currentRotation.y, currentRotation.z);
playerDistance = Vector3.Distance(transform.position, TargetPosition);
if (playerDistance < 9)
{
playerDistance = playerDistance * 1.2f;
}
if (playerDistance > 17)
{
playerDistance = playerDistance / 1.4f;
}
else if (playerDistance > 13)
{
playerDistance = playerDistance / 1.2f;
}
rb.AddForce(transform.up * playerDistance, ForceMode.Impulse);
}
// Update is called once per frame
void Update()
{
transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 10 * Time.deltaTime);
//transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 10 * Time.deltaTime);
if (Time.timeScale == 1)
{
targetRotation = Quaternion.Euler(-20f, currentRotation.y, currentRotation.z);
transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, -0.8f);
}
if (transform.position == TargetPosition)
{
isStuck = true;
}
if (isStuck)
{
despawnTimer -= Time.deltaTime;
if (despawnTimer <= 0)
{
Destroy(this.gameObject);
}
}
}
private void OnCollisionEnter(Collision collision)
private void OnCollisionStay(Collision collision)
{
if (collision.gameObject.tag == "Player")
if (collision.gameObject.tag == "Player" && !isStuck)
{
Destroy(this.gameObject);
}

View File

@@ -0,0 +1,29 @@
using UnityEngine;
public class JumpHitbox : MonoBehaviour
{
public PlayerMovement playerMovement;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Hit Player");
playerMovement.HP -= 1;
}
else{
Debug.Log("Failed");
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ba495adcc9de84e148094bc4f9073dfa

View File

@@ -0,0 +1,29 @@
using UnityEngine;
public class LungeHitbox : MonoBehaviour
{
public PlayerMovement playerMovement;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Hit Player");
playerMovement.HP -= 1.5f;
}
else{
Debug.Log("Failed");
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 982fdb439fe8344d68124ca1628747ae

View File

@@ -0,0 +1,16 @@
using UnityEngine;
public class MechBoss : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 7f1d4c5acc0624759954b8d3abdb2f6d

View File

@@ -1,5 +1,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Interactions;
public class MouthOpenClose : MonoBehaviour
{
@@ -59,11 +61,11 @@ public class MouthOpenClose : MonoBehaviour
prompt.SetActive(true);
if (Input.GetKeyDown(KeyCode.E))
{
interacted = true;
prompt.SetActive(false);
text.SetActive(true);
text.GetComponent<TextMeshProUGUI>().text = whatToSay;
timerDeactivate = initialTimerDeactivate;
//interacted = true;
//prompt.SetActive(false);
//text.SetActive(true);
//text.GetComponent<TextMeshProUGUI>().text = whatToSay;
//timerDeactivate = initialTimerDeactivate;
}
}
else
@@ -120,10 +122,27 @@ public class MouthOpenClose : MonoBehaviour
if (text.GetComponent<TextMeshProUGUI>().text != whatToSay) interacted = false;
if (Input.GetKeyDown(KeyCode.C))
{
//text.SetActive(false);
//interacted = false;
}
}
public void OnInteract(InputAction.CallbackContext context)
{
if (context.performed && !interacted && Vector3.Distance(transform.position, player.transform.position) < 3 && context.interaction is TapInteraction)
{
interacted = true;
prompt.SetActive(false);
text.SetActive(true);
text.GetComponent<TextMeshProUGUI>().text = whatToSay;
timerDeactivate = initialTimerDeactivate;
}
if (context.performed && context.interaction is HoldInteraction)
{
text.SetActive(false);
interacted = false;
}
}
}

View File

@@ -30,9 +30,9 @@ public class PauseMenuControls : MonoBehaviour
public TextMeshProUGUI SensitvityShow;
public GameObject Sens;
public Canvas mainCanvas;
public Canvas pauseCanvas;
public Canvas settingsCanvas;
public GameObject mainCanvas;
public GameObject pauseCanvas;
public GameObject settingsCanvas;
void Start()
@@ -148,9 +148,9 @@ public class PauseMenuControls : MonoBehaviour
public void ResumeGame()
{
mainCanvas.enabled = true;
pauseCanvas.enabled = false;
settingsCanvas.enabled = false;
mainCanvas.SetActive(true);
pauseCanvas.SetActive(false);
settingsCanvas.SetActive(false);
Time.timeScale = 1;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
@@ -163,12 +163,12 @@ public class PauseMenuControls : MonoBehaviour
public void OpenSettings()
{
pauseCanvas.enabled = false;
settingsCanvas.enabled = true;
pauseCanvas.SetActive(false);
settingsCanvas.SetActive(true);
}
public void CloseSettings()
{
settingsCanvas.enabled = false;
pauseCanvas.enabled = true;
settingsCanvas.SetActive(false);
pauseCanvas.SetActive(true);
}
}

View File

@@ -5,10 +5,10 @@ public class PlayerCam : MonoBehaviour
{
float sens;
public Transform orientation;
public Transform player;
float xRotation;
float yRotation;
float mouseX;
float mouseY;
public Vector2 lookInput;
public Transform wagonRot;
private Quaternion previousSourceRotation;
@@ -51,19 +51,19 @@ public class PlayerCam : MonoBehaviour
sens = Sensitivity.value;
if (canLook)
{
mouseX = Input.GetAxis("Mouse X") * sens;
mouseY = Input.GetAxis("Mouse Y") * sens;
yRotation += lookInput.x * sens * 50 * Time.deltaTime;
xRotation -= lookInput.y * sens * 50 * Time.deltaTime;
}
yRotation += mouseX;
xRotation -= mouseY;
xRotation = Mathf.Clamp(xRotation, -87f, 87f);
transform.rotation = Quaternion.Euler(xRotation, yRotation, 0);
orientation.rotation = Quaternion.Euler(0, yRotation, 0);
player.rotation = Quaternion.Euler(0, yRotation, 0);
}
}

View File

@@ -6,22 +6,29 @@ using UnityEngine.Rendering.PostProcessing;
using UnityEngine.Rendering.Universal;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
public float moveSpeed;
public float moveSpeedMultiplier;
public CharacterController controller;
private Vector2 moveInput;
private float moveAnimationInputX;
private float moveAnimationInputY;
private Vector3 velocity;
public float speed;
public float runSpeed;
public float gravity;
public float jumpHeight;
public PlayerCam playerCam;
public bool canWalk;
float walkResetTimer;
bool walkResetTimerGo;
bool running;
public LayerMask whatIsGround;
public bool grounded;
public Collider groundedCollider;
public float airMultiplier;
public bool airCollided;
public bool groundCollided;
public float maxSlopeAngle;
private RaycastHit slopeHit;
private bool exitingSlope;
public InputAction pauseGameButton;
public Transform orientation;
public Transform cameraor;
@@ -39,6 +46,7 @@ public class PlayerMovement : MonoBehaviour
public float timeSinceLastSwing;
public bool holdSwing;
public float holdSwingTimer;
public bool swingBeingHeld;
public float dashDistanceTimer, dashDistance, dashDuration;
public Collider myCollider;
@@ -56,37 +64,174 @@ public class PlayerMovement : MonoBehaviour
float energyObjTimer;
public GameObject energyFill;
Vector3 moveDirection;
public bool jumped;
Rigidbody rb;
public PhysicsMaterial walkingPhysics;
public PhysicsMaterial standingPhysics;
public PhysicsMaterial airColliding;
public GameObject particle1;
public GameObject particle2;
public VolumeProfile volumeProfile;
public RectTransform healthUI;
bool jumped;
bool jumping;
public GameObject uiController;
public PlayerInput playerInput;
InputAction jumpAction, walkAction, attackAction, pauseAction, runAction, lookAction;
private void Awake()
{
}
void Start()
{
cinemachineCam = GameObject.Find("CinemachineCamera");
rb = GetComponent<Rigidbody>();
rb.freezeRotation = true;
canWalk = true;
jumpAction = playerInput.actions["Jump"];
walkAction = playerInput.actions["Walk"];
attackAction = playerInput.actions["Attack"];
pauseAction = playerInput.actions["Pause"];
runAction = playerInput.actions["Run"];
lookAction = playerInput.actions["Look"];
}
void PlayerInputs()
{
if (pauseAction.WasPressedThisFrame() && Time.timeScale == 1)
{
uiController.GetComponent<PauseMenuControls>().mainCanvas.SetActive(false);
uiController.GetComponent<PauseMenuControls>().pauseCanvas.SetActive(true);
Time.timeScale = 0;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
else if (pauseAction.WasPressedThisFrame())
{
uiController.GetComponent<PauseMenuControls>().mainCanvas.SetActive(true);
uiController.GetComponent<PauseMenuControls>().pauseCanvas.SetActive(false);
uiController.GetComponent<PauseMenuControls>().settingsCanvas.SetActive(false);
Time.timeScale = 1;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
moveInput = walkAction.ReadValue<Vector2>();
if (runAction.WasPressedThisFrame() && moveAnimationInputY == 1 && !running)
{
running = true;
}
else if (runAction.WasPressedThisFrame() && moveAnimationInputY == 2 && running)
{
running = false;
moveAnimationInputY = 1;
}
playerCam.lookInput = lookAction.ReadValue<Vector2>();
if (attackAction.WasPressedThisFrame() && inventorySlot == 1)
{
swingBeingHeld = true;
if (GameObject.FindGameObjectsWithTag("Sword").Length < 1)
{
if (energy > 7)
SwingSword();
}
else
{
swung = true;
swungTimer = 0;
holdSwingTimer = 0;
holdSwing = true;
}
}
if (attackAction.WasReleasedThisFrame() && inventorySlot == 1)
{
swingBeingHeld = false;
energyFill.GetComponent<Image>().color = Color.darkRed;
if (dashDistanceTimer > 1)
{
dashDistance = Mathf.Floor(dashDistanceTimer * 8);
dashDuration = 15;
}
dashDistanceTimer = 0;
}
if (jumpAction.WasPressedThisFrame() && controller.isGrounded)
{
velocity.y = Mathf.Sqrt(jumpHeight * -1f * gravity);
jumped = true;
}
if (jumpAction.WasReleasedThisFrame() && !controller.isGrounded)
{
jumped = false;
}
}
void Update()
{
MyInput();
SpeedControl();
PlayerInputs();
timeSinceLastSwing += Time.deltaTime;
if (timeSinceLastSwing > .5f)
lastSwing = 0;
holdSwingTimer += Time.deltaTime;
if (holdSwing && holdSwingTimer > .15f)
holdSwing = false;
else if (holdSwing && GameObject.FindGameObjectsWithTag("Sword").Length < 1)
{
holdSwing = false;
if (energy > 7)
SwingSword();
}
if (!holdSwing)
holdSwingTimer = 0;
if (swung)
{
swungTimer += Time.deltaTime;
}
if (swungTimer > 1f)
swung = false;
if (!swung)
{
swungTimer = 0;
energy += 70 * Time.deltaTime;
}
if (energy < 0)
energy = 0;
if (energy > 100)
energy = 100;
energySlider.value = energy;
healthUI.sizeDelta = new Vector2((Mathf.Ceil(HP) - 1) + (9 * HP), healthUI.sizeDelta.y);
//MyInput();
if (swingBeingHeld)
{
swung = true;
swungTimer = 0;
timeSinceLastSwing = 0;
energy -= 20 * Time.deltaTime;
dashDistanceTimer += Time.deltaTime;
if (dashDistanceTimer > 1)
energyFill.GetComponent<Image>().color = Color.deepPink;
if (energy <= 0)
{
if (dashDistanceTimer > 1)
{
dashDistance = Mathf.Floor(dashDistanceTimer * 8);
dashDuration = 15;
}
dashDistanceTimer = 0;
}
}
if (energy == 100)
{
@@ -102,114 +247,72 @@ public class PlayerMovement : MonoBehaviour
energyObjTimer = 0;
energyObj.SetActive(true);
}
}
void FixedUpdate()
{
MovePlayer();
if (dashDuration > 0)
{
SwordDash();
dashDuration--;
}
if (dashDuration == 1)
{
//rb.linearVelocity = Vector3.zero;
dashDuration--;
}
if (controller.isGrounded && velocity.y < 0)
{
velocity.y = -0.5f;
}
//else if (controller.isGrounded && !jumpAction.WasPerformedThisFrame())
//{
// velocity.y = 0;
//}
if (jumpAction.WasPerformedThisFrame() && controller.isGrounded)
{
//Debug.Log("jumped");
//velocity.y = Mathf.Sqrt(jumpHeight * -1f * gravity);
}
velocity.y += gravity * Time.deltaTime;
//Debug.Log(controller.isGrounded);
if (canWalk /*&& !running*/)
{
Vector3 move = new Vector3(moveInput.x * speed, 0, moveInput.y * speed);
Vector3 move2 = transform.TransformDirection(move);
controller.Move(move2 * Time.deltaTime);
}
//else if (canWalk && running)
//{
// Vector3 move = new Vector3(moveInput.x * speed, 0, moveInput.y * runSpeed);
// Vector3 move2 = transform.TransformDirection(move);
// controller.Move(move2 * Time.deltaTime);
//}
controller.Move(velocity * Time.deltaTime);
}
private void MyInput()
{
if (Input.GetKeyDown(KeyCode.Alpha7))
{
HP -= 1;
}
if (Input.GetKeyDown(KeyCode.Alpha8))
{
HP -= .5f;
}
if (Input.GetKey(KeyCode.Alpha9))
{
HP -= Time.deltaTime;
}
if (Input.GetKeyDown(KeyCode.Alpha6))
{
HP = 10;
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
inventorySlot = 1;
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
inventorySlot = 2;
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
inventorySlot = 3;
}
if (inventorySlot > 3)
inventorySlot = 3;
if (inventorySlot < 1)
inventorySlot = 1;
if (Input.GetKeyDown(KeyCode.Escape))
{
if (Time.timeScale == 1)
{
uiController.GetComponent<PauseMenuControls>().mainCanvas.enabled = false;
uiController.GetComponent<PauseMenuControls>().pauseCanvas.enabled = true;
Time.timeScale = 0;
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
else
{
uiController.GetComponent<PauseMenuControls>().mainCanvas.enabled = true;
uiController.GetComponent<PauseMenuControls>().pauseCanvas.enabled = false;
uiController.GetComponent<PauseMenuControls>().settingsCanvas.enabled = false;
Time.timeScale = 1;
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
}
horizontalInput = Input.GetAxisRaw("Horizontal");
verticalInput = Input.GetAxisRaw("Vertical");
if (horizontalInput == 0 && verticalInput == 0 && grounded && !Input.GetKeyDown(KeyCode.Space))
{
rb.linearDamping = 7;
GetComponent<CapsuleCollider>().material = standingPhysics;
}
else if (horizontalInput != 0 || verticalInput != 0 || !grounded || Input.GetKeyDown(KeyCode.Space))
{
rb.linearDamping = 0;
GetComponent<CapsuleCollider>().material = walkingPhysics;
}
if (Input.GetKeyDown(KeyCode.Space) && grounded)
{
rb.linearDamping = 0;
GetComponent<CapsuleCollider>().material = walkingPhysics;
jumped = true;
jumping = true;
}
if (jumped)
{
rb.linearDamping = 0;
GetComponent<CapsuleCollider>().material = walkingPhysics;
if (jumping)
{
rb.AddForce(Vector3.up * 6, ForceMode.Impulse);
jumping = false;
}
}
if (airCollided && !grounded)
{
rb.linearDamping = 0;
GetComponent<CapsuleCollider>().material = airColliding;
//rb.AddForce(Vector3.down * 1, ForceMode.Force);
Debug.Log("ng, hs");
}
@@ -313,10 +416,6 @@ public class PlayerMovement : MonoBehaviour
}
}
}
private void LateUpdate()
{
}
private void SwingSword()
{
@@ -345,22 +444,8 @@ public class PlayerMovement : MonoBehaviour
private void MovePlayer()
{
moveDirection = orientation.forward * verticalInput + orientation.right * horizontalInput;
if (grounded)
rb.AddForce(moveDirection.normalized * moveSpeed * moveSpeedMultiplier * 3, ForceMode.Force);
else if (!grounded)
rb.AddForce(moveDirection.normalized * moveSpeed * moveSpeedMultiplier * airMultiplier, ForceMode.Force);
if (rb.linearVelocity.y < -1)
{
rb.AddForce(transform.up * -5, ForceMode.Force);
}
if (dashDuration > 0)
{
SwordDash();
@@ -369,7 +454,7 @@ public class PlayerMovement : MonoBehaviour
}
if (dashDuration == 1)
{
rb.linearVelocity = Vector3.zero;
//rb.linearVelocity = Vector3.zero;
dashDuration--;
}
@@ -377,91 +462,13 @@ public class PlayerMovement : MonoBehaviour
private void SwordDash()
{
myCollider.excludeLayers = excludeEnemy;
rb.AddForce(Camera.main.transform.forward * dashDistance, ForceMode.Impulse);
Debug.Log($"distance:{dashDistance}");
//rb.AddForce(Camera.main.transform.forward * dashDistance, ForceMode.Impulse);
controller.Move(Camera.main.transform.forward * dashDistance / 15);
swung = true;
swungTimer = 0;
timeSinceLastSwing = 0;
}
private void SpeedControl()
{
{
Vector3 flatVel = new Vector3(rb.linearVelocity.x, 0f, rb.linearVelocity.z);
if (flatVel.magnitude > moveSpeed)
{
Vector3 limitedVel = flatVel.normalized * moveSpeed;
rb.linearVelocity = new Vector3(limitedVel.x, rb.linearVelocity.y, limitedVel.z);
}
}
}
private bool OnSlope()
{
if (Physics.Raycast(transform.position, Vector3.down, out slopeHit, 2 * 0.5f + 0.3f))
{
float angle = Vector3.Angle(Vector3.up, slopeHit.normal);
return angle < maxSlopeAngle && angle != 0;
}
return false;
}
private Vector3 GetSlopeDirection()
{
return Vector3.ProjectOnPlane(moveDirection, slopeHit.normal).normalized;
}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "Enemy")
{
HP--;
}
if (!other.isTrigger/* && other.gameObject.tag == "Ground"*/)
{
grounded = true;
if (jumped)
jumped = false;
}
}
private void OnTriggerStay(Collider other)
{
if (!other.isTrigger/* && other.gameObject.tag == "Ground"*/)
{
grounded = true;
}
}
private void OnTriggerExit(Collider other)
{
if (!other.isTrigger/* && other.gameObject.tag == "Ground"*/)
{
grounded = false;
}
}
private void OnCollisionEnter(Collision collision)
{
if (!grounded)
{
}
}
private void OnCollisionStay(Collision collision)
{
if (!grounded)
{
airCollided = true;
}
}
private void OnCollisionExit(Collision collision)
{
if (!grounded)
{
airCollided = false;
}
}
}

56
Assets/Scripts/Rocket.cs Normal file
View File

@@ -0,0 +1,56 @@
using UnityEngine;
public class Rocket : MonoBehaviour
{
public PlayerMovement playerMovement;
public GameObject player;
public Vector3 TargetPosition;
public float playerDistance;
public Vector3 direction;
public Quaternion targetRotation;
public float rotationSpeed = 30;
public bool isStuck;
public float despawnTimer = 10;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
player = GameObject.Find("Player");
playerMovement = FindObjectOfType<PlayerMovement>();
TargetPosition = player.transform.position;
}
// Update is called once per frame
void Update()
{
if (playerDistance >= 25)
{
rotationSpeed = 60;
}
else{
rotationSpeed = 30;
}
direction = (player.transform.position - transform.position).normalized;
targetRotation = Quaternion.LookRotation(direction);
transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, 30 * Time.deltaTime);
playerDistance = Vector3.Distance(transform.position, player.transform.position);
transform.Translate(Vector3.forward * Time.deltaTime * (playerDistance/1.5f+8));
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Hit Player");
playerMovement.HP -= 2f;
}
else if (other.CompareTag("Boss")){
Debug.Log("Shooting");
}
else if (other.CompareTag("Ground")){
Destroy(this.gameObject);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: fc567df950c9c44c2a3ada34152072e4

View File

@@ -0,0 +1,184 @@
using UnityEngine;
public class SteampunkBoss : MonoBehaviour
{
public PlayerMovement playerMovement;
public GameObject Player;
public int randomNumber = 0;
public float stallTimer = 0;
public bool setTimer = false;
public Vector3 TargetPosition;
public bool setposition = false;
public GameObject JumpHitbox;
public GameObject LungeHitbox;
public float lungeBackup;
public GameObject Rocket;
public bool rocketShot = false;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
if (stallTimer <= 0)
{
transform.LookAt(Player.transform);
randomNumber = Random.Range(1, 6);
setTimer = false;
}
if (randomNumber == 1)
{
JumpAttack();
}
else if (randomNumber == 2)
{
RocketAttack();
}
else if (randomNumber == 3)
{
LungeAttack();
}
else if (randomNumber == 4)
{
SlashAttack();
}
else if (randomNumber == 5)
{
Block();
}
}
void JumpAttack()
{
if (!setTimer)
{
stallTimer = 1;
setTimer = true;
}
if (!setposition)
{
TargetPosition = Player.transform.position;
setposition = true;
}
transform.position = Vector3.MoveTowards(transform.position, new Vector3(TargetPosition.x, 20, TargetPosition.z), 20 * Time.deltaTime);
if ((transform.position.x == TargetPosition.x) && (transform.position.z == TargetPosition.z))
{
transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 80 * Time.deltaTime);
JumpHitbox.SetActive(true);
}
if (transform.position == TargetPosition)
{
JumpHitbox.SetActive(false);
stallTimer -= Time.deltaTime;
}
if (stallTimer <= 0)
{
setposition = false;
}
}
void RocketAttack()
{
if (!setTimer)
{
stallTimer = 3;
setTimer = true;
}
if (!setposition)
{
TargetPosition = Player.transform.position;
setposition = true;
}
if (stallTimer >= 2.6 && randomNumber == 2)
{
transform.position = Vector3.MoveTowards(transform.position, TargetPosition, -30 * Time.deltaTime);
}
else if (!rocketShot)
{
Instantiate(Rocket, transform.position, transform.rotation);
rocketShot = true;
}
stallTimer -= Time.deltaTime;
if (stallTimer <= 0)
{
setposition = false;
rocketShot = false;
}
}
void LungeAttack()
{
if (!setTimer)
{
stallTimer = 0.5f;
setTimer = true;
}
if (!setposition)
{
TargetPosition = Player.transform.position;
setposition = true;
}
if (lungeBackup > 0)
{
transform.position = Vector3.MoveTowards(transform.position, TargetPosition, -10 * Time.deltaTime);
lungeBackup -= Time.deltaTime;
}
if (lungeBackup <= 0)
{
LungeHitbox.SetActive(true);
transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 30 * Time.deltaTime);
}
if (transform.position == TargetPosition)
{
LungeHitbox.SetActive(false);
stallTimer -= Time.deltaTime;
}
if (stallTimer <= 0)
{
lungeBackup = 1;
setposition = false;
}
}
void SlashAttack()
{
if (!setTimer)
{
stallTimer = 1;
setTimer = true;
}
stallTimer -= Time.deltaTime;
}
void Block()
{
if (!setTimer)
{
stallTimer = 1;
setTimer = true;
}
stallTimer -= Time.deltaTime;
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("Hit Player");
playerMovement.HP -= 1;
}
else{
Debug.Log("Failed");
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3d8198e3ebde5469e8ad7d54300da09f

View File

@@ -53,7 +53,7 @@ public class ThrowerEnemy : MonoBehaviour
playerDistance = Vector3.Distance(transform.position, target.position);
if (playerDistance < 25 && canThrow)
{
Instantiate(GunThrow, transform);
Instantiate(GunThrow, transform.position, Quaternion.identity);
canThrow = false;
}
}

BIN
Assets/models/gun(2).fbx LFS Normal file

Binary file not shown.

View File

@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: c6075395625eb49c4bafb0ef86f449eb
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -3,9 +3,9 @@
"com.unity.2d.aseprite": "2.0.2",
"com.unity.ai.navigation": "2.0.9",
"com.unity.cinemachine": "3.1.4",
"com.unity.collab-proxy": "2.9.3",
"com.unity.collab-proxy": "2.10.2",
"com.unity.ide.rider": "3.0.38",
"com.unity.ide.visualstudio": "2.0.23",
"com.unity.ide.visualstudio": "2.0.25",
"com.unity.inputsystem": "1.14.2",
"com.unity.multiplayer.center": "1.0.0",
"com.unity.postprocessing": "3.5.1",

View File

@@ -51,7 +51,7 @@
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.24",
"version": "1.8.25",
"depth": 2,
"source": "registry",
"dependencies": {
@@ -71,18 +71,18 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "2.9.3",
"version": "2.10.2",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.collections": {
"version": "2.5.7",
"version": "2.6.2",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.19",
"com.unity.burst": "1.8.23",
"com.unity.mathematics": "1.3.2",
"com.unity.test-framework": "1.4.6",
"com.unity.nuget.mono-cecil": "1.11.5",
@@ -106,11 +106,11 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.23",
"version": "2.0.25",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.9"
"com.unity.test-framework": "1.1.31"
},
"url": "https://packages.unity.com"
},
@@ -233,7 +233,7 @@
}
},
"com.unity.splines": {
"version": "2.8.1",
"version": "2.8.2",
"depth": 1,
"source": "registry",
"dependencies": {
@@ -244,7 +244,7 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.5.1",
"version": "1.6.0",
"depth": 0,
"source": "builtin",
"dependencies": {
@@ -254,7 +254,7 @@
}
},
"com.unity.test-framework.performance": {
"version": "3.1.0",
"version": "3.2.0",
"depth": 3,
"source": "registry",
"dependencies": {

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 6000.2.1f1
m_EditorVersionWithRevision: 6000.2.1f1 (55300504c302)
m_EditorVersion: 6000.2.13f1
m_EditorVersionWithRevision: 6000.2.13f1 (abdb44fca7f7)

View File

@@ -9,6 +9,7 @@ TagManager:
- Sword
- WagonPoint
- Ground
- Boss
layers:
- Default
- TransparentFX