ai vision cone, dash, hp
This commit is contained in:
parent
60ee586e79
commit
fadd6fe57a
1
.gitignore
vendored
1
.gitignore
vendored
@ -156,3 +156,4 @@ twinStickCrawler/.idea
|
||||
twinStickCrawler/Library
|
||||
twinStickCrawler/Logs
|
||||
twinStickCrawler/obj/Debug
|
||||
twinStickCrawler/UserSettings
|
||||
|
141
twinStickCrawler/Assets/Material/TrailMaterial.mat
Normal file
141
twinStickCrawler/Assets/Material/TrailMaterial.mat
Normal file
@ -0,0 +1,141 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TrailMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BlendOp: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _SampleGI: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 5
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2992394770069168786
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
8
twinStickCrawler/Assets/Material/TrailMaterial.mat.meta
Normal file
8
twinStickCrawler/Assets/Material/TrailMaterial.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 822a4336928dd8b48af2239ea2ad4fd3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -793,7 +793,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_NotificationBehavior: 0
|
||||
m_NotificationBehavior: 2
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
@ -877,6 +877,10 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
m_ActionId: 9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be
|
||||
m_ActionName: UI/TrackedDeviceOrientation
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 28570431-8fa6-44a3-a7e9-cc26afce76f4
|
||||
m_ActionName: 'Player/Zoom[/Mouse/scroll]'
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Player
|
||||
@ -922,6 +926,7 @@ GameObject:
|
||||
- component: {fileID: 820174474}
|
||||
- component: {fileID: 820174472}
|
||||
- component: {fileID: 820174473}
|
||||
- component: {fileID: 820174475}
|
||||
m_Layer: 6
|
||||
m_Name: Enemy
|
||||
m_TagString: Untagged
|
||||
@ -938,11 +943,13 @@ Transform:
|
||||
m_GameObject: {fileID: 820174469}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -2.58, z: -25.26}
|
||||
m_LocalPosition: {x: 0, y: 0.28, z: -25.26}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1884508223}
|
||||
- {fileID: 1847948565}
|
||||
- {fileID: 1185133881}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!195 &820174472
|
||||
@ -964,7 +971,7 @@ NavMeshAgent:
|
||||
m_AutoBraking: 1
|
||||
m_AutoRepath: 1
|
||||
m_Height: 2
|
||||
m_BaseOffset: -1
|
||||
m_BaseOffset: 1
|
||||
m_WalkableMask: 4294967295
|
||||
m_ObstacleAvoidanceType: 4
|
||||
--- !u!114 &820174473
|
||||
@ -980,6 +987,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
player: {fileID: 1931938463}
|
||||
playerDetectionRadius: 20
|
||||
--- !u!136 &820174474
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1002,7 +1010,20 @@ CapsuleCollider:
|
||||
m_Radius: 0.25
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 2, z: 0}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &820174475
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 820174469}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d05ad440f2c88de4a91ec5e324740d7d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
initHealth: 100
|
||||
--- !u!1 &832575517
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1160,6 +1181,61 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1185133880
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1185133881}
|
||||
- component: {fileID: 1185133882}
|
||||
m_Layer: 6
|
||||
m_Name: AimTarget
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1185133881
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1185133880}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -2, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 820174471}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!136 &1185133882
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1185133880}
|
||||
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: 2
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 2, z: 0}
|
||||
--- !u!1 &1622936043
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1512,7 +1588,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1847948564}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 2, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 1, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@ -1571,6 +1647,114 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1847948564}
|
||||
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1884508222
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1884508223}
|
||||
- component: {fileID: 1884508226}
|
||||
- component: {fileID: 1884508225}
|
||||
- component: {fileID: 1884508224}
|
||||
m_Layer: 3
|
||||
m_Name: Cube (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1884508223
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884508222}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.795, z: 0.239}
|
||||
m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 820174471}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &1884508224
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884508222}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
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!23 &1884508225
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884508222}
|
||||
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_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 5bdc8dc13b1cc4861ad3d4af384ac319, 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_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &1884508226
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1884508222}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1931938463
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1582,6 +1766,9 @@ GameObject:
|
||||
- component: {fileID: 1931938465}
|
||||
- component: {fileID: 1931938464}
|
||||
- component: {fileID: 1931938466}
|
||||
- component: {fileID: 1931938467}
|
||||
- component: {fileID: 1931938468}
|
||||
- component: {fileID: 1931938469}
|
||||
m_Layer: 3
|
||||
m_Name: Player
|
||||
m_TagString: Untagged
|
||||
@ -1628,6 +1815,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 557447412}
|
||||
- {fileID: 2089199645}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1931938466
|
||||
@ -1642,9 +1830,275 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 726bb6542b066483c9e1c5ab04620ffe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 5
|
||||
_inputManager: {fileID: 745541351}
|
||||
_camera: {fileID: 330585543}
|
||||
_cameraGameObject: {fileID: 330585543}
|
||||
moveSpeed: 6
|
||||
minAimDistance: 5
|
||||
maxAimDistance: 15
|
||||
dashSpeed: 35.9
|
||||
dashTime: 0.2
|
||||
dashCooldownTime: 1
|
||||
dashTrail: {fileID: 1931938469}
|
||||
--- !u!136 &1931938467
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931938463}
|
||||
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.25
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1931938468
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931938463}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d05ad440f2c88de4a91ec5e324740d7d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
initHealth: 100
|
||||
--- !u!96 &1931938469
|
||||
TrailRenderer:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931938463}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 0
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 0
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 822a4336928dd8b48af2239ea2ad4fd3, 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_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Time: 0.15
|
||||
m_PreviewTimeScale: 1
|
||||
m_Parameters:
|
||||
serializedVersion: 3
|
||||
widthMultiplier: 1
|
||||
widthCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0.4218009
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
colorGradient:
|
||||
serializedVersion: 2
|
||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
||||
key1: {r: 1, g: 1, b: 1, a: 0}
|
||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||
ctime0: 0
|
||||
ctime1: 65535
|
||||
ctime2: 0
|
||||
ctime3: 0
|
||||
ctime4: 0
|
||||
ctime5: 0
|
||||
ctime6: 0
|
||||
ctime7: 0
|
||||
atime0: 0
|
||||
atime1: 65535
|
||||
atime2: 0
|
||||
atime3: 0
|
||||
atime4: 0
|
||||
atime5: 0
|
||||
atime6: 0
|
||||
atime7: 0
|
||||
m_Mode: 0
|
||||
m_ColorSpace: 0
|
||||
m_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
numCornerVertices: 0
|
||||
numCapVertices: 0
|
||||
alignment: 0
|
||||
textureMode: 0
|
||||
textureScale: {x: 1, y: 1}
|
||||
shadowBias: 0.5
|
||||
generateLightingData: 0
|
||||
m_MinVertexDistance: 0.1
|
||||
m_MaskInteraction: 0
|
||||
m_Autodestruct: 0
|
||||
m_Emitting: 0
|
||||
m_ApplyActiveColorSpace: 1
|
||||
--- !u!1 &2089199644
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2089199645}
|
||||
- component: {fileID: 2089199648}
|
||||
- component: {fileID: 2089199647}
|
||||
- component: {fileID: 2089199646}
|
||||
m_Layer: 3
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2089199645
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089199644}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.794, z: 0.314}
|
||||
m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1931938465}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2089199646
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089199644}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
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!23 &2089199647
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089199644}
|
||||
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_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_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &2089199648
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089199644}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
|
8
twinStickCrawler/Assets/Scripts/Creatures.meta
Normal file
8
twinStickCrawler/Assets/Scripts/Creatures.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f7eacbe36aa8a3418da283f8381e8ed
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
twinStickCrawler/Assets/Scripts/Creatures/Enemy.meta
Normal file
8
twinStickCrawler/Assets/Scripts/Creatures/Enemy.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c1b0f7967bd84431ba19240b39e2f1b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
36
twinStickCrawler/Assets/Scripts/Creatures/Enemy/EnemyMove.cs
Normal file
36
twinStickCrawler/Assets/Scripts/Creatures/Enemy/EnemyMove.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class EnemyMove : MonoBehaviour
|
||||
{
|
||||
public GameObject player;
|
||||
[SerializeField]
|
||||
private float playerDetectionRadius;
|
||||
|
||||
private NavMeshAgent _meshAgent;
|
||||
|
||||
private bool _playerFound = false;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
_meshAgent = GetComponent<NavMeshAgent>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Vector3 playerPos = player.transform.position;
|
||||
Debug.DrawRay(transform.position, (playerPos - transform.position).normalized * playerDetectionRadius, Color.red);
|
||||
|
||||
if (!_playerFound && Physics.Raycast(transform.position, (playerPos - transform.position).normalized, out RaycastHit hit, playerDetectionRadius))
|
||||
{
|
||||
_playerFound = hit.collider.name == player.name;
|
||||
}
|
||||
|
||||
if (_playerFound)
|
||||
{
|
||||
_meshAgent.SetDestination(playerPos);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4f29a7caf57449789b9106e40d9bb19
|
8
twinStickCrawler/Assets/Scripts/Creatures/Player.meta
Normal file
8
twinStickCrawler/Assets/Scripts/Creatures/Player.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f06a034470c5546838be0794f5bb513a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraMove : MonoBehaviour
|
||||
{
|
||||
public Vector3 camOffset;
|
||||
|
||||
[SerializeField] private GameObject player;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void LateUpdate()
|
||||
{
|
||||
camOffset.z = camOffset.x;
|
||||
Vector3 desiredCamPos = player.transform.position;
|
||||
desiredCamPos.x += camOffset.x;
|
||||
desiredCamPos.y += camOffset.y;
|
||||
desiredCamPos.z += camOffset.z;
|
||||
|
||||
transform.position = desiredCamPos;
|
||||
transform.LookAt(player.transform);
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05236f4b383a944c19e8c2cdfb026e66
|
173
twinStickCrawler/Assets/Scripts/Creatures/Player/PlayerMove.cs
Normal file
173
twinStickCrawler/Assets/Scripts/Creatures/Player/PlayerMove.cs
Normal file
@ -0,0 +1,173 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class PlayerMove : MonoBehaviour
|
||||
{
|
||||
[Header("Setup")]
|
||||
[SerializeField]
|
||||
private InputManager _inputManager;
|
||||
[SerializeField]
|
||||
private GameObject _cameraGameObject;
|
||||
|
||||
[Header("Player Options")]
|
||||
[Range(0f, 10f)]
|
||||
public float moveSpeed = 5f;
|
||||
|
||||
[Header("Enemy Snapping")]
|
||||
[SerializeField]
|
||||
private float minAimDistance;
|
||||
[SerializeField]
|
||||
private float maxAimDistance;
|
||||
|
||||
[Header("Dash")]
|
||||
[Range(0f, 100f)]
|
||||
public float dashSpeed = 7f;
|
||||
[Range(0f, 1f)]
|
||||
public float dashTime = 0.2f;
|
||||
[Range(0f, 4f)]
|
||||
public float dashCooldownTime = 1f;
|
||||
[SerializeField]
|
||||
public TrailRenderer dashTrail;
|
||||
|
||||
|
||||
private Camera _camera;
|
||||
private CharacterController _controller;
|
||||
private bool _dashing = false;
|
||||
private bool _dashPossible = true;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
_camera = _cameraGameObject.GetComponent<Camera>();
|
||||
_controller = GetComponent<CharacterController>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Vector3 input = new Vector3(_inputManager.moveInput.x, 0f , _inputManager.moveInput.y);
|
||||
|
||||
Vector3 lookTarget = LookTarget();
|
||||
Vector3 moveDir = Vector3.zero;
|
||||
moveDir += MoveDir(input);
|
||||
moveDir += Gravity();
|
||||
Dash();
|
||||
|
||||
ApplyMovement(moveDir, lookTarget);
|
||||
}
|
||||
|
||||
#region basicMovement
|
||||
|
||||
void ApplyMovement(Vector3 moveDir, Vector3 lookTarget)
|
||||
{
|
||||
if (!_dashing)
|
||||
{
|
||||
transform.LookAt(lookTarget);
|
||||
_controller.Move(moveSpeed * moveDir * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 MoveDir(Vector3 input)
|
||||
{
|
||||
if (_dashing)
|
||||
{
|
||||
return Vector3.zero;
|
||||
}
|
||||
|
||||
Quaternion camRotation = Quaternion.Euler(0f, _cameraGameObject.transform.rotation.eulerAngles.y, 0f);
|
||||
input = camRotation * input;
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
Vector3 Gravity()
|
||||
{
|
||||
return Physics.gravity;
|
||||
}
|
||||
|
||||
Vector3 _lastLookTarget;
|
||||
Vector3 LookTarget()
|
||||
{
|
||||
if (_dashing)
|
||||
{
|
||||
return _lastLookTarget;
|
||||
}
|
||||
|
||||
Ray ray = _camera.ScreenPointToRay(Input.mousePosition); // Cast a ray from the mouse position
|
||||
Plane plane = new Plane(Vector3.up, transform.position); // Assume a horizontal plane (y-axis)
|
||||
|
||||
float distance;
|
||||
if (!plane.Raycast(ray, out distance)) // If the ray hits the plane
|
||||
{
|
||||
return _lastLookTarget;
|
||||
}
|
||||
|
||||
Vector3 targetPoint = ray.GetPoint(distance);
|
||||
|
||||
RaycastHit hit;
|
||||
if (Physics.Raycast(transform.position, (targetPoint - transform.position).normalized, out hit, 50f) && hit.collider.name == "AimTarget")
|
||||
{
|
||||
Vector3 aimTargetPosition = hit.collider.transform.position;
|
||||
float distanceToTarget = Vector3.Distance(transform.position, aimTargetPosition);
|
||||
|
||||
float assistStrength = distanceToTarget <= minAimDistance
|
||||
? 1f // Full strength if within minAimDistance
|
||||
: Mathf.Clamp01(1 - (distanceToTarget - minAimDistance) / (maxAimDistance - minAimDistance));
|
||||
|
||||
targetPoint = Vector3.Lerp(targetPoint, aimTargetPosition, assistStrength);
|
||||
|
||||
//targetPoint = hit.collider.transform.position;
|
||||
}
|
||||
_lastLookTarget = new Vector3(targetPoint.x, transform.position.y, targetPoint.z);
|
||||
|
||||
return _lastLookTarget;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dash
|
||||
|
||||
void Dash()
|
||||
{
|
||||
if (_inputManager.sprintPerformed && !_dashing && _dashPossible)
|
||||
{
|
||||
StartCoroutine(DashCoroutine());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator DashCoroutine()
|
||||
{
|
||||
_dashing = true;
|
||||
_dashPossible = false;
|
||||
dashTrail.emitting = true;
|
||||
|
||||
float startTime = Time.time;
|
||||
while(Time.time < startTime + dashTime)
|
||||
{
|
||||
_controller.Move(transform.forward * dashSpeed * Time.deltaTime);
|
||||
yield return null;
|
||||
}
|
||||
_dashing = false;
|
||||
dashTrail.emitting = false;
|
||||
|
||||
StartCoroutine(DashCooldown());
|
||||
}
|
||||
|
||||
private IEnumerator DashCooldown()
|
||||
{
|
||||
float startTime = Time.time;
|
||||
while(Time.time < startTime + dashCooldownTime)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_dashPossible = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 726bb6542b066483c9e1c5ab04620ffe
|
14
twinStickCrawler/Assets/Scripts/Creatures/Vitals.cs
Normal file
14
twinStickCrawler/Assets/Scripts/Creatures/Vitals.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Vitals : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private float initHealth = 100;
|
||||
public float Health { get; set;}
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
Health = initHealth;
|
||||
}
|
||||
}
|
2
twinStickCrawler/Assets/Scripts/Creatures/Vitals.cs.meta
Normal file
2
twinStickCrawler/Assets/Scripts/Creatures/Vitals.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d05ad440f2c88de4a91ec5e324740d7d
|
@ -15,6 +15,7 @@ public class InputManager : MonoBehaviour
|
||||
public bool jumpPerformed{ get; set; }
|
||||
public bool attackPerformed { get; set; }
|
||||
public bool interactPerformed { get; set; }
|
||||
public bool sprintPerformed { get; set; }
|
||||
|
||||
|
||||
private PlayerControlls _playerControlls;
|
||||
@ -27,6 +28,9 @@ private void OnEnable()
|
||||
_playerControlls.Player.Move.Enable();
|
||||
_playerControlls.Player.Aim.Enable();
|
||||
|
||||
_playerControlls.Player.Sprint.Enable();
|
||||
_playerControlls.Player.Sprint.performed += OnSrpint;
|
||||
|
||||
_playerControlls.Player.Jump.Enable();
|
||||
_playerControlls.Player.Jump.performed += OnJump;
|
||||
|
||||
@ -43,6 +47,9 @@ private void OnDisable()
|
||||
|
||||
_playerControlls.Player.Move.Disable();
|
||||
_playerControlls.Player.Aim.Disable();
|
||||
|
||||
_playerControlls.Player.Sprint.Disable();
|
||||
_playerControlls.Player.Sprint.performed -= OnSrpint;
|
||||
|
||||
_playerControlls.Player.Jump.Disable();
|
||||
_playerControlls.Player.Jump.performed -= OnJump;
|
||||
@ -69,7 +76,6 @@ private void OnJump(InputAction.CallbackContext context)
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
private Coroutine _attackCoroutine = null;
|
||||
private void OnAtttack(InputAction.CallbackContext context)
|
||||
{
|
||||
@ -85,6 +91,22 @@ private void OnAtttack(InputAction.CallbackContext context)
|
||||
_attackCoroutine = null;
|
||||
}));
|
||||
}
|
||||
|
||||
private Coroutine _sprintCoroutine = null;
|
||||
private void OnSrpint(InputAction.CallbackContext context)
|
||||
{
|
||||
sprintPerformed = true;
|
||||
|
||||
if (_sprintCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_sprintCoroutine);
|
||||
}
|
||||
_sprintCoroutine = StartCoroutine(ResetButtonInput(newValue =>
|
||||
{
|
||||
sprintPerformed = newValue;
|
||||
_sprintCoroutine = null;
|
||||
}));
|
||||
}
|
||||
|
||||
private Coroutine _interactCoroutine = null;
|
||||
private void OnInteract(InputAction.CallbackContext context)
|
||||
@ -106,18 +128,22 @@ private IEnumerator ResetButtonInput(System.Action<bool> setReset)
|
||||
{
|
||||
yield return new WaitForSeconds(inputBufferTime);
|
||||
setReset(false);
|
||||
print("Jump deactivated"+Time.time);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (_playerControlls.Player.Zoom.ReadValue<Vector2>().magnitude >0f)
|
||||
if (_playerControlls.Player.Zoom.ReadValue<Vector2>().magnitude > 0.5f)
|
||||
{
|
||||
print(_playerControlls.Player.Zoom.ReadValue<Vector2>());
|
||||
}
|
||||
|
||||
sprintPerformed = _playerControlls.Player.Sprint.ReadValue<float>() > 0.5f;
|
||||
moveInput = _playerControlls.Player.Move.ReadValue<Vector2>();
|
||||
aimInput = _playerControlls.Player.Aim.ReadValue<Vector2>();
|
||||
Vector2 tmp = _playerControlls.Player.Aim.ReadValue<Vector2>();
|
||||
|
||||
tmp.x = Mathf.Clamp(tmp.x, 0f, Screen.width);
|
||||
tmp.y = Mathf.Clamp(tmp.y, 0f, Screen.height);
|
||||
|
||||
aimInput = tmp;
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!162 &1
|
||||
EditorUserSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 5a08575f5207595a0f5d59741173094444164f7d7d2a23317c7a4465bbe1646d
|
||||
flags: 0
|
||||
lightmappingBakingProfile:
|
||||
value: 51
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
flags: 0
|
||||
m_VCAutomaticAdd: 1
|
||||
m_VCDebugCom: 0
|
||||
m_VCDebugCmd: 0
|
||||
m_VCDebugOut: 0
|
||||
m_SemanticMergeMode: 2
|
||||
m_DesiredImportWorkerCount: 2
|
||||
m_StandbyImportWorkerCount: 2
|
||||
m_IdleImportWorkerShutdownDelay: 60000
|
||||
m_VCShowFailedCheckout: 1
|
||||
m_VCOverwriteFailedCheckoutAssets: 1
|
||||
m_VCProjectOverlayIcons: 1
|
||||
m_VCHierarchyOverlayIcons: 1
|
||||
m_VCOtherOverlayIcons: 1
|
||||
m_VCAllowAsyncUpdate: 1
|
||||
m_VCScanLocalPackagesOnConnect: 1
|
||||
m_ArtifactGarbageCollection: 1
|
||||
m_CompressAssetsOnImport: 1
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "Assets",
|
||||
"roots": ["Assets"],
|
||||
"includes": [],
|
||||
"excludes": ["Assets/Temp/", "Assets/External/"],
|
||||
"options": {
|
||||
"types": true,
|
||||
"properties": true,
|
||||
"extended": false,
|
||||
"dependencies": true
|
||||
},
|
||||
"baseScore": 999
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
trackSelection = true
|
||||
refreshSearchWindowsInPlayMode = false
|
||||
pickerAdvancedUI = false
|
||||
fetchPreview = true
|
||||
defaultFlags = 0
|
||||
keepOpen = true
|
||||
queryFolder = "Assets"
|
||||
onBoardingDoNotAskAgain = true
|
||||
showPackageIndexes = false
|
||||
showStatusBar = false
|
||||
scopes = {
|
||||
"picker_window_position_offset.075BCD15" = "72.5;270;320;550"
|
||||
"picker_visibility_flags.075BCD15" = "264"
|
||||
"picker_item_size.075BCD15" = "96"
|
||||
"picker_inspector.075BCD15" = "0"
|
||||
}
|
||||
providers = {
|
||||
asset = {
|
||||
active = true
|
||||
priority = 25
|
||||
defaultAction = null
|
||||
}
|
||||
scene = {
|
||||
active = true
|
||||
priority = 50
|
||||
defaultAction = null
|
||||
}
|
||||
adb = {
|
||||
active = false
|
||||
priority = 2500
|
||||
defaultAction = null
|
||||
}
|
||||
presets_provider = {
|
||||
active = false
|
||||
priority = -10
|
||||
defaultAction = null
|
||||
}
|
||||
find = {
|
||||
active = true
|
||||
priority = 25
|
||||
defaultAction = null
|
||||
}
|
||||
packages = {
|
||||
active = false
|
||||
priority = 90
|
||||
defaultAction = null
|
||||
}
|
||||
store = {
|
||||
active = false
|
||||
priority = 100
|
||||
defaultAction = null
|
||||
}
|
||||
profilermarkers = {
|
||||
active = false
|
||||
priority = 100
|
||||
defaultAction = null
|
||||
}
|
||||
performance = {
|
||||
active = false
|
||||
priority = 100
|
||||
defaultAction = null
|
||||
}
|
||||
log = {
|
||||
active = false
|
||||
priority = 210
|
||||
defaultAction = null
|
||||
}
|
||||
}
|
||||
objectSelectors = {
|
||||
}
|
||||
recentSearches = [
|
||||
]
|
||||
searchItemFavorites = [
|
||||
]
|
||||
savedSearchesSortOrder = 0
|
||||
showSavedSearchPanel = false
|
||||
hideTabs = false
|
||||
expandedQueries = [
|
||||
]
|
||||
queryBuilder = true
|
||||
ignoredProperties = "id;name;classname;imagecontentshash"
|
||||
helperWidgetCurrentArea = "all"
|
||||
disabledIndexers = ""
|
||||
minIndexVariations = 2
|
||||
findProviderIndexHelper = true
|
Loading…
Reference in New Issue
Block a user