optimized level, updated shooting system, and fixed enemy death still causing damage bug

This commit is contained in:
sebastianhampel1 2023-05-17 00:15:44 -04:00
parent d0ea8b29ac
commit b934212301
19 changed files with 833 additions and 369 deletions

View File

@ -230,7 +230,7 @@ Material:
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskDistortionVec: 4
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 42
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0

View File

@ -206,7 +206,7 @@ Material:
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 42
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0

View File

@ -206,7 +206,7 @@ Material:
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 42
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0

Binary file not shown.

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 7e67504853c3c0e41b214f758adeb353
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,3 +7,5 @@
'Hymn To The Dawn' by Scott Buckley - released under CC-BY 4.0. www.scottbuckley.com.au
'Last And First Light' by Scott Buckley - released under CC-BY 4.0. www.scottbuckley.com.au
'Legacy' by Scott Buckley - released under CC-BY 4.0. www.scottbuckley.com.au

View File

@ -369,6 +369,8 @@ MonoBehaviour:
visibilityConeLimit: 90
bulletSoundRange: 15
newTargetCooldown: 5
leftHandDamage: {fileID: 1232320004410123114}
rightHandDamage: {fileID: 3319409050380481093}
--- !u!114 &7982337625154020196
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -76,7 +76,7 @@ Light:
m_Type: 0
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 2802.5015
m_Intensity: 280.25015
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
@ -117,7 +117,7 @@ Light:
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 2
m_AreaSize: {x: 1, y: 1}
m_AreaSize: {x: 0.5, y: 0.5}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 1
@ -138,7 +138,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Intensity: 600
m_Intensity: 60
m_EnableSpotReflector: 1
m_LuxAtDistance: 1
m_InnerSpotPercent: 0
@ -297,13 +297,13 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
targetingLight: {fileID: 935129114346117162}
shotLight: {fileID: 0}
targetObjectPrefab: {fileID: 7083481049935262560, guid: 25e7708870a1a78479d6e4df73bec788, type: 3}
projectilePrefab: {fileID: 4575714109450776061, guid: 5e611af8f39b09a4f9b479a29f3460ff, type: 3}
projectileName:
bulletSpawnPoint: {fileID: 811384076594615178}
firePower: 20
maxProjectileDuration: 5
maxTargetObjDistance: 15
--- !u!1 &6499420578328911065
GameObject:
m_ObjectHideFlags: 0

View File

@ -146,8 +146,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638385}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.3643384, y: -0.8891177, z: 32.718422}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.3643384, y: -5.8891177, z: 27.718422}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -178,8 +178,9 @@ Transform:
- {fileID: 1874677988}
- {fileID: 1169293517}
- {fileID: 1643870805}
m_Father: {fileID: 0}
m_RootOrder: 10
- {fileID: 23700188}
m_Father: {fileID: 256671074}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1977094
GameObject:
@ -321,7 +322,7 @@ Transform:
- {fileID: 1100948383}
- {fileID: 1278390917}
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11595169
MonoBehaviour:
@ -354,6 +355,7 @@ MonoBehaviour:
player: {fileID: 147350239}
marker2Ref: {fileID: 1700878295}
marker3Ref: {fileID: 171399773}
finalRoomOptimizer: {fileID: 1917806138}
--- !u!1 &16698893
GameObject:
m_ObjectHideFlags: 0
@ -482,6 +484,11 @@ Transform:
m_Father: {fileID: 1278390917}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &23700188 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
m_PrefabInstance: {fileID: 2025035378}
m_PrefabAsset: {fileID: 0}
--- !u!1 &37724319
GameObject:
m_ObjectHideFlags: 0
@ -577,7 +584,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 13
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &43363048
PrefabInstance:
@ -586,10 +593,38 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1638386}
m_Modifications:
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.24887742
objectReference: {fileID: 0}
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: 0.06829542
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.41684458
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.47264454
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.y
value: 0.55560476
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: -0.5423571
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_Name
value: NoSkinMonster (4)
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_RootOrder
value: 22
@ -655,10 +690,38 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1638386}
m_Modifications:
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.24887742
objectReference: {fileID: 0}
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: 0.06829542
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.41684458
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.47264454
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.y
value: 0.55560476
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: -0.5423571
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_Name
value: NoSkinMonster (2)
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_RootOrder
value: 20
@ -852,6 +915,11 @@ VisualEffect:
m_Array: []
m_Bool:
m_Array: []
--- !u!4 &58612109 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
m_PrefabInstance: {fileID: 381941378}
m_PrefabAsset: {fileID: 0}
--- !u!1 &59523494
GameObject:
m_ObjectHideFlags: 0
@ -1340,7 +1408,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 10
value: 9
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -1833,6 +1901,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1090859167306147240, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3534857878053983686, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: cam
value:
@ -1901,6 +1973,14 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7149484125733118452, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.x
value: 0.24887744
objectReference: {fileID: 0}
- target: {fileID: 7149484125733118452, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalRotation.z
value: 0.06829543
objectReference: {fileID: 0}
- target: {fileID: 7274624881599411862, guid: 3cbb87b9c7b0a01458108d45dc4eee05, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@ -2718,6 +2798,71 @@ Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 01bc76eb6b45cbf43a1a80378fd6d15c, type: 3}
m_PrefabInstance: {fileID: 253229664}
m_PrefabAsset: {fileID: 0}
--- !u!1 &256671072
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 256671074}
- component: {fileID: 256671073}
- component: {fileID: 256671075}
m_Layer: 0
m_Name: ROOM 2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &256671073
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 256671072}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ce10ec9aaa603bb4da9dfadd6e590584, type: 3}
m_Name:
m_EditorClassIdentifier:
Tag: Player
references:
- {fileID: 1623470074}
- {fileID: 1638385}
beginDisabled: 1
--- !u!4 &256671074
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 256671072}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 5, z: 5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1623470075}
- {fileID: 1638386}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &256671075
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 256671072}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 78.17, y: 26.41, z: 65.79385}
m_Center: {x: 2.48, y: -2.8599997, z: 49.23693}
--- !u!1 &261243213
GameObject:
m_ObjectHideFlags: 0
@ -3248,7 +3393,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -3326,7 +3471,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_RootOrder
value: 4
value: 3
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_LocalPosition.x
@ -4697,7 +4842,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 6
value: 5
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -4780,7 +4925,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 2031252498}
m_Modifications:
- target: {fileID: 5400642609667826684, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_Name
@ -4788,19 +4933,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_RootOrder
value: 6
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.x
value: 2.35
value: 1.6781659
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.y
value: 2.5
value: -1.2395263
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.z
value: 30
value: 23.796442
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.w
@ -4808,7 +4953,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.y
@ -4816,7 +4961,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -5143,7 +5288,7 @@ RectTransform:
m_Children:
- {fileID: 691628164}
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -5192,31 +5337,35 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 985869394}
m_Modifications:
- target: {fileID: 1596045744995146289, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_Range
value: 2.17
objectReference: {fileID: 0}
- target: {fileID: 1596045745734848047, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814576, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_Name
value: PowerCore
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_RootOrder
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_LocalPosition.x
value: -10.441316
value: -14.80114
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_LocalPosition.y
value: 0.88931704
value: -10.259533
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_LocalPosition.z
value: 57.07
value: 49.561047
objectReference: {fileID: 0}
- target: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
propertyPath: m_LocalRotation.w
@ -7347,7 +7496,7 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 2031252498}
m_Modifications:
- target: {fileID: 3546293735733085500, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_Materials.Array.data[0]
@ -7363,19 +7512,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_RootOrder
value: 3
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.x
value: 2.35
value: 1.6781659
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.y
value: 2.5
value: -1.2395263
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalPosition.z
value: 20.071
value: 13.867441
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.w
@ -7383,7 +7532,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.y
@ -7391,7 +7540,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -9001,7 +9150,7 @@ Transform:
- {fileID: 74578541}
- {fileID: 1885769917}
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &738910339
BoxCollider:
@ -10811,6 +10960,38 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 968252812}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &985869393
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 985869394}
m_Layer: 0
m_Name: ITEMS
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &985869394
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 985869393}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 4.359824, y: 11.1488495, z: 7.5089536}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1557588529}
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &993757347
PrefabInstance:
m_ObjectHideFlags: 0
@ -11773,10 +11954,38 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1638386}
m_Modifications:
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.24887742
objectReference: {fileID: 0}
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: 0.06829542
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.41684458
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.47264454
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.y
value: 0.55560476
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: -0.5423571
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_Name
value: NoSkinMonster (1)
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_RootOrder
value: 19
@ -12264,10 +12473,38 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 1638386}
m_Modifications:
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.24887742
objectReference: {fileID: 0}
- target: {fileID: 206433908979754812, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: 0.06829542
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.w
value: 0.41684458
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0.47264454
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.y
value: 0.55560476
objectReference: {fileID: 0}
- target: {fileID: 4390879368217213806, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: -0.5423571
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_Name
value: NoSkinMonster (3)
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_RootOrder
value: 21
@ -12359,7 +12596,7 @@ PrefabInstance:
objectReference: {fileID: 1534297235}
- target: {fileID: 5300587138682068428, guid: c20ce53979ccfc34582e98753869a95b, type: 3}
propertyPath: m_RootOrder
value: 3
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5300587138682068428, guid: c20ce53979ccfc34582e98753869a95b, type: 3}
propertyPath: m_LocalPosition.x
@ -12926,7 +13163,7 @@ GameObject:
m_Component:
- component: {fileID: 1176989037}
m_Layer: 0
m_Name: GameObject
m_Name: Walls1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -12976,7 +13213,7 @@ Transform:
- {fileID: 920749663}
- {fileID: 1025302460}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1202365761 stripped
GameObject:
@ -13117,8 +13354,8 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1223915530}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 7.23, y: -0.8020146, z: 160.88}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 4.37476, y: -4.9820223, z: 71.84233}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -13141,8 +13378,8 @@ Transform:
- {fileID: 261243214}
- {fileID: 419372096}
- {fileID: 1970635709}
m_Father: {fileID: 0}
m_RootOrder: 12
m_Father: {fileID: 1917806139}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1264203501
GameObject:
@ -15343,7 +15580,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 7
value: 6
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -15638,6 +15875,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 051ddd707f17e1040b0fbe15645f75b6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1557588529 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1596045745830814577, guid: 148456ca1eee0994eb0165cb943e8322, type: 3}
m_PrefabInstance: {fileID: 417640830}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1560185317 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5400642609667826687, guid: 4654bd3a972fb5c42b0ac2632e3d8a0b, type: 3}
m_PrefabInstance: {fileID: 594036331}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1567088922
GameObject:
m_ObjectHideFlags: 0
@ -16545,7 +16792,7 @@ GameObject:
m_Component:
- component: {fileID: 1623470075}
m_Layer: 0
m_Name: GameObject
m_Name: Room2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -16559,7 +16806,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1623470074}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 5, z: 5}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@ -16574,8 +16821,8 @@ Transform:
- {fileID: 968252813}
- {fileID: 1031873475}
- {fileID: 16698894}
m_Father: {fileID: 0}
m_RootOrder: 4
m_Father: {fileID: 256671074}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1625414265
GameObject:
@ -17836,7 +18083,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -18810,7 +19057,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 11
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x
@ -19081,6 +19328,55 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1911544570}
m_Mesh: {fileID: 5596582865043618300, guid: 40b2c4487f432554088e60654fb78f2c, type: 3}
--- !u!1 &1917806136
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1917806139}
- component: {fileID: 1917806138}
m_Layer: 0
m_Name: FINAL_AREA
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1917806138
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1917806136}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ce10ec9aaa603bb4da9dfadd6e590584, type: 3}
m_Name:
m_EditorClassIdentifier:
Tag:
references:
- {fileID: 1223915530}
beginDisabled: 1
--- !u!4 &1917806139
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1917806136}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.8552399, y: 4.180008, z: 89.037674}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1223915531}
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1923129145 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1230275799037757121, guid: 83426769848397944ae1b9e0ce95ae38, type: 3}
@ -20146,15 +20442,19 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_TransformParent: {fileID: 1638386}
m_Modifications:
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_Name
value: NoSkinMonster
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020192, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_RootOrder
value: 2
value: 27
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalScale.x
@ -20170,15 +20470,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalPosition.x
value: 2.6381402
value: 6.0024786
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
value: 1.3891177
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalPosition.z
value: 51.6
value: 18.881577
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.w
@ -20186,15 +20486,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.y
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalRotation.z
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -20210,6 +20510,39 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: db61f30670495034d8ce2e8c7448cec9, type: 3}
--- !u!1 &2031252497
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2031252498}
m_Layer: 0
m_Name: DOORS
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2031252498
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2031252497}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.67183405, y: 3.7395263, z: 6.203558}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1560185317}
- {fileID: 58612109}
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2062134717
PrefabInstance:
m_ObjectHideFlags: 0
@ -20378,7 +20711,7 @@ RectTransform:
m_Children:
- {fileID: 1027543682}
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -21238,7 +21571,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_RootOrder
value: 5
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8086752637240226563, guid: d434b10738197414b8cd18b6a1c3895a, type: 3}
propertyPath: m_LocalPosition.x

View File

@ -3669,6 +3669,7 @@ MonoBehaviour:
useItemSelector: 1
pistol: {fileID: 1726408794}
noiseManager: {fileID: 0}
shift: {fileID: 0}
isDead: 0
--- !u!65 &363087717
BoxCollider:
@ -11505,7 +11506,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1405090715}
m_LocalRotation: {x: 0.14944519, y: 0.024273582, z: 0.09686273, w: 0.98371464}
m_LocalRotation: {x: 0.1494452, y: 0.024273582, z: 0.09686274, w: 0.98371464}
m_LocalPosition: {x: -0.04452334, y: 0.085807286, z: -0.001882615}
m_LocalScale: {x: 1, y: 0.9999998, z: 0.99999994}
m_ConstrainProportionsScale: 0
@ -14952,6 +14953,8 @@ MonoBehaviour:
runningSpeedParameter: RunningSpeed
sideStepSpeedParameter: SideSpeed
interactionHandler: {fileID: 0}
movement: {fileID: 0}
hiddenCam: {fileID: 0}
--- !u!1 &1842888745
GameObject:
m_ObjectHideFlags: 0
@ -15384,7 +15387,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1886834470}
m_LocalRotation: {x: 0.1973449, y: -0.07763812, z: -0.021636726, w: 0.97701544}
m_LocalRotation: {x: 0.19734491, y: -0.07763812, z: -0.021636728, w: 0.97701544}
m_LocalPosition: {x: 0.0000000020861626, y: 0.029095517, z: 0.000000056773423}
m_LocalScale: {x: 1, y: 1.0000001, z: 1}
m_ConstrainProportionsScale: 0

View File

@ -46,6 +46,11 @@ public class SkinlessMonsterComponent : MonoBehaviour
private InGameManager manager;
private bool prePauseStoppedState = false;
[SerializeField]
private BoxCollider leftHandDamage;
[SerializeField]
private BoxCollider rightHandDamage;
private void Awake()
{
//Find active player rn.
@ -310,7 +315,11 @@ public class SkinlessMonsterComponent : MonoBehaviour
if(isAlive&&player.IsAlive)
SetLiveTargeting();
timeSinceTarget += Time.deltaTime;
if (this.isAlive)
{
leftHandDamage.enabled = false;
rightHandDamage.enabled = false;
}
/*

View File

@ -28,6 +28,7 @@ public class InGameMenuManager : MonoBehaviour
}
void SettingsUnClicked()
{
menuAnimator.SetBool("SettingsOpen", false);
}
public void UpdateSensitivity()

View File

@ -0,0 +1,54 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Attach this behavior to a master room collider. Enables everything in this room OnTriggerEnter of [tag]
/// disables everything in this room OnTriggerExit of [tag]
/// </summary>
public class Optimizer : MonoBehaviour
{
[SerializeField]
public string Tag;
[SerializeField]
private GameObject[] references;
[SerializeField]
private bool beginDisabled = true;
private void Start()
{
if (beginDisabled)
{
Disable();
}
}
public void Enable()
{
foreach (GameObject go in references)
{
go.SetActive(true);
}
}
public void Disable()
{
foreach (GameObject go in references)
{
go.SetActive(false);
}
}
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag(Tag))
{
Enable();
}
}
private void OnTriggerExit(Collider other)
{
if (other.CompareTag(Tag))
{
Disable();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ce10ec9aaa603bb4da9dfadd6e590584
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -25,9 +25,11 @@ public class PistolComponent : MonoBehaviour
private float firePower = 20f;
[SerializeField]
private float maxProjectileDuration = 5f;
[SerializeField]
private float maxTargetObjDistance = 15f;
private bool hasCloseTarget = false;
//private Dictionary<int,float> projectiles = new Dictionary<int, float>();
@ -59,17 +61,42 @@ public class PistolComponent : MonoBehaviour
}
private void FixedUpdate()
{
if (this.IsEnabled)
{
Ray ray = new Ray(transform.position, transform.up);
RaycastHit hit;
if (Physics.Raycast(ray, out hit, 50))
{
targetObject.gameObject.transform.position = hit.point;
float drop = CalculateDrop(this.bulletSpawnPoint.position, hit.point, this.transform.up * this.firePower);
float hitDist = Vector3.Distance(hit.point, transform.position);
if (hitDist < maxTargetObjDistance)
{
targetObject.gameObject.transform.position = hit.point;
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255, 0,0));
//Track if we have a close target
hasCloseTarget = true;
}
else
{
targetObject.gameObject.transform.position = transform.position + (ray.direction * maxTargetObjDistance);
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255, 255,255));
//Track if we have a close target
hasCloseTarget = false;
}
//float drop = CalculateDrop(this.bulletSpawnPoint.position, hit.point, this.transform.up * this.firePower);
//print(drop);
}
else
{
targetObject.gameObject.transform.position = transform.position + (ray.direction * maxTargetObjDistance);
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255,255,255));
hasCloseTarget = false;
}
}
@ -77,6 +104,10 @@ public class PistolComponent : MonoBehaviour
}
public void Fire()
{
Fire(!hasCloseTarget);
}
public void Fire(bool offsetWithTargetBall)
{
GameObject projectile = Instantiate(projectilePrefab, this.bulletSpawnPoint);
@ -84,7 +115,29 @@ public class PistolComponent : MonoBehaviour
projectile.transform.localEulerAngles = Vector3.zero;
projectile.transform.localScale = Vector3.one;
Rigidbody pRigid = projectile.GetComponent<Rigidbody>();
pRigid.AddForce(pRigid.transform.up*this.firePower, ForceMode.Impulse);
/*Modified targeting system
1. Since aim direction is vector from camera to ball (where player thinks its gonna go), raycast forward there, till hit. If no hit,
then set target distance to ~50.
2. Modify launch vector apply modified force
*/
Vector3 launchVector = pRigid.transform.up * this.firePower;
if(offsetWithTargetBall)
{
Vector3 ballCamVector = targetObject.transform.position - this.GetComponentInParent<PlayerMovementController>().cam.transform.position;
Ray r = new Ray();
r.origin = targetObject.transform.position;
r.direction = ballCamVector.normalized;
RaycastHit hit;
if (Physics.Raycast(r,out hit))
{
launchVector = (hit.point - pRigid.transform.position).normalized;
launchVector *= this.firePower;
}
}
pRigid.AddForce(launchVector, ForceMode.Impulse);
projectile.transform.parent = null;

View File

@ -39,6 +39,8 @@ public class LevelZeroSpecial : MonoBehaviour
WaypointMarker marker2Ref;
[SerializeField]
WaypointMarker marker3Ref;
[SerializeField]
private Optimizer finalRoomOptimizer;
// Start is called before the first frame update
void Start()
{
@ -102,6 +104,7 @@ public class LevelZeroSpecial : MonoBehaviour
transitioningOut = true;
gate.Play("Open");
finalRoomOptimizer.Enable();
}
if (transitioningOut)

View File

@ -12,6 +12,8 @@ public class CameraController : MonoBehaviour
private float mouseY;
[SerializeField]
private Camera cam;
[SerializeField]
private Transform target;

View File

@ -30,7 +30,7 @@ public class PlayerMovementController : MonoBehaviour
[SerializeField]
private float animatedRotationSpeed = 5f;
[SerializeField]
private Camera cam;
public Camera cam;
[HideInInspector]
public bool AllowRotation = false;