Merge pull request #5 from RobotFireOpenTeam/misc

Misc
This commit is contained in:
AderKonstantin 2025-02-09 01:02:01 +03:00 committed by GitHub
commit b259e70707
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 35570 additions and 1297 deletions

BIN
Assets/Models/Trooper2.fbx Normal file

Binary file not shown.

View File

@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: 9746daed4c2ed9a44948607d0850d415
ModelImporter:
serializedVersion: 22200
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
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

@ -26,9 +26,9 @@ Transform:
m_GameObject: {fileID: 291561346353646108}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.298, y: -0.619, z: 0.797}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_LocalPosition: {x: 0.14994922, y: -0.41265208, z: 0.54647094}
m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 5903893402596507206}
- {fileID: 2624246159024407406}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -36056,6 +36056,10 @@ PrefabInstance:
propertyPath: m_Name
value: ScreenSpaceCanvas
objectReference: {fileID: 0}
- target: {fileID: 3247355636680998545, guid: fa9f2c4a615eec54086556e1b725779b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4324005738217832204, guid: fa9f2c4a615eec54086556e1b725779b, type: 3}
propertyPath: m_SizeDelta.x
value: 77.754

View File

@ -1,496 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &410087039
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 410087041}
- component: {fileID: 410087040}
- component: {fileID: 410087042}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &410087040
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
m_Enabled: 1
serializedVersion: 11
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 2
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 5000
m_UseColorTemperature: 1
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ForceVisible: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
m_LightUnit: 1
m_LuxAtDistance: 1
m_EnableSpotReflector: 1
--- !u!4 &410087041
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &410087042
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 1
--- !u!1 &832575517
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 832575519}
- component: {fileID: 832575518}
m_Layer: 0
m_Name: Global Volume
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &832575518
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IsGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
--- !u!4 &832575519
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1488716258
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1488716262}
- component: {fileID: 1488716261}
- component: {fileID: 1488716260}
- component: {fileID: 1488716259}
m_Layer: 0
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!64 &1488716259
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1488716258}
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: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1488716260
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1488716258}
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 &1488716261
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1488716258}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1488716262
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1488716258}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &9138998884118735219
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 393987864348048250, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_Name
value: Gun
objectReference: {fileID: 0}
- target: {fileID: 3616139496424255711, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: GlobalObjectIdHash
value: 2379304067
objectReference: {fileID: 0}
- target: {fileID: 4933421663285562274, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_Name
value: TestRobot Variant
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalPosition.x
value: -0.051668942
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalPosition.z
value: 0.1906097
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6604919127397567024, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 393987864348048250, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
insertIndex: -1
addedObject: {fileID: 9138998884118735221}
m_SourcePrefab: {fileID: 100100000, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
--- !u!1 &9138998884118735220 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 393987864348048250, guid: 872f99b5758d3ec479114825be3bf420, type: 3}
m_PrefabInstance: {fileID: 9138998884118735219}
m_PrefabAsset: {fileID: 0}
--- !u!114 &9138998884118735221
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9138998884118735220}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 81238d9edefd1cb489822146d154d551, type: 3}
m_Name:
m_EditorClassIdentifier:
damage: 10
range: 100
mainCam: {fileID: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 410087041}
- {fileID: 832575519}
- {fileID: 1488716262}
- {fileID: 9138998884118735219}

View File

@ -1,174 +0,0 @@
using Unity.Netcode;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
public class RobotControllerStandart : NetworkBehaviour
{
[Header("Objects")]
[SerializeField] private Rigidbody rb;
[SerializeField] protected Camera mainCam;
[SerializeField] private Weapon weapon;
[SerializeField] private float upDownRange = 90f;
private float verticalRotation;
[Header("Movement")]
[SerializeField] private float walkSpeed = 5.0f;
[SerializeField] private float sprintMultiplier = 5.0f;
float speedMultiplier = 1f;
[Header("Gravity / JumpForce")]
[SerializeField] private float gravity = 9.81f;
[SerializeField] private float jumpForce = 5f;
[Header("Look Sensitivity")]
[SerializeField] private float m_lookSensitivity = 3.0f;
private bool m_cursorIsLocked = true;
[Header("Input Actions")]
[SerializeField] private PlayerInput playerInput;
private Vector2 moveInput;
private Vector2 lookInput;
private bool isMoving;
private Vector3 currentMovement = Vector3.zero;
private void Awake()
{
rb = GetComponent<Rigidbody>();
playerInput = GetComponent<PlayerInput>();
rb.isKinematic = true;
}
// // PlayerInput Events
// public void OnConsoleButtonPressed(InputAction.CallbackContext context)
// {
// if (context.performed)
// {
// Debug.Log("Console");
// if (LocalDeveloperConsoleOpened) {
// LocalDeveloperConsoleOpened = false;
// devConsole.CloseConsole();
// }
// else {
// LocalDeveloperConsoleOpened = true;
// devConsole.OpenConsole();
// }
// }
// }
// public void OnMove(InputAction.CallbackContext context)
// {
// moveInput = context.ReadValue<Vector2>();
// }
// public void OnLook(InputAction.CallbackContext context)
// {
// lookInput = context.ReadValue<Vector2>();
// }
// public void OnSprint(InputAction.CallbackContext context)
// {
// if (context.performed)
// {
// Debug.Log("Running");
// speedMultiplier = sprintMultiplier;
// }
// else
// {
// speedMultiplier = 1f;
// }
// }
// public void OnJump(InputAction.CallbackContext context)
// {
// if (context.performed)
// {
// // JumpServerRPC();
// }
// }
// public void OnAttack(InputAction.CallbackContext context)
// {
// if (context.performed)
// {
// // ShootServerRPC();
// }
// }
// private void Update()
// {
// if (!IsOwner)
// {
// return;
// }
// HandleRotation();
// }
// private void HandleMovement()
// {
// float verticalSpeed = moveInput.y * walkSpeed * speedMultiplier;
// float horizontalSpeed = moveInput.x * walkSpeed * speedMultiplier;
// Vector3 horizontalMovement = new Vector3 (horizontalSpeed, 0, verticalSpeed);
// horizontalMovement = transform.rotation * horizontalMovement;
// handleGravityAndJumping();
// currentMovement.x = horizontalMovement.x;
// currentMovement.z = horizontalMovement.z;
// characterController.Move(currentMovement * Time.deltaTime);
// isMoving = moveInput.y != 0 || moveInput.x != 0;
// }
// private void handleGravityAndJumping()
// {
// if (characterController.isGrounded)
// {
// currentMovement.y = -0.5f;
// }
// else
// {
// currentMovement.y -= gravity * Time.deltaTime;
// }
// }
// void HandleRotation()
// {
// float mouseXRotation = lookInput.x * m_lookSensitivity;
// transform.Rotate(0, mouseXRotation, 0);
// verticalRotation -= lookInput.y * m_lookSensitivity;
// verticalRotation = Mathf.Clamp(verticalRotation, -upDownRange, upDownRange);
// mainCam.transform.localRotation = Quaternion.Euler(verticalRotation, 0, 0);
// }
// // // Networking Staff
// // [ServerRpc]
// // private void JumpServerRPC()
// // {
// // if (characterController.isGrounded)
// // {
// // currentMovement.y = jumpForce;
// // Debug.Log("Debug.Log(currentMovement.y): " + currentMovement.y);
// // Debug.Log("Jumping triggered.");
// // }
// // }
// // [ServerRpc]
// // private void ShootServerRPC()
// // {
// // weapon.Shooting();
// // Debug.Log("Shooting triggered.");
// // }
}

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 9c3e8bc9cf50891438d9aa9301c069d3

View File

@ -3,12 +3,20 @@ using UnityEngine.SceneManagement;
public class MenuGroup : MonoBehaviour
{
public void PlayGame()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
[SerializeField] private string singleplayerScene = "LocalTestMap"; // Name of the scene to load
public void QuitGame()
{
Application.Quit();
}
// TypeGameBtnGroup
public void Singleplayer()
{
SceneManager.LoadScene(singleplayerScene, LoadSceneMode.Single);
}
public void Multiplayer()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}

View File

@ -0,0 +1,33 @@
using UnityEngine;
using Unity.Netcode;
public class HostTestingEnv : MonoBehaviour
{
void Start()
{
StartHost();
}
void StartHost()
{
// Ensure NetworkManager is initialized
if (NetworkManager.Singleton == null)
{
Debug.Log("NetworkManager is not initialized. Cannot start host.");
return;
}
// Subscribe to the client connected event
NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
// Start the host (server + client)
NetworkManager.Singleton.StartHost();
Debug.Log("Host started!");
}
void OnClientConnected(ulong clientId)
{
string message = $"Player with Client ID {clientId} connected.";
Debug.Log(message);
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 45e4efa372bd6534cbc7d64512f76685

View File

@ -33,24 +33,24 @@ MonoBehaviour:
m_Settings:
m_SettingsList:
m_List:
- rid: 596322919513325988
- rid: 596322919513325989
- rid: 377460212914978900
- rid: 377460212914978901
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 596322919513325990
- rid: 596322919513325991
- rid: 377460212914978902
- rid: 377460212914978903
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 596322919513325992
- rid: 596322919513325993
- rid: 596322919513325994
- rid: 596322919513325995
- rid: 596322919513325996
- rid: 596322919513325997
- rid: 377460212914978904
- rid: 377460212914978905
- rid: 377460212914978906
- rid: 377460212914978907
- rid: 377460212914978908
- rid: 377460212914978909
- rid: 6852985685364965392
- rid: 596322919513325998
- rid: 377460212914978910
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 1517640095335972864
@ -96,14 +96,14 @@ MonoBehaviour:
references:
version: 2
RefIds:
- rid: 596322919513325988
- rid: 377460212914978900
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_StripUnusedPostProcessingVariants: 1
m_StripUnusedVariants: 1
m_StripScreenCoordOverrideVariants: 1
- rid: 596322919513325989
- rid: 377460212914978901
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
@ -115,7 +115,7 @@ MonoBehaviour:
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
- rid: 596322919513325990
- rid: 377460212914978902
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
@ -130,7 +130,7 @@ MonoBehaviour:
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
- rid: 596322919513325991
- rid: 377460212914978903
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
@ -138,7 +138,7 @@ MonoBehaviour:
m_DefaultLineMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2}
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
- rid: 596322919513325992
- rid: 377460212914978904
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
data:
m_Version: 0
@ -151,13 +151,13 @@ MonoBehaviour:
m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3}
m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3}
m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3}
- rid: 596322919513325993
- rid: 377460212914978905
type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
- rid: 596322919513325994
- rid: 377460212914978906
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -170,12 +170,12 @@ MonoBehaviour:
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
- rid: 596322919513325995
- rid: 377460212914978907
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
m_ProbeVolumeDisableStreamingAssets: 0
- rid: 596322919513325996
- rid: 377460212914978908
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -185,14 +185,14 @@ MonoBehaviour:
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
- rid: 596322919513325997
- rid: 377460212914978909
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_version: 0
m_IncludeReferencedInScenes: 0
m_IncludeAssetsByLabel: 0
m_LabelToInclude:
- rid: 596322919513325998
- rid: 377460212914978910
type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1