lobby logic & scene changer
This commit is contained in:
parent
f1ac9ff480
commit
31f52ebe22
@ -1,6 +1,6 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1020109951576740017
|
||||
--- !u!1 &5459985167137351245
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -8,7 +8,7 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6425474959734041987}
|
||||
- component: {fileID: 4728270005693517860}
|
||||
m_Layer: 13
|
||||
m_Name: Ground Check
|
||||
m_TagString: Untagged
|
||||
@ -16,22 +16,22 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6425474959734041987
|
||||
--- !u!4 &4728270005693517860
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1020109951576740017}
|
||||
m_GameObject: {fileID: 5459985167137351245}
|
||||
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: 3627778499237767231}
|
||||
m_Father: {fileID: 4039347228969169863}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1542130043484709326
|
||||
--- !u!1 &6693038584351662994
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -39,56 +39,102 @@ GameObject:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3627778499237767231}
|
||||
- component: {fileID: 2513880581377757138}
|
||||
- component: {fileID: 2721593596270903907}
|
||||
- component: {fileID: 8225017633137297660}
|
||||
- component: {fileID: 2010332139361209576}
|
||||
- component: {fileID: 4415314390684914496}
|
||||
m_Layer: 13
|
||||
m_Name: SinglePlayer
|
||||
m_Name: Camera Position
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3627778499237767231
|
||||
--- !u!4 &4415314390684914496
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542130043484709326}
|
||||
m_GameObject: {fileID: 6693038584351662994}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.0000000060839787, y: 9.313219e-10, z: 0.0000000073559923, w: 1}
|
||||
m_LocalPosition: {x: 0.012528062, y: 1.406, z: -0.00451836}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4039347228969169863}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &7779280043360359539
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4039347228969169863}
|
||||
- component: {fileID: 357952661448285421}
|
||||
- component: {fileID: 6729358155849375670}
|
||||
- component: {fileID: 8370227802790125322}
|
||||
- component: {fileID: 2026109778875721217}
|
||||
- component: {fileID: 5903807723166827488}
|
||||
m_Layer: 13
|
||||
m_Name: SinglePlayer
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4039347228969169863
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.954, y: 0.504, z: 0.287}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6369166908221480486}
|
||||
- {fileID: 6425474959734041987}
|
||||
- {fileID: 4415314390684914496}
|
||||
- {fileID: 4728270005693517860}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2513880581377757138
|
||||
--- !u!114 &357952661448285421
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542130043484709326}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 46a00c3facc838940a821200527d741d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
targetCameraPosition: {fileID: 6369166908221480486}
|
||||
targetCameraPosition: {fileID: 4415314390684914496}
|
||||
mouseSensitivity: 100
|
||||
--- !u!114 &2721593596270903907
|
||||
--- !u!114 &6729358155849375670
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542130043484709326}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 412a3d9786034940916fed56cdd6ea30, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxHitDistance: 5
|
||||
canInteract: 0
|
||||
--- !u!114 &8370227802790125322
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fd99aef205414a8fbed18a02894df77e, type: 3}
|
||||
@ -98,20 +144,20 @@ MonoBehaviour:
|
||||
runSpeed: 1200
|
||||
jumpForce: 160
|
||||
groundCheckRadius: 0.14
|
||||
groundCheck: {fileID: 6425474959734041987}
|
||||
groundCheck: {fileID: 4728270005693517860}
|
||||
groundLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
playerRigidbody: {fileID: 0}
|
||||
isGrounded: 0
|
||||
moveDirection: {x: 0, y: 0, z: 0}
|
||||
--- !u!54 &8225017633137297660
|
||||
--- !u!54 &2026109778875721217
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542130043484709326}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
serializedVersion: 4
|
||||
m_Mass: 35
|
||||
m_Drag: 0
|
||||
@ -131,14 +177,14 @@ Rigidbody:
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 112
|
||||
m_CollisionDetection: 1
|
||||
--- !u!136 &2010332139361209576
|
||||
m_CollisionDetection: 0
|
||||
--- !u!136 &5903807723166827488
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542130043484709326}
|
||||
m_GameObject: {fileID: 7779280043360359539}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
@ -155,34 +201,3 @@ CapsuleCollider:
|
||||
m_Height: 1.8
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.79, z: 0}
|
||||
--- !u!1 &3196624938479678190
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6369166908221480486}
|
||||
m_Layer: 13
|
||||
m_Name: Camera Position
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6369166908221480486
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3196624938479678190}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.0000000060839787, y: 9.313219e-10, z: 0.0000000073559923, w: 1}
|
||||
m_LocalPosition: {x: 0.012528062, y: 1.406, z: -0.00451836}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3627778499237767231}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -319,98 +319,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1804006492
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1804006495}
|
||||
- component: {fileID: 1804006494}
|
||||
- component: {fileID: 1804006493}
|
||||
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 &1804006493
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1804006492}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1804006494
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1804006492}
|
||||
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_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
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 &1804006495
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1804006492}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
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 &1912189261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -529,12 +437,163 @@ MonoBehaviour:
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
m_SoftShadowQuality: 0
|
||||
--- !u!1 &2034334972
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2034334977}
|
||||
- component: {fileID: 2034334976}
|
||||
- component: {fileID: 2034334975}
|
||||
- component: {fileID: 2034334974}
|
||||
- component: {fileID: 2034334973}
|
||||
m_Layer: 11
|
||||
m_Name: Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2034334973
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2034334972}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fbc9d11c053e4cf9b3f111038086b924, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
networkManager: {fileID: 0}
|
||||
--- !u!114 &2034334974
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2034334972}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
--- !u!81 &2034334975
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2034334972}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &2034334976
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2034334972}
|
||||
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_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 1000
|
||||
field of view: 75
|
||||
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 &2034334977
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2034334972}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.616, 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!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1804006495}
|
||||
- {fileID: 1912189263}
|
||||
- {fileID: 1097648560}
|
||||
- {fileID: 1605475492}
|
||||
- {fileID: 653659872}
|
||||
- {fileID: 2034334977}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,14 +4,15 @@ using System.Linq;
|
||||
using Mirror;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class CustomNetworkManager : NetworkManager
|
||||
{
|
||||
[Scene] public string menuScene;
|
||||
public NetworkRoomPlayerLobby roomPlayerPrefab;
|
||||
public List<NetworkRoomPlayerLobby> RoomPlayers = new List<NetworkRoomPlayerLobby>();
|
||||
[SerializeField] public NetworkRoomPlayerLobby gamePlayerPrefab;
|
||||
public List<NetworkRoomPlayerLobby> GamePlayers = new List<NetworkRoomPlayerLobby>();
|
||||
public GameObject PlayerInMenu;
|
||||
|
||||
[Scene] public string menuScene = "Menu";
|
||||
// public static event Action OnClientConnected;
|
||||
// public static event Action OnClientDisconnected;
|
||||
|
||||
@ -37,13 +38,13 @@ public class CustomNetworkManager : NetworkManager
|
||||
public override void OnServerAddPlayer(NetworkConnectionToClient conn)
|
||||
{
|
||||
Debug.Log("OnServerAddPlayer");
|
||||
if (SceneManager.GetActiveScene().name == "Menu")
|
||||
{
|
||||
NetworkRoomPlayerLobby roomPlayerInstance = Instantiate(roomPlayerPrefab);
|
||||
NetworkServer.AddPlayerForConnection(conn, roomPlayerInstance.gameObject);
|
||||
RoomPlayers.Add( conn.identity.GetComponent<NetworkRoomPlayerLobby>());
|
||||
// if (SceneManager.GetActiveScene().path == menuScene)
|
||||
// {
|
||||
NetworkRoomPlayerLobby player = Instantiate(gamePlayerPrefab);
|
||||
NetworkServer.AddPlayerForConnection(conn, player.gameObject);
|
||||
GamePlayers.Add( conn.identity.GetComponent<NetworkRoomPlayerLobby>());
|
||||
Debug.Log("Player added");
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public override void OnServerDisconnect(NetworkConnectionToClient conn)
|
||||
@ -55,7 +56,7 @@ public class CustomNetworkManager : NetworkManager
|
||||
// ReSharper disable once Unity.PerformanceCriticalCodeInvocation
|
||||
var player = networkIdentity.GetComponent<NetworkRoomPlayerLobby>();
|
||||
|
||||
RoomPlayers.Remove(player);
|
||||
GamePlayers.Remove(player);
|
||||
}
|
||||
Debug.Log("disconnected from Server");
|
||||
|
||||
@ -65,7 +66,7 @@ public class CustomNetworkManager : NetworkManager
|
||||
|
||||
public override void OnServerChangeScene(string newSceneName)
|
||||
{
|
||||
if (newSceneName == "Menu")
|
||||
if (newSceneName == menuScene)
|
||||
{
|
||||
Instantiate(PlayerInMenu);
|
||||
}
|
||||
@ -74,6 +75,33 @@ public class CustomNetworkManager : NetworkManager
|
||||
public override void OnStopServer()
|
||||
{
|
||||
// Instantiate(PlayerInMenu);
|
||||
RoomPlayers.Clear();
|
||||
GamePlayers.Clear();
|
||||
}
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
ServerChangeScene("Demo");
|
||||
Debug.Log("GAME STARTING");
|
||||
}
|
||||
|
||||
// public override void ServerChangeScene(string newSceneName)
|
||||
// {
|
||||
// Debug.Log("sss");
|
||||
// if(SceneManager.GetActiveScene().path == menuScene && newSceneName.StartsWith("Demo"))
|
||||
// {
|
||||
// Debug.Log("YES");
|
||||
// int newNum = GamePlayers.Count;
|
||||
// for (int i = 0; i < newNum; i++)
|
||||
// {
|
||||
// var conn = GamePlayers[0].connectionToClient;
|
||||
// var gameplayerInstance = Instantiate(gamePlayerPrefab);
|
||||
// Debug.Log(gameplayerInstance.transform.position);
|
||||
//
|
||||
// NetworkServer.Destroy(conn.identity.gameObject);
|
||||
// NetworkServer.ReplacePlayerForConnection(conn, gameplayerInstance.gameObject, true);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// base.ServerChangeScene(newSceneName);
|
||||
// }
|
||||
}
|
||||
|
31
Assets/Scripts/Interactive/StartGameButton.cs
Normal file
31
Assets/Scripts/Interactive/StartGameButton.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using Mirror;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Interactive
|
||||
{
|
||||
public class StartGameButton : NetworkBehaviour, IInteractable
|
||||
{
|
||||
private CustomNetworkManager _networkManager;
|
||||
|
||||
void Start()
|
||||
{
|
||||
_networkManager = NetworkManager.singleton.GetComponent<CustomNetworkManager>();
|
||||
if (_networkManager.GamePlayers.Count > 0)
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Interact()
|
||||
{
|
||||
StartGame();
|
||||
}
|
||||
|
||||
[Command(requiresAuthority = false)]
|
||||
void StartGame()
|
||||
{
|
||||
_networkManager.StartGame();
|
||||
}
|
||||
}
|
||||
}
|
3
Assets/Scripts/Interactive/StartGameButton.cs.meta
Normal file
3
Assets/Scripts/Interactive/StartGameButton.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b2a4cdfd8ee44db874791cf67fa76cb
|
||||
timeCreated: 1729196415
|
@ -13,11 +13,11 @@ https://github.com/DapperDino/Unity-Multiplayer-Tutorials-Old/tree/main
|
||||
+Сделать для ноутбука Interactable и скрипт в игроке
|
||||
состояние персонажа типо за компом
|
||||
|
||||
Сделать выбор персонажа рандомным, днорукий бандит (аля игра где 3 семерки выпасть может из казино) и меняется персонаж
|
||||
Сделать выбор персонажа рандомным, днорукий бандит (аля игра где 3 семерки выпасть может из казино) и меняется персонаж. Смотришь со стороны. Добавить к появлению орные звуки и анимацию
|
||||
|
||||
Разные персонажи - разные читы
|
||||
|
||||
Например персонаж со спидхаком постоянным, оч быстро стреляет бегает прыгает
|
||||
персонаж со спидхаком постоянным, оч быстро стреляет бегает прыгает
|
||||
Персонаж с аимботом, без предикшена
|
||||
С предикшеном
|
||||
С есп
|
||||
|
Loading…
x
Reference in New Issue
Block a user