namespacing and multiplayer lobby

This commit is contained in:
sebastianhampel1 2023-06-01 14:25:46 -04:00
parent 1d4a6319e9
commit 3e1b55b036
37 changed files with 2962 additions and 785 deletions

View File

@ -0,0 +1,268 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6018244971025479954
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TwoSidedCold
m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3}
m_ValidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _DOUBLESIDED_ON
- _NORMALMAP
- _NORMALMAP_TANGENT_SPACE
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 2225
stringTagMap: {}
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
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}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 2800000, guid: e5d7857b4e6de39418d36ee49f68c66c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
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:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 0
- _CullModeForward: 0
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 1
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0.634
- _MetallicRemapMax: 1
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 0.69
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _Smoothness: 0.707
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.71132076, g: 0.8888575, b: 1, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 0.71132076, g: 0.8888575, b: 1, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6510f454e38068c4392825f2f7689ef1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -69,9 +69,9 @@ ModelImporter:
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
normalImportMode: 1
tangentImportMode: 3
normalCalculationMode: 4
normalCalculationMode: 3
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0

BIN
Assets/Models/WorldEnviornment/TwoWindowWalls.fbx (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,106 @@
fileFormatVersion: 2
guid: 5554e2a3b56d46d46a640a8d60d3897b
ModelImporter:
serializedVersion: 21300
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 1
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
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
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
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -63,7 +63,7 @@ MeshRenderer:
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6106523363fe51244a25535b75eb736d, type: 2}
- {fileID: -6922793697723135513, guid: c038a760050b2c644a3947a794190aac, type: 3}
- {fileID: 2100000, guid: 6510f454e38068c4392825f2f7689ef1, type: 2}
- {fileID: 2100000, guid: 6106523363fe51244a25535b75eb736d, type: 2}
- {fileID: 2100000, guid: 4f7af3243dccb2443a3b363fb4b73602, type: 2}
- {fileID: -6629797300637803691, guid: c038a760050b2c644a3947a794190aac, type: 3}

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d877ec3e844f2ca46830012e8e79319b, type: 3}
m_Name: PhysicallyBasedSky
m_EditorClassIdentifier:
active: 0
active: 1
rotation:
m_OverrideState: 0
m_Value: 0
@ -207,7 +207,7 @@ MonoBehaviour:
active: 1
skyType:
m_OverrideState: 1
m_Value: 1
m_Value: 4
cloudType:
m_OverrideState: 1
m_Value: 0
@ -342,7 +342,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3}
m_Name: HDRISky
m_EditorClassIdentifier:
active: 1
active: 0
rotation:
m_OverrideState: 0
m_Value: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4d8206c39423b0f4888ba27b45e50c5d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,226 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-5499605880065426175
MonoBehaviour:
m_ObjectHideFlags: 3
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: 953beb541740ddc499d005ee80c9ff29, type: 3}
m_Name: Fog
m_EditorClassIdentifier:
active: 1
quality:
m_OverrideState: 0
m_Value: 1
enabled:
m_OverrideState: 1
m_Value: 1
colorMode:
m_OverrideState: 0
m_Value: 1
color:
m_OverrideState: 0
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
maxFogDistance:
m_OverrideState: 0
m_Value: 5000
mipFogMaxMip:
m_OverrideState: 0
m_Value: 0.5
mipFogNear:
m_OverrideState: 0
m_Value: 0
mipFogFar:
m_OverrideState: 0
m_Value: 1000
baseHeight:
m_OverrideState: 1
m_Value: -35.7
maximumHeight:
m_OverrideState: 1
m_Value: 168.9
meanFreePath:
m_OverrideState: 1
m_Value: 21.8
enableVolumetricFog:
m_OverrideState: 1
m_Value: 1
albedo:
m_OverrideState: 1
m_Value: {r: 0.8011926, g: 0.9716981, b: 0.9681743, a: 1}
globalLightProbeDimmer:
m_OverrideState: 0
m_Value: 1
depthExtent:
m_OverrideState: 1
m_Value: 21.3
denoisingMode:
m_OverrideState: 0
m_Value: 2
anisotropy:
m_OverrideState: 0
m_Value: 0
sliceDistributionUniformity:
m_OverrideState: 0
m_Value: 0.75
m_FogControlMode:
m_OverrideState: 0
m_Value: 0
screenResolutionPercentage:
m_OverrideState: 0
m_Value: 12.5
volumeSliceCount:
m_OverrideState: 0
m_Value: 64
m_VolumetricFogBudget:
m_OverrideState: 0
m_Value: 0.33
m_ResolutionDepthRatio:
m_OverrideState: 0
m_Value: 0.666
directionalLightsOnly:
m_OverrideState: 0
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: VolumeOne Profile
m_EditorClassIdentifier:
components:
- {fileID: 3832449337003281083}
- {fileID: -5499605880065426175}
--- !u!114 &3832449337003281083
MonoBehaviour:
m_ObjectHideFlags: 3
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: 59b6606ef2548734bb6d11b9d160bc7e, type: 3}
m_Name: HDRISky
m_EditorClassIdentifier:
active: 1
rotation:
m_OverrideState: 1
m_Value: 0
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 0.36
multiplier:
m_OverrideState: 0
m_Value: 1
upperHemisphereLuxValue:
m_OverrideState: 1
m_Value: 0.0191773
upperHemisphereLuxColor:
m_OverrideState: 1
m_Value: {x: 0.5, y: 0.43328354, z: 0.44211176}
desiredLuxValue:
m_OverrideState: 0
m_Value: 20000
updateMode:
m_OverrideState: 0
m_Value: 0
updatePeriod:
m_OverrideState: 0
m_Value: 0
includeSunInBaking:
m_OverrideState: 0
m_Value: 0
hdriSky:
m_OverrideState: 1
m_Value: {fileID: 8900000, guid: 1ec218402610c07499cad676b00bd8d7, type: 3}
distortionMode:
m_OverrideState: 0
m_Value: 0
flowmap:
m_OverrideState: 0
m_Value: {fileID: 0}
upperHemisphereOnly:
m_OverrideState: 0
m_Value: 1
scrollOrientation:
m_OverrideState: 0
m_Value:
mode: 1
customValue: 0
additiveValue: 0
multiplyValue: 1
scrollSpeed:
m_OverrideState: 1
m_Value:
mode: 1
customValue: 100
additiveValue: 0
multiplyValue: 1
enableBackplate:
m_OverrideState: 0
m_Value: 0
backplateType:
m_OverrideState: 0
m_Value: 0
groundLevel:
m_OverrideState: 0
m_Value: 0
scale:
m_OverrideState: 0
m_Value: {x: 32, y: 32}
projectionDistance:
m_OverrideState: 0
m_Value: 16
plateRotation:
m_OverrideState: 0
m_Value: 0
plateTexRotation:
m_OverrideState: 0
m_Value: 0
plateTexOffset:
m_OverrideState: 0
m_Value: {x: 0, y: 0}
blendAmount:
m_OverrideState: 0
m_Value: 0
shadowTint:
m_OverrideState: 0
m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1}
pointLightShadow:
m_OverrideState: 0
m_Value: 0
dirLightShadow:
m_OverrideState: 0
m_Value: 0
rectLightShadow:
m_OverrideState: 0
m_Value: 0
m_SkyVersion: 1
enableDistortion:
m_OverrideState: 0
m_Value: 0
procedural:
m_OverrideState: 0
m_Value: 1
scrollDirection:
m_OverrideState: 0
m_Value: 0
m_ObsoleteScrollSpeed:
m_OverrideState: 0
m_Value: 1

View File

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

View File

@ -19,7 +19,7 @@ public class DGemItem : MonoBehaviour
{
if (collision.gameObject.CompareTag("Player"))
{
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(decSpeed);
collision.gameObject.GetComponent<Player.PlayerMovementController>().SetSpeed(decSpeed);
Destroy(gameObject);
}
}

View File

@ -1,6 +1,6 @@
using UnityEngine;
using System;
using EnemyAI;
/*
# Enemy System
## States
@ -32,7 +32,7 @@ using EnemyAI;
*/
class AIStateMachine : MonoBehaviour{
[SerializeField]
private EnemyState state;
private EnemyAI.EnemyState state;

View File

@ -2,11 +2,13 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SkinlessMonsterAnimator : MonoBehaviour
{
namespace Enemy {
public class SkinlessMonsterAnimator : MonoBehaviour
{
[SerializeField] private Animator animator;
[SerializeField] [Tooltip("This is the object with the skin dissolve material")]
[SerializeField]
[Tooltip("This is the object with the skin dissolve material")]
private GameObject modelObject;
[SerializeField] private List<GameObject> objectsThatFallOnDeath = new();
@ -128,4 +130,5 @@ public class SkinlessMonsterAnimator : MonoBehaviour
yield return new WaitForSeconds(duration);
Destroy(gameObject);
}
}
}

View File

@ -5,7 +5,7 @@ public class SkinlessMonsterComponent : MonoBehaviour
{
[SerializeField] private NavMeshAgent agent;
[SerializeField] private SkinlessMonsterAnimator animator;
[SerializeField] private Enemy.SkinlessMonsterAnimator animator;
[SerializeField] private float atTargetDistance = 2;
@ -32,12 +32,12 @@ public class SkinlessMonsterComponent : MonoBehaviour
private bool isAlive = true;
private InGameManager manager;
private Game.InGameManager manager;
private Vector3 oppositeVector;
private PlayerComponent player;
private Player.PlayerComponent player;
private TargetInformation target;
private GameObject targetObject;
@ -46,12 +46,12 @@ public class SkinlessMonsterComponent : MonoBehaviour
private void Awake()
{
//Find active player rn.
var players = FindObjectsOfType<PlayerComponent>();
var players = FindObjectsOfType<Player.PlayerComponent>();
foreach (var p in players)
if (p.isActiveAndEnabled)
player = p;
manager = FindObjectOfType<InGameManager>();
manager = FindObjectOfType<Game.InGameManager>();
}
private void Start()
@ -61,7 +61,7 @@ public class SkinlessMonsterComponent : MonoBehaviour
targetObject = new GameObject();
targetObject.name = "Enemy Target";
if (player == null) player = FindObjectOfType<PlayerComponent>();
if (player == null) player = FindObjectOfType<Player.PlayerComponent>();
}
private void Update()
@ -236,10 +236,10 @@ public class SkinlessMonsterComponent : MonoBehaviour
{
var hitObject = hit.transform.gameObject;
if (hitObject.GetComponent<PlayerComponent>() != null)
if (hitObject.GetComponent<Player.PlayerComponent>() != null)
//hit player
return angleToPosition <= visibilityConeLimit || !withAngle;
if (hitObject.GetComponentInParent<PlayerComponent>() != null)
if (hitObject.GetComponentInParent<Player.PlayerComponent>() != null)
//also hit player
return angleToPosition <= visibilityConeLimit || !withAngle;
}

View File

@ -1,7 +1,9 @@
using UnityEngine;
public class DummyComponent : MonoBehaviour
namespace Enemy
{
public class DummyComponent : MonoBehaviour
{
private Animator anim;
// Start is called before the first frame update
@ -19,4 +21,5 @@ public class DummyComponent : MonoBehaviour
{
if (collision.gameObject.GetComponent<BulletComponent>() != null) anim.Play("DummyFall");
}
}
}

View File

@ -1,7 +1,8 @@
using UnityEngine;
public class MonsterComponent : MonoBehaviour
{
namespace Enemy {
public class MonsterComponent : MonoBehaviour
{
[SerializeField] private float attackDamage = 1f;
[SerializeField] private bool shakeCameraOnHit = true;
@ -19,4 +20,5 @@ public class MonsterComponent : MonoBehaviour
private void Update()
{
}
}
}

View File

@ -1,9 +1,11 @@
using UnityEngine;
using UnityEngine.VFX;
[ExecuteAlways]
public class SwarmAnimator : MonoBehaviour
namespace Enemy
{
[ExecuteAlways]
public class SwarmAnimator : MonoBehaviour
{
[SerializeField] private VisualEffect vfx;
[SerializeField] private Rigidbody rb;
@ -59,4 +61,5 @@ public class SwarmAnimator : MonoBehaviour
isExploding = false;
vfx.Stop();
}
}
}

View File

@ -4,6 +4,8 @@ using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
namespace Game
{
public class InGameManager : MonoBehaviour
{
[SerializeField] private Volume gameVolume;
@ -129,3 +131,4 @@ public class InGameManager : MonoBehaviour
SceneManager.LoadScene(0);
}
}
}

View File

@ -1,8 +1,10 @@
using UnityEngine;
using UnityEngine.UI;
public class InGameMenuManager : MonoBehaviour
namespace Game
{
public class InGameMenuManager : MonoBehaviour
{
[SerializeField] private Button settingsButton;
[SerializeField] private Button returnToMenuButton;
@ -13,7 +15,7 @@ public class InGameMenuManager : MonoBehaviour
private InGameManager gameManager;
private Animator menuAnimator;
private PlayerComponent player;
private Player.PlayerComponent player;
// Start is called before the first frame update
private void Start()
@ -21,7 +23,7 @@ public class InGameMenuManager : MonoBehaviour
menuAnimator = GetComponent<Animator>();
settingsButton.onClick.AddListener(SettingsClicked);
returnToMenuButton.onClick.AddListener(SettingsUnClicked);
player = FindObjectOfType(typeof(PlayerComponent)) as PlayerComponent;
player = FindObjectOfType(typeof(Player.PlayerComponent)) as Player.PlayerComponent;
gameManager = FindObjectOfType<InGameManager>();
}
@ -49,4 +51,5 @@ public class InGameMenuManager : MonoBehaviour
{
gameManager.SetVolume(volumeSlider.value * 2);
}
}
}

View File

@ -1,5 +1,6 @@
using UnityEngine;
namespace Game {
/// <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]
@ -37,3 +38,4 @@ public class Optimizer : MonoBehaviour
foreach (var go in references) go.SetActive(false);
}
}
}

View File

@ -19,7 +19,7 @@ public class GemItem : MonoBehaviour
{
if (collision.gameObject.CompareTag("Player"))
{
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(instantSpeed);
collision.gameObject.GetComponent<Player.PlayerMovementController>().SetSpeed(instantSpeed);
Destroy(gameObject);
}
}

View File

@ -44,7 +44,7 @@ public class DoorInteractable : HeavyItemReceiver
//print("DIST:" + dist);
if (dist <= minAttractDist)
{
var _i = PlayerInteractionHandler.instance.Inventory;
var _i = Player.PlayerInteractionHandler.instance.Inventory;
Interact(ref _i, ref item);
return true;
}

View File

@ -62,7 +62,7 @@ public class PistolComponent : MonoBehaviour
{
if (shootLight.gameObject.activeSelf && timeSinceLightDuration > shootLightDuration)
shootLight.gameObject.SetActive(false);
if (aimMode == AimMode.CAMERA) targetObject.gameObject.transform.position = PlayerAim.active.targetPosition;
if (aimMode == AimMode.CAMERA) targetObject.gameObject.transform.position = Player.PlayerAim.active.targetPosition;
if (IsEnabled && aimMode != AimMode.CAMERA)
{
var ray = new Ray(transform.position, transform.up);
@ -144,7 +144,7 @@ public class PistolComponent : MonoBehaviour
if (offsetWithTargetBall || aimMode == AimMode.MODIFIED)
{
var ballCamVector = targetObject.transform.position -
GetComponentInParent<PlayerMovementController>().cam.transform.position;
GetComponentInParent<Player.PlayerMovementController>().cam.transform.position;
var r = new Ray();
r.origin = targetObject.transform.position;
r.direction = ballCamVector.normalized;
@ -157,7 +157,7 @@ public class PistolComponent : MonoBehaviour
}
else if (aimMode == AimMode.CAMERA)
{
var target = PlayerAim.active.targetPosition;
var target = Player.PlayerAim.active.targetPosition;
var lv = target - pRigid.transform.position;
launchVector = lv.normalized;

View File

@ -18,7 +18,7 @@ public class SpecialItemCycler : MonoBehaviour
[SerializeField] private List<ItemImageRef> shootableItems = new();
[SerializeField] private PlayerInteractionHandler interactionHandler;
[SerializeField] private Player.PlayerInteractionHandler interactionHandler;
[SerializeField] private PistolComponent pistol;

View File

@ -25,7 +25,7 @@ public class BasicLevelProgressionSystem : MonoBehaviour
[SerializeField] private WaypointMarker marker;
[SerializeField] private PlayerComponent player;
[SerializeField] private Player.PlayerComponent player;
//[SerializeField]
//private float minDist = 3;
@ -82,7 +82,7 @@ public class BasicLevelProgressionSystem : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.GetComponentInParent<PlayerComponent>() != null) ProgressCurrentIfCollide();
if (other.gameObject.GetComponentInParent<Player.PlayerComponent>() != null) ProgressCurrentIfCollide();
}
private void ProgressCurrentIfCollide()

View File

@ -25,13 +25,13 @@ public class LevelZeroSpecial : MonoBehaviour
[SerializeField] private GameObject exitCollider;
[SerializeField] private PlayerComponent player;
[SerializeField] private Player.PlayerComponent player;
[SerializeField] private WaypointMarker marker2Ref;
[SerializeField] private WaypointMarker marker3Ref;
[SerializeField] private Optimizer finalRoomOptimizer;
[SerializeField] private Game.Optimizer finalRoomOptimizer;
private int countPowered;
private bool isEnabled;

View File

@ -1,7 +1,8 @@
using UnityEngine;
public class CameraController : MonoBehaviour
namespace Player
{
public class CameraController : MonoBehaviour
{
//private float mouseX = 0;
//private float mouseY;
[SerializeField] private Camera cam;
@ -46,4 +47,5 @@ public class CameraController : MonoBehaviour
//Cursor.visible = false;
//Cursor.lockState = CursorLockMode.Locked;
}
}
}

View File

@ -1,8 +1,10 @@
using Cinemachine;
using UnityEngine;
public class CameraShift : MonoBehaviour
namespace Player
{
public class CameraShift : MonoBehaviour
{
public static CameraShift active;
[SerializeField] private Camera childCam;
@ -59,4 +61,5 @@ public class CameraShift : MonoBehaviour
{
this.isCenter = isCenter;
}
}
}

View File

@ -1,7 +1,9 @@
using UnityEngine;
public class NoiseVisibilitySettingsManager : MonoBehaviour
namespace Player
{
public class NoiseVisibilitySettingsManager : MonoBehaviour
{
[SerializeField] private float sneakNoiseDistance = 5f;
[SerializeField] private float runNoiseDistance = 10f;
@ -59,4 +61,5 @@ public class NoiseVisibilitySettingsManager : MonoBehaviour
{
this.isSneaking = isSneaking;
}
}
}

View File

@ -1,7 +1,9 @@
using UnityEngine;
public class PlayerAim : MonoBehaviour
namespace Player
{
public class PlayerAim : MonoBehaviour
{
public static PlayerAim active;
public Vector3 targetPosition;
@ -21,4 +23,5 @@ public class PlayerAim : MonoBehaviour
RaycastHit hit;
if (Physics.Raycast(r, out hit)) targetPosition = hit.point;
}
}
}

View File

@ -1,7 +1,10 @@
using UnityEngine;
public class PlayerAnimationController : MonoBehaviour
namespace Player
{
public class PlayerAnimationController : MonoBehaviour
{
[SerializeField] private Animator animController;
[SerializeField] private string runningParameter;
@ -101,16 +104,17 @@ public class PlayerAnimationController : MonoBehaviour
animController.SetTrigger("WasHit");
animController.SetBool("IsDead", isDead);
}
}
}
public enum PlayerAnimationType
{
public enum PlayerAnimationType
{
Movement,
Action
}
}
public enum PlayerQuickAnimationType
{
public enum PlayerQuickAnimationType
{
Grab,
Shoot
}
}

View File

@ -1,8 +1,10 @@
using Cinemachine;
using UnityEngine;
public class PlayerComponent : MonoBehaviour
namespace Player
{
public class PlayerComponent : MonoBehaviour
{
[SerializeField] private float health = 5f;
[SerializeField] private float maxHealth = 5f;
@ -74,7 +76,7 @@ public class PlayerComponent : MonoBehaviour
if (other.CompareTag("Damaging"))
{
print("HIT!");
var monster = other.GetComponentInParent<MonsterComponent>();
var monster = other.GetComponentInParent<Enemy.MonsterComponent>();
Damage(monster.AttackDamage, monster.ShakeCameraOnHit);
animationController.Hit(health <= 0);
@ -101,4 +103,5 @@ public class PlayerComponent : MonoBehaviour
health -= damage;
if (applyShake) ShakeCamera(15, 5);
}
}
}

View File

@ -1,6 +1,10 @@
using System.Collections.Generic;
using UnityEngine;
namespace Player
{
[RequireComponent(typeof(Collider))]
public class PlayerInteractionHandler : MonoBehaviour
{
@ -36,7 +40,7 @@ public class PlayerInteractionHandler : MonoBehaviour
private ItemSelector itemSelector;
private readonly List<InteractableItem> itemsInRange = new();
private InGameManager manager;
private Game.InGameManager manager;
private Material selMaterial;
private TempInventory tempInvent;
public Inventory Inventory => invent;
@ -58,7 +62,7 @@ public class PlayerInteractionHandler : MonoBehaviour
itemSelector = ItemSelector.instance;
pistol.gameObject.SetActive(GunEnabled);
flashlightEnabled = flashlight.gameObject.activeSelf;
manager = FindObjectOfType<InGameManager>();
manager = FindObjectOfType<Game.InGameManager>();
}
// Update is called once per frame
@ -314,3 +318,5 @@ internal class AxisIsDown
return down;
}
}
}

View File

@ -2,8 +2,11 @@ using System.Collections;
using Cinemachine;
using UnityEngine;
public class PlayerMovementController : MonoBehaviour
namespace Player
{
public class PlayerMovementController : MonoBehaviour
{
[SerializeField] private PlayerAnimationController animcontroller;
[SerializeField] private CharacterController ccontroller;
@ -42,7 +45,7 @@ public class PlayerMovementController : MonoBehaviour
private Vector3 lookingDirectionVector;
private InGameManager manager;
private Game.InGameManager manager;
private bool movementLocked;
@ -58,7 +61,7 @@ public class PlayerMovementController : MonoBehaviour
private void Start()
{
ccForceAddon = ccontroller.gameObject.GetComponent<CharacterControllerForce>();
manager = FindObjectOfType<InGameManager>();
manager = FindObjectOfType<Game.InGameManager>();
initXSensitivity = freelook.m_XAxis.m_MaxSpeed;
initYSensitivity = freelook.m_YAxis.m_MaxSpeed;
}
@ -160,4 +163,5 @@ public class PlayerMovementController : MonoBehaviour
yield return new WaitForSeconds(duration);
movementLocked = false;
}
}
}

View File

@ -1,8 +1,10 @@
using TMPro;
using UnityEngine;
public class StatsOutputScreen : MonoBehaviour
namespace Player
{
public class StatsOutputScreen : MonoBehaviour
{
[SerializeField] private TMP_Text healthText;
[SerializeField] private TMP_Text staminaText;
@ -46,4 +48,5 @@ public class StatsOutputScreen : MonoBehaviour
if (health <= 1)
healthText.gameObject.SetActive(!healthText.gameObject.activeSelf);
}
}
}