@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 52e9a7db466d20e45b8707a5080aeae4 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,76 @@ | |||||
%YAML 1.1 | |||||
%TAG !u! tag:unity3d.com,2011: | |||||
--- !u!21 &2100000 | |||||
Material: | |||||
serializedVersion: 6 | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_Name: LocalGreeen | |||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_ShaderKeywords: | |||||
m_LightmapFlags: 4 | |||||
m_EnableInstancingVariants: 0 | |||||
m_DoubleSidedGI: 0 | |||||
m_CustomRenderQueue: -1 | |||||
stringTagMap: {} | |||||
disabledShaderPasses: [] | |||||
m_SavedProperties: | |||||
serializedVersion: 3 | |||||
m_TexEnvs: | |||||
- _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} | |||||
m_Floats: | |||||
- _BumpScale: 1 | |||||
- _Cutoff: 0.5 | |||||
- _DetailNormalMapScale: 1 | |||||
- _DstBlend: 0 | |||||
- _GlossMapScale: 1 | |||||
- _Glossiness: 0.5 | |||||
- _GlossyReflections: 1 | |||||
- _Metallic: 0 | |||||
- _Mode: 0 | |||||
- _OcclusionStrength: 1 | |||||
- _Parallax: 0.02 | |||||
- _SmoothnessTextureChannel: 0 | |||||
- _SpecularHighlights: 1 | |||||
- _SrcBlend: 1 | |||||
- _UVSec: 0 | |||||
- _ZWrite: 1 | |||||
m_Colors: | |||||
- _Color: {r: 0, g: 1, b: 0.20915246, a: 1} | |||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 05e8da9df63e1334593bb52aba04fd2f | |||||
NativeFormatImporter: | |||||
externalObjects: {} | |||||
mainObjectFileID: 2100000 | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,76 @@ | |||||
%YAML 1.1 | |||||
%TAG !u! tag:unity3d.com,2011: | |||||
--- !u!21 &2100000 | |||||
Material: | |||||
serializedVersion: 6 | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_Name: RemoteBlue | |||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_ShaderKeywords: | |||||
m_LightmapFlags: 4 | |||||
m_EnableInstancingVariants: 0 | |||||
m_DoubleSidedGI: 0 | |||||
m_CustomRenderQueue: -1 | |||||
stringTagMap: {} | |||||
disabledShaderPasses: [] | |||||
m_SavedProperties: | |||||
serializedVersion: 3 | |||||
m_TexEnvs: | |||||
- _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} | |||||
m_Floats: | |||||
- _BumpScale: 1 | |||||
- _Cutoff: 0.5 | |||||
- _DetailNormalMapScale: 1 | |||||
- _DstBlend: 0 | |||||
- _GlossMapScale: 1 | |||||
- _Glossiness: 0.5 | |||||
- _GlossyReflections: 1 | |||||
- _Metallic: 0 | |||||
- _Mode: 0 | |||||
- _OcclusionStrength: 1 | |||||
- _Parallax: 0.02 | |||||
- _SmoothnessTextureChannel: 0 | |||||
- _SpecularHighlights: 1 | |||||
- _SrcBlend: 1 | |||||
- _UVSec: 0 | |||||
- _ZWrite: 1 | |||||
m_Colors: | |||||
- _Color: {r: 0, g: 0.72122526, b: 1, a: 1} | |||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 7256cf30b17151f49955bf872bf681d3 | |||||
NativeFormatImporter: | |||||
externalObjects: {} | |||||
mainObjectFileID: 2100000 | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: edde46517365f8348b79ff810fa11a68 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,111 @@ | |||||
%YAML 1.1 | |||||
%TAG !u! tag:unity3d.com,2011: | |||||
--- !u!1001 &100100000 | |||||
Prefab: | |||||
m_ObjectHideFlags: 1 | |||||
serializedVersion: 2 | |||||
m_Modification: | |||||
m_TransformParent: {fileID: 0} | |||||
m_Modifications: [] | |||||
m_RemovedComponents: [] | |||||
m_SourcePrefab: {fileID: 0} | |||||
m_RootGameObject: {fileID: 1359508890942550} | |||||
m_IsPrefabAsset: 1 | |||||
--- !u!1 &1359508890942550 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 4001230648210922} | |||||
- component: {fileID: 33388123346024876} | |||||
- component: {fileID: 23241386347225878} | |||||
- component: {fileID: 65640171084380956} | |||||
- component: {fileID: 114813168408472538} | |||||
m_Layer: 0 | |||||
m_Name: LocalPlayer | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!4 &4001230648210922 | |||||
Transform: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1359508890942550} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: 0, y: 1, z: 0} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 0 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||||
--- !u!23 &23241386347225878 | |||||
MeshRenderer: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1359508890942550} | |||||
m_Enabled: 1 | |||||
m_CastShadows: 1 | |||||
m_ReceiveShadows: 1 | |||||
m_DynamicOccludee: 1 | |||||
m_MotionVectors: 1 | |||||
m_LightProbeUsage: 1 | |||||
m_ReflectionProbeUsage: 1 | |||||
m_RenderingLayerMask: 4294967295 | |||||
m_Materials: | |||||
- {fileID: 2100000, guid: 05e8da9df63e1334593bb52aba04fd2f, type: 2} | |||||
m_StaticBatchInfo: | |||||
firstSubMesh: 0 | |||||
subMeshCount: 0 | |||||
m_StaticBatchRoot: {fileID: 0} | |||||
m_ProbeAnchor: {fileID: 0} | |||||
m_LightProbeVolumeOverride: {fileID: 0} | |||||
m_ScaleInLightmap: 1 | |||||
m_PreserveUVs: 0 | |||||
m_IgnoreNormalsForChartDetection: 0 | |||||
m_ImportantGI: 0 | |||||
m_StitchLightmapSeams: 0 | |||||
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 | |||||
--- !u!33 &33388123346024876 | |||||
MeshFilter: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1359508890942550} | |||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!65 &65640171084380956 | |||||
BoxCollider: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1359508890942550} | |||||
m_Material: {fileID: 0} | |||||
m_IsTrigger: 0 | |||||
m_Enabled: 1 | |||||
serializedVersion: 2 | |||||
m_Size: {x: 1, y: 1, z: 1} | |||||
m_Center: {x: 0, y: 0, z: 0} | |||||
--- !u!114 &114813168408472538 | |||||
MonoBehaviour: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1359508890942550} | |||||
m_Enabled: 1 | |||||
m_EditorHideFlags: 0 | |||||
m_Script: {fileID: 11500000, guid: 381a091376fde4f4cbb8edc78f431073, type: 3} | |||||
m_Name: | |||||
m_EditorClassIdentifier: | |||||
moveIncrement: 0.01 |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 88f2120ea01cef248ba929e8eea4c759 | |||||
NativeFormatImporter: | |||||
externalObjects: {} | |||||
mainObjectFileID: 100100000 | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,98 @@ | |||||
%YAML 1.1 | |||||
%TAG !u! tag:unity3d.com,2011: | |||||
--- !u!1001 &100100000 | |||||
Prefab: | |||||
m_ObjectHideFlags: 1 | |||||
serializedVersion: 2 | |||||
m_Modification: | |||||
m_TransformParent: {fileID: 0} | |||||
m_Modifications: [] | |||||
m_RemovedComponents: [] | |||||
m_SourcePrefab: {fileID: 0} | |||||
m_RootGameObject: {fileID: 1737980672629790} | |||||
m_IsPrefabAsset: 1 | |||||
--- !u!1 &1737980672629790 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 4928728998406288} | |||||
- component: {fileID: 33104186725661092} | |||||
- component: {fileID: 23526387874829878} | |||||
- component: {fileID: 65482818743642420} | |||||
m_Layer: 0 | |||||
m_Name: RemotePlayer | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!4 &4928728998406288 | |||||
Transform: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1737980672629790} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: 0, y: 1, z: 0} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 0 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||||
--- !u!23 &23526387874829878 | |||||
MeshRenderer: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1737980672629790} | |||||
m_Enabled: 1 | |||||
m_CastShadows: 1 | |||||
m_ReceiveShadows: 1 | |||||
m_DynamicOccludee: 1 | |||||
m_MotionVectors: 1 | |||||
m_LightProbeUsage: 1 | |||||
m_ReflectionProbeUsage: 1 | |||||
m_RenderingLayerMask: 4294967295 | |||||
m_Materials: | |||||
- {fileID: 2100000, guid: 7256cf30b17151f49955bf872bf681d3, type: 2} | |||||
m_StaticBatchInfo: | |||||
firstSubMesh: 0 | |||||
subMeshCount: 0 | |||||
m_StaticBatchRoot: {fileID: 0} | |||||
m_ProbeAnchor: {fileID: 0} | |||||
m_LightProbeVolumeOverride: {fileID: 0} | |||||
m_ScaleInLightmap: 1 | |||||
m_PreserveUVs: 0 | |||||
m_IgnoreNormalsForChartDetection: 0 | |||||
m_ImportantGI: 0 | |||||
m_StitchLightmapSeams: 0 | |||||
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 | |||||
--- !u!33 &33104186725661092 | |||||
MeshFilter: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1737980672629790} | |||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!65 &65482818743642420 | |||||
BoxCollider: | |||||
m_ObjectHideFlags: 1 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 100100000} | |||||
m_GameObject: {fileID: 1737980672629790} | |||||
m_Material: {fileID: 0} | |||||
m_IsTrigger: 0 | |||||
m_Enabled: 1 | |||||
serializedVersion: 2 | |||||
m_Size: {x: 1, y: 1, z: 1} | |||||
m_Center: {x: 0, y: 0, z: 0} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: bdf6a76720f2a98408b6639537d99358 | |||||
NativeFormatImporter: | |||||
externalObjects: {} | |||||
mainObjectFileID: 100100000 | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,563 @@ | |||||
%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: 9 | |||||
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: 3 | |||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} | |||||
m_SkyboxMaterial: {fileID: 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_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} | |||||
m_UseRadianceAmbientProbe: 0 | |||||
--- !u!157 &3 | |||||
LightmapSettings: | |||||
m_ObjectHideFlags: 0 | |||||
serializedVersion: 11 | |||||
m_GIWorkflowMode: 1 | |||||
m_GISettings: | |||||
serializedVersion: 2 | |||||
m_BounceScale: 1 | |||||
m_IndirectOutputScale: 1 | |||||
m_AlbedoBoost: 1 | |||||
m_TemporalCoherenceThreshold: 1 | |||||
m_EnvironmentLightingMode: 0 | |||||
m_EnableBakedLightmaps: 0 | |||||
m_EnableRealtimeLightmaps: 0 | |||||
m_LightmapEditorSettings: | |||||
serializedVersion: 10 | |||||
m_Resolution: 2 | |||||
m_BakeResolution: 40 | |||||
m_AtlasSize: 1024 | |||||
m_AO: 0 | |||||
m_AOMaxDistance: 1 | |||||
m_CompAOExponent: 1 | |||||
m_CompAOExponentDirect: 0 | |||||
m_Padding: 2 | |||||
m_LightmapParameters: {fileID: 0} | |||||
m_LightmapsBakeMode: 1 | |||||
m_TextureCompression: 1 | |||||
m_FinalGather: 0 | |||||
m_FinalGatherFiltering: 1 | |||||
m_FinalGatherRayCount: 256 | |||||
m_ReflectionCompression: 2 | |||||
m_MixedBakeMode: 2 | |||||
m_BakeBackend: 1 | |||||
m_PVRSampling: 1 | |||||
m_PVRDirectSampleCount: 32 | |||||
m_PVRSampleCount: 500 | |||||
m_PVRBounces: 2 | |||||
m_PVRFilterTypeDirect: 0 | |||||
m_PVRFilterTypeIndirect: 0 | |||||
m_PVRFilterTypeAO: 0 | |||||
m_PVRFilteringMode: 1 | |||||
m_PVRCulling: 1 | |||||
m_PVRFilteringGaussRadiusDirect: 1 | |||||
m_PVRFilteringGaussRadiusIndirect: 5 | |||||
m_PVRFilteringGaussRadiusAO: 2 | |||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 | |||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 | |||||
m_PVRFilteringAtrousPositionSigmaAO: 1 | |||||
m_ShowResolutionOverlay: 1 | |||||
m_LightingDataAsset: {fileID: 0} | |||||
m_UseShadowmask: 1 | |||||
--- !u!196 &4 | |||||
NavMeshSettings: | |||||
serializedVersion: 2 | |||||
m_ObjectHideFlags: 0 | |||||
m_BuildSettings: | |||||
serializedVersion: 2 | |||||
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 | |||||
accuratePlacement: 0 | |||||
debug: | |||||
m_Flags: 0 | |||||
m_NavMeshData: {fileID: 0} | |||||
--- !u!1 &6342918 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 6342922} | |||||
- component: {fileID: 6342921} | |||||
- component: {fileID: 6342920} | |||||
- component: {fileID: 6342919} | |||||
m_Layer: 0 | |||||
m_Name: Sphere (1) | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!135 &6342919 | |||||
SphereCollider: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 6342918} | |||||
m_Material: {fileID: 0} | |||||
m_IsTrigger: 0 | |||||
m_Enabled: 1 | |||||
serializedVersion: 2 | |||||
m_Radius: 0.5 | |||||
m_Center: {x: 0, y: 0, z: 0} | |||||
--- !u!23 &6342920 | |||||
MeshRenderer: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 6342918} | |||||
m_Enabled: 1 | |||||
m_CastShadows: 1 | |||||
m_ReceiveShadows: 1 | |||||
m_DynamicOccludee: 1 | |||||
m_MotionVectors: 1 | |||||
m_LightProbeUsage: 1 | |||||
m_ReflectionProbeUsage: 1 | |||||
m_RenderingLayerMask: 4294967295 | |||||
m_Materials: | |||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_StaticBatchInfo: | |||||
firstSubMesh: 0 | |||||
subMeshCount: 0 | |||||
m_StaticBatchRoot: {fileID: 0} | |||||
m_ProbeAnchor: {fileID: 0} | |||||
m_LightProbeVolumeOverride: {fileID: 0} | |||||
m_ScaleInLightmap: 1 | |||||
m_PreserveUVs: 0 | |||||
m_IgnoreNormalsForChartDetection: 0 | |||||
m_ImportantGI: 0 | |||||
m_StitchLightmapSeams: 0 | |||||
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 | |||||
--- !u!33 &6342921 | |||||
MeshFilter: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 6342918} | |||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!4 &6342922 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 6342918} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: 10, y: 0, z: 10} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 5 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||||
--- !u!1 &695038879 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 695038883} | |||||
- component: {fileID: 695038882} | |||||
- component: {fileID: 695038881} | |||||
- component: {fileID: 695038880} | |||||
m_Layer: 0 | |||||
m_Name: Plane | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!64 &695038880 | |||||
MeshCollider: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 695038879} | |||||
m_Material: {fileID: 0} | |||||
m_IsTrigger: 0 | |||||
m_Enabled: 1 | |||||
serializedVersion: 3 | |||||
m_Convex: 0 | |||||
m_CookingOptions: 14 | |||||
m_SkinWidth: 0.01 | |||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!23 &695038881 | |||||
MeshRenderer: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 695038879} | |||||
m_Enabled: 1 | |||||
m_CastShadows: 1 | |||||
m_ReceiveShadows: 1 | |||||
m_DynamicOccludee: 1 | |||||
m_MotionVectors: 1 | |||||
m_LightProbeUsage: 1 | |||||
m_ReflectionProbeUsage: 1 | |||||
m_RenderingLayerMask: 4294967295 | |||||
m_Materials: | |||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_StaticBatchInfo: | |||||
firstSubMesh: 0 | |||||
subMeshCount: 0 | |||||
m_StaticBatchRoot: {fileID: 0} | |||||
m_ProbeAnchor: {fileID: 0} | |||||
m_LightProbeVolumeOverride: {fileID: 0} | |||||
m_ScaleInLightmap: 1 | |||||
m_PreserveUVs: 0 | |||||
m_IgnoreNormalsForChartDetection: 0 | |||||
m_ImportantGI: 0 | |||||
m_StitchLightmapSeams: 0 | |||||
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 | |||||
--- !u!33 &695038882 | |||||
MeshFilter: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 695038879} | |||||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!4 &695038883 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 695038879} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: 0, y: 0, z: 0} | |||||
m_LocalScale: {x: 2, y: 2, z: 2} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 1 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||||
--- !u!1 &801355672 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 801355674} | |||||
- component: {fileID: 801355673} | |||||
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 &801355673 | |||||
Light: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 801355672} | |||||
m_Enabled: 1 | |||||
serializedVersion: 8 | |||||
m_Type: 1 | |||||
m_Color: {r: 1, g: 1, b: 1, a: 1} | |||||
m_Intensity: 1 | |||||
m_Range: 10 | |||||
m_SpotAngle: 30 | |||||
m_CookieSize: 10 | |||||
m_Shadows: | |||||
m_Type: 0 | |||||
m_Resolution: -1 | |||||
m_CustomResolution: -1 | |||||
m_Strength: 1 | |||||
m_Bias: 0.05 | |||||
m_NormalBias: 0.4 | |||||
m_NearPlane: 0.2 | |||||
m_Cookie: {fileID: 0} | |||||
m_DrawHalo: 0 | |||||
m_Flare: {fileID: 0} | |||||
m_RenderMode: 0 | |||||
m_CullingMask: | |||||
serializedVersion: 2 | |||||
m_Bits: 4294967295 | |||||
m_Lightmapping: 4 | |||||
m_LightShadowCasterMode: 0 | |||||
m_AreaSize: {x: 1, y: 1} | |||||
m_BounceIntensity: 1 | |||||
m_ColorTemperature: 6570 | |||||
m_UseColorTemperature: 0 | |||||
m_ShadowRadius: 0 | |||||
m_ShadowAngle: 0 | |||||
--- !u!4 &801355674 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 801355672} | |||||
m_LocalRotation: {x: 0.42238665, y: -0.47888616, z: -0.013989174, w: 0.76945555} | |||||
m_LocalPosition: {x: 8.19, y: 6.6, z: -0.05} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 2 | |||||
m_LocalEulerAnglesHint: {x: 39.54, y: -76.157005, z: -33.539} | |||||
--- !u!1 &843646321 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 843646324} | |||||
- component: {fileID: 843646323} | |||||
- component: {fileID: 843646322} | |||||
m_Layer: 0 | |||||
m_Name: Main Camera | |||||
m_TagString: MainCamera | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!81 &843646322 | |||||
AudioListener: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 843646321} | |||||
m_Enabled: 1 | |||||
--- !u!20 &843646323 | |||||
Camera: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 843646321} | |||||
m_Enabled: 1 | |||||
serializedVersion: 2 | |||||
m_ClearFlags: 1 | |||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||||
m_projectionMatrixMode: 1 | |||||
m_SensorSize: {x: 36, y: 24} | |||||
m_LensShift: {x: 0, y: 0} | |||||
m_FocalLength: 50 | |||||
m_NormalizedViewPortRect: | |||||
serializedVersion: 2 | |||||
x: 0 | |||||
y: 0 | |||||
width: 1 | |||||
height: 1 | |||||
near clip plane: 0.3 | |||||
far clip plane: 1000 | |||||
field of view: 60 | |||||
orthographic: 0 | |||||
orthographic size: 5 | |||||
m_Depth: -1 | |||||
m_CullingMask: | |||||
serializedVersion: 2 | |||||
m_Bits: 4294967295 | |||||
m_RenderingPath: -1 | |||||
m_TargetTexture: {fileID: 0} | |||||
m_TargetDisplay: 0 | |||||
m_TargetEye: 3 | |||||
m_HDR: 1 | |||||
m_AllowMSAA: 1 | |||||
m_AllowDynamicResolution: 0 | |||||
m_ForceIntoRT: 0 | |||||
m_OcclusionCulling: 1 | |||||
m_StereoConvergence: 10 | |||||
m_StereoSeparation: 0.022 | |||||
--- !u!4 &843646324 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 843646321} | |||||
m_LocalRotation: {x: 0.33499312, y: -0, z: -0, w: 0.9422206} | |||||
m_LocalPosition: {x: 0.89, y: 7.04, z: -7.58} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 0 | |||||
m_LocalEulerAnglesHint: {x: 39.144, y: 0, z: 0} | |||||
--- !u!1 &1713353743 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 1713353747} | |||||
- component: {fileID: 1713353746} | |||||
- component: {fileID: 1713353745} | |||||
- component: {fileID: 1713353744} | |||||
m_Layer: 0 | |||||
m_Name: Sphere | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!135 &1713353744 | |||||
SphereCollider: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 1713353743} | |||||
m_Material: {fileID: 0} | |||||
m_IsTrigger: 0 | |||||
m_Enabled: 1 | |||||
serializedVersion: 2 | |||||
m_Radius: 0.5 | |||||
m_Center: {x: 0, y: 0, z: 0} | |||||
--- !u!23 &1713353745 | |||||
MeshRenderer: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 1713353743} | |||||
m_Enabled: 1 | |||||
m_CastShadows: 1 | |||||
m_ReceiveShadows: 1 | |||||
m_DynamicOccludee: 1 | |||||
m_MotionVectors: 1 | |||||
m_LightProbeUsage: 1 | |||||
m_ReflectionProbeUsage: 1 | |||||
m_RenderingLayerMask: 4294967295 | |||||
m_Materials: | |||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} | |||||
m_StaticBatchInfo: | |||||
firstSubMesh: 0 | |||||
subMeshCount: 0 | |||||
m_StaticBatchRoot: {fileID: 0} | |||||
m_ProbeAnchor: {fileID: 0} | |||||
m_LightProbeVolumeOverride: {fileID: 0} | |||||
m_ScaleInLightmap: 1 | |||||
m_PreserveUVs: 0 | |||||
m_IgnoreNormalsForChartDetection: 0 | |||||
m_ImportantGI: 0 | |||||
m_StitchLightmapSeams: 0 | |||||
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 | |||||
--- !u!33 &1713353746 | |||||
MeshFilter: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 1713353743} | |||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} | |||||
--- !u!4 &1713353747 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 1713353743} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: -10, y: 0.04, z: -10} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 4 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||||
--- !u!1 &2130458414 | |||||
GameObject: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
serializedVersion: 6 | |||||
m_Component: | |||||
- component: {fileID: 2130458416} | |||||
- component: {fileID: 2130458415} | |||||
m_Layer: 0 | |||||
m_Name: GameManager | |||||
m_TagString: Untagged | |||||
m_Icon: {fileID: 0} | |||||
m_NavMeshLayer: 0 | |||||
m_StaticEditorFlags: 0 | |||||
m_IsActive: 1 | |||||
--- !u!114 &2130458415 | |||||
MonoBehaviour: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 2130458414} | |||||
m_Enabled: 1 | |||||
m_EditorHideFlags: 0 | |||||
m_Script: {fileID: 11500000, guid: 47007430424d8684091e01d8323cdb7e, type: 3} | |||||
m_Name: | |||||
m_EditorClassIdentifier: | |||||
SetSingletonOnAwake: 1 | |||||
isPersistant: 0 | |||||
LocalPlayerPrefab: {fileID: 1359508890942550, guid: 88f2120ea01cef248ba929e8eea4c759, | |||||
type: 2} | |||||
RemotePlayerPrefab: {fileID: 1737980672629790, guid: bdf6a76720f2a98408b6639537d99358, | |||||
type: 2} | |||||
mapTop: {x: 10, y: 1, z: 10} | |||||
mapBot: {x: -10, y: 1, z: -10} | |||||
--- !u!4 &2130458416 | |||||
Transform: | |||||
m_ObjectHideFlags: 0 | |||||
m_CorrespondingSourceObject: {fileID: 0} | |||||
m_PrefabInternal: {fileID: 0} | |||||
m_GameObject: {fileID: 2130458414} | |||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||||
m_LocalPosition: {x: 1.3958592, y: 2.1128974, z: 0.37714672} | |||||
m_LocalScale: {x: 1, y: 1, z: 1} | |||||
m_Children: [] | |||||
m_Father: {fileID: 0} | |||||
m_RootOrder: 3 | |||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 3a82ef4cc5d678b418d3a37252b80f6d | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,52 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using UnityEngine.Networking; | |||||
namespace Multiplayer | |||||
{ | |||||
public class ClientLoginManager | |||||
{ | |||||
private ClientManager ClientManager; | |||||
public ClientLoginManager(ClientManager ClientManager) | |||||
{ | |||||
this.ClientManager = ClientManager; | |||||
RegisterHandlers(); | |||||
} | |||||
private void RegisterHandlers() | |||||
{ | |||||
ClientManager.Client.RegisterHandler(MsgType.Connect, OnConnected); | |||||
ClientManager.Client.RegisterHandler(MsgType.Disconnect, OnDisconnected); | |||||
ClientManager.Client.RegisterHandler(LoginMsgID.QueryName, OnRecieveID); | |||||
} | |||||
private void OnConnected(NetworkMessage msg) | |||||
{ | |||||
ClientManager.IsConnected = true; | |||||
Debug.Log("Successfully connected to server"); | |||||
} | |||||
private void OnDisconnected(NetworkMessage msg) | |||||
{ | |||||
ClientManager.IsConnected = false; | |||||
Debug.Log("Disconnected from Server"); | |||||
} | |||||
private void OnRecieveID(NetworkMessage msg) | |||||
{ | |||||
PlayerMsg playerMsg; | |||||
if (!Utility.ReadMessage<PlayerMsg>(msg, out playerMsg)) | |||||
return; | |||||
Debug.Log("Recieved ID from server: " + playerMsg.ID); | |||||
ClientManager.ID = playerMsg.ID; | |||||
ClientManager.SendMessage(LoginMsgID.Name, new StringMsg(ClientManager.ID, ClientManager.Name)); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 76346cae951d3bd4cb9fb36bbe3de68f | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,63 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using UnityEngine.Networking; | |||||
namespace Multiplayer | |||||
{ | |||||
public class PlayersManager : MonoSingleton<PlayersManager> | |||||
{ | |||||
public GameObject LocalPlayerPrefab; | |||||
public GameObject RemotePlayerPrefab; | |||||
public Vector3 mapTop; | |||||
public Vector3 mapBot; | |||||
private Dictionary<byte, GameObject> RemotePlayers; | |||||
private GameObject PlayerObject; | |||||
private void Start() | |||||
{ | |||||
OnGameStart(); | |||||
} | |||||
public void OnGameStart() | |||||
{ | |||||
ClientManager.Instance.Client.RegisterHandler(PlayerMsgID.Position, RecievePosition); | |||||
InstantaiateLocalPlayer(); | |||||
} | |||||
public void InstantaiateLocalPlayer() | |||||
{ | |||||
Vector3 startPos = new Vector3(Random.Range(mapBot.x, mapTop.x), Random.Range(mapBot.y, mapTop.y), Random.Range(mapBot.z, mapTop.z)); | |||||
PlayerObject = GameObject.Instantiate(LocalPlayerPrefab); | |||||
PlayerObject.transform.position = startPos; | |||||
} | |||||
public void InstantiateRemotePlayer(byte playerID) | |||||
{ | |||||
RemotePlayers.Add(playerID, Instantiate(RemotePlayerPrefab)); | |||||
} | |||||
public void SendPosition(Vector3 position) { | |||||
ClientManager.Instance.SendMessage(PlayerMsgID.Position, new VectorMsg(ClientManager.Instance.ID, position)); | |||||
} | |||||
public void RecievePosition(NetworkMessage msg) | |||||
{ | |||||
VectorMsg vectorMsg; | |||||
if (!Utility.ReadMessage<VectorMsg>(msg, out vectorMsg)) | |||||
return; | |||||
if (!RemotePlayers.ContainsKey(vectorMsg.ID)) | |||||
InstantiateRemotePlayer(vectorMsg.ID); | |||||
RemotePlayers[vectorMsg.ID].transform.position = vectorMsg.vector; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 47007430424d8684091e01d8323cdb7e | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,50 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using UnityEngine.Networking; | |||||
namespace Multiplayer | |||||
{ | |||||
public class PlayerServerManager | |||||
{ | |||||
private ServerManager ServerManager; | |||||
public PlayerServerManager(ServerManager ServerManager) | |||||
{ | |||||
this.ServerManager = ServerManager; | |||||
RegisterHandlers(); | |||||
} | |||||
private void RegisterHandlers() | |||||
{ | |||||
ServerManager.Server.RegisterHandler(PlayerMsgID.Position, RecievePosition); | |||||
} | |||||
private void RecievePosition(NetworkMessage msg) | |||||
{ | |||||
VectorMsg vectorMsg; | |||||
if (!Utility.ReadMessage<VectorMsg>(msg, out vectorMsg)) | |||||
return; | |||||
if (!ServerManager.AllPlayers.ContainsKey(vectorMsg.ID)) | |||||
{ | |||||
Debug.Log("Recieved position from unknown player"); | |||||
return; | |||||
} | |||||
Player player = ServerManager.AllPlayers[vectorMsg.ID]; | |||||
player.Position = vectorMsg.vector; | |||||
foreach(Player otherPlayer in ServerManager.AllPlayers.Values) | |||||
{ | |||||
if (otherPlayer.Equals(player)) | |||||
continue; | |||||
otherPlayer.Connection.Send(PlayerMsgID.Position, vectorMsg); | |||||
} | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 5e4c34eff406f78479e8bdee3a395684 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,30 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
public class TestPlayerScript : MonoBehaviour { | |||||
private Vector3 lastSentPos; | |||||
public float moveIncrement = 0.01f; | |||||
// Use this for initialization | |||||
void Start () { | |||||
SendPosition(); | |||||
} | |||||
// Update is called once per frame | |||||
void FixedUpdate () { | |||||
if (Vector3.Distance(lastSentPos, transform.position) > moveIncrement) | |||||
SendPosition(); | |||||
} | |||||
private void SendPosition() | |||||
{ | |||||
lastSentPos = transform.position; | |||||
Multiplayer.VectorMsg msg = new Multiplayer.VectorMsg(Multiplayer.ClientManager.Instance.ID, transform.position); | |||||
Multiplayer.ClientManager.Instance.SendMessage(Multiplayer.PlayerMsgID.Position, msg); | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 381a091376fde4f4cbb8edc78f431073 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: d8f1eb6d7087cce4ba563412eda16744 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,47 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
public class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T> | |||||
{ | |||||
public static T Instance { get; private set; } | |||||
[Header("Singleton Settings")] | |||||
public bool SetSingletonOnAwake; | |||||
public bool isPersistant; | |||||
protected virtual void Awake() | |||||
{ | |||||
if (SetSingletonOnAwake) | |||||
SetAsSingleton(); | |||||
} | |||||
private void SetAsSingleton() | |||||
{ | |||||
if (Instance != null && Instance != this) | |||||
Destroy(this); | |||||
else | |||||
Instance = (T)this; | |||||
if (isPersistant) | |||||
DontDestroyOnLoad(transform.root); | |||||
} | |||||
} | |||||
public class Singleton<T> where T : Singleton<T>, new() | |||||
{ | |||||
private static T instance; | |||||
public static T Instance | |||||
{ | |||||
get | |||||
{ | |||||
if (instance == null) | |||||
instance = new T(); | |||||
return instance; | |||||
} | |||||
private set { } | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b4e0222e29f37a648acb11847629863b | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |