mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 20:52:10 +01:00
added network movement
This commit is contained in:
@@ -1,5 +1,87 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &681358948229890261
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4399039561386292163}
|
||||||
|
- component: {fileID: 2732428023354893519}
|
||||||
|
- component: {fileID: 3713494182464178449}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cube
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4399039561386292163
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 681358948229890261}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0.3586286, y: -0.5799999, z: -0.03139314}
|
||||||
|
m_LocalScale: {x: 0.8, y: 0.2, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 981273033772084037}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &2732428023354893519
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 681358948229890261}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &3713494182464178449
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 681358948229890261}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
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_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
--- !u!1 &6272346181302961293
|
--- !u!1 &6272346181302961293
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -13,6 +95,8 @@ GameObject:
|
|||||||
- component: {fileID: 6272346181302961294}
|
- component: {fileID: 6272346181302961294}
|
||||||
- component: {fileID: 6272346181302961297}
|
- component: {fileID: 6272346181302961297}
|
||||||
- component: {fileID: 3531617101327355807}
|
- component: {fileID: 3531617101327355807}
|
||||||
|
- component: {fileID: -8507936531325900294}
|
||||||
|
- component: {fileID: 971192117167709236}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Player
|
m_Name: Player
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
@@ -32,8 +116,8 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2458562619286483438}
|
- {fileID: 2458562619286483438}
|
||||||
- {fileID: 6272346181657429396}
|
|
||||||
- {fileID: 6272346182417644039}
|
- {fileID: 6272346182417644039}
|
||||||
|
- {fileID: 981273033772084037}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@@ -68,7 +152,12 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
playerCamera: {fileID: 6272346181657429396}
|
playerCamera: {fileID: 6272346181657429396}
|
||||||
|
playerNeck: {fileID: 981273033772084037}
|
||||||
mouseSensitivity: 4
|
mouseSensitivity: 4
|
||||||
|
maxCameraAngle: 90
|
||||||
|
neckStartAngle: 0
|
||||||
|
minCameraAngle: -90
|
||||||
|
neckLength: 0.2
|
||||||
mouseSmoothTime: 0
|
mouseSmoothTime: 0
|
||||||
lockCursor: 1
|
lockCursor: 1
|
||||||
walkSpeed: 6
|
walkSpeed: 6
|
||||||
@@ -113,6 +202,68 @@ MonoBehaviour:
|
|||||||
PrefabHashGenerator: Player
|
PrefabHashGenerator: Player
|
||||||
AlwaysReplicateAsRoot: 0
|
AlwaysReplicateAsRoot: 0
|
||||||
DontDestroyWithOwner: 0
|
DontDestroyWithOwner: 0
|
||||||
|
--- !u!114 &-8507936531325900294
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6272346181302961293}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: bfd6cd3bbcb023440832d53f9f1f0041, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
dice:
|
||||||
|
m_InternalValue: 0
|
||||||
|
--- !u!114 &971192117167709236
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6272346181302961293}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
FixedSendsPerSecond: 20
|
||||||
|
AssumeSyncedSends: 1
|
||||||
|
InterpolatePosition: 1
|
||||||
|
SnapDistance: 10
|
||||||
|
InterpolateServer: 1
|
||||||
|
MinMeters: 0.15
|
||||||
|
MinDegrees: 1.5
|
||||||
|
ExtrapolatePosition: 0
|
||||||
|
MaxSendsToExtrapolate: 5
|
||||||
|
Channel:
|
||||||
|
EnableRange: 0
|
||||||
|
EnableNonProvokedResendChecks: 0
|
||||||
|
DistanceSendrate:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 20
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 500
|
||||||
|
value: 20
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0
|
||||||
|
outWeight: 0
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
--- !u!1 &6272346181657429393
|
--- !u!1 &6272346181657429393
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -123,7 +274,6 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 6272346181657429396}
|
- component: {fileID: 6272346181657429396}
|
||||||
- component: {fileID: 6272346181657429395}
|
- component: {fileID: 6272346181657429395}
|
||||||
- component: {fileID: 6272346181657429394}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: Main Camera
|
||||||
m_TagString: MainCamera
|
m_TagString: MainCamera
|
||||||
@@ -138,13 +288,13 @@ Transform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6272346181657429393}
|
m_GameObject: {fileID: 6272346181657429393}
|
||||||
m_LocalRotation: {x: -0, y: -0.67557263, z: -0, w: 0.7372934}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 2, z: 0}
|
m_LocalPosition: {x: 0, y: 2, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 6272346181302961296}
|
m_Father: {fileID: 981273033772084037}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: -84.997, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!20 &6272346181657429395
|
--- !u!20 &6272346181657429395
|
||||||
Camera:
|
Camera:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -188,14 +338,6 @@ Camera:
|
|||||||
m_OcclusionCulling: 1
|
m_OcclusionCulling: 1
|
||||||
m_StereoConvergence: 10
|
m_StereoConvergence: 10
|
||||||
m_StereoSeparation: 0.022
|
m_StereoSeparation: 0.022
|
||||||
--- !u!81 &6272346181657429394
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6272346181657429393}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!1 &6272346182417644038
|
--- !u!1 &6272346182417644038
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -224,6 +366,38 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 6272346181302961296}
|
m_Father: {fileID: 6272346181302961296}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &7061967201775281134
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 981273033772084037}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: neck
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &981273033772084037
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7061967201775281134}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 2.01, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6272346181657429396}
|
||||||
|
- {fileID: 4399039561386292163}
|
||||||
|
m_Father: {fileID: 6272346181302961296}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &8690889598169456425
|
--- !u!1 &8690889598169456425
|
||||||
|
|||||||
@@ -272,6 +272,7 @@ RectTransform:
|
|||||||
- {fileID: 1960893054}
|
- {fileID: 1960893054}
|
||||||
- {fileID: 857589337}
|
- {fileID: 857589337}
|
||||||
- {fileID: 1982097595}
|
- {fileID: 1982097595}
|
||||||
|
- {fileID: 1687081980}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@@ -1050,6 +1051,140 @@ MeshCollider:
|
|||||||
m_Convex: 0
|
m_Convex: 0
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: -8678823145569952518, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
m_Mesh: {fileID: -8678823145569952518, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||||
|
--- !u!1 &1687081979
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1687081980}
|
||||||
|
- component: {fileID: 1687081982}
|
||||||
|
- component: {fileID: 1687081981}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Dice
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1687081980
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1687081979}
|
||||||
|
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_Children: []
|
||||||
|
m_Father: {fileID: 145653193}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 200, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1687081981
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1687081979}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text:
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4281204480
|
||||||
|
m_fontColor: {r: 0, g: 1, b: 0.17560244, a: 1}
|
||||||
|
m_enableVertexGradient: 0
|
||||||
|
m_colorMode: 3
|
||||||
|
m_fontColorGradient:
|
||||||
|
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_fontColorGradientPreset: {fileID: 0}
|
||||||
|
m_spriteAsset: {fileID: 0}
|
||||||
|
m_tintAllSprites: 0
|
||||||
|
m_StyleSheet: {fileID: 0}
|
||||||
|
m_TextStyleHashCode: -1183493901
|
||||||
|
m_overrideHtmlColors: 0
|
||||||
|
m_faceColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4294967295
|
||||||
|
m_fontSize: 36
|
||||||
|
m_fontSizeBase: 36
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 1
|
||||||
|
m_HorizontalAlignment: 2
|
||||||
|
m_VerticalAlignment: 512
|
||||||
|
m_textAlignment: 65535
|
||||||
|
m_characterSpacing: 0
|
||||||
|
m_wordSpacing: 0
|
||||||
|
m_lineSpacing: 0
|
||||||
|
m_lineSpacingMax: 0
|
||||||
|
m_paragraphSpacing: 0
|
||||||
|
m_charWidthMaxAdj: 0
|
||||||
|
m_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_parseCtrlCharacters: 1
|
||||||
|
m_isOrthographic: 1
|
||||||
|
m_isCullingEnabled: 0
|
||||||
|
m_horizontalMapping: 0
|
||||||
|
m_verticalMapping: 0
|
||||||
|
m_uvLineOffset: 0
|
||||||
|
m_geometrySortingOrder: 0
|
||||||
|
m_IsTextObjectScaleStatic: 0
|
||||||
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
|
m_useMaxVisibleDescender: 1
|
||||||
|
m_pageToDisplay: 1
|
||||||
|
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
|
m_isVolumetricText: 0
|
||||||
|
m_hasFontAssetChanged: 0
|
||||||
|
m_baseMaterial: {fileID: 0}
|
||||||
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!222 &1687081982
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1687081979}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &1767188876 stripped
|
--- !u!1 &1767188876 stripped
|
||||||
GameObject:
|
GameObject:
|
||||||
m_CorrespondingSourceObject: {fileID: 281855664364225751, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
m_CorrespondingSourceObject: {fileID: 281855664364225751, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ public class GameMaster : MonoBehaviour
|
|||||||
|
|
||||||
CreateTeam("Orange");
|
CreateTeam("Orange");
|
||||||
CreateTeam("Blue");
|
CreateTeam("Blue");
|
||||||
|
|
||||||
|
MLAPI.NetworkManager.Singleton.StartHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateTeam(string name, int score = 0)
|
private void CreateTeam(string name, int score = 0)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public class Player : MonoBehaviour
|
|||||||
[SerializeField] int health;
|
[SerializeField] int health;
|
||||||
[SerializeField] float SyncIntervalSeconds = 5.0f;
|
[SerializeField] float SyncIntervalSeconds = 5.0f;
|
||||||
[SerializeField] GameObject GameManager;
|
[SerializeField] GameObject GameManager;
|
||||||
|
|
||||||
|
|
||||||
private PlayerMaster playerMaster;
|
private PlayerMaster playerMaster;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using MLAPI;
|
||||||
|
|
||||||
// https://youtu.be/PmIPqGqp8UY
|
// https://youtu.be/PmIPqGqp8UY
|
||||||
// https://youtu.be/n-KX8AeGK7E?t=997
|
// https://youtu.be/n-KX8AeGK7E?t=997
|
||||||
|
|
||||||
public class PlayerController : MonoBehaviour
|
public class PlayerController : NetworkBehaviour
|
||||||
{
|
{
|
||||||
[Header("Mouse Look")]
|
[Header("Mouse Look")]
|
||||||
[SerializeField] private Transform playerCamera = null;
|
[SerializeField] private Transform playerCamera = null;
|
||||||
@@ -47,18 +48,34 @@ public class PlayerController : MonoBehaviour
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
controller = GetComponent<CharacterController>();
|
if (IsLocalPlayer)
|
||||||
if (lockCursor)
|
|
||||||
{
|
{
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
controller = GetComponent<CharacterController>();
|
||||||
Cursor.visible = false;
|
if (lockCursor)
|
||||||
|
{
|
||||||
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
|
Cursor.visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playerCamera.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
UpdateMouseLook();
|
if (IsLocalPlayer)
|
||||||
Grounded();
|
{
|
||||||
UpdateMovement();
|
UpdateMouseLook();
|
||||||
|
Grounded();
|
||||||
|
UpdateMovement();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playerCamera.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void Grounded()
|
private void Grounded()
|
||||||
{
|
{
|
||||||
@@ -72,10 +89,6 @@ public class PlayerController : MonoBehaviour
|
|||||||
currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime);
|
currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime);
|
||||||
fullPitch -= currentMouseDelta.y * mouseSensitivity;
|
fullPitch -= currentMouseDelta.y * mouseSensitivity;
|
||||||
fullPitch = Mathf.Clamp(fullPitch,-maxCameraAngle,-minCameraAngle);
|
fullPitch = Mathf.Clamp(fullPitch,-maxCameraAngle,-minCameraAngle);
|
||||||
//cameraPitch = Mathf.Clamp(fullPitch, -90, 45);
|
|
||||||
|
|
||||||
//neckPitch = Mathf.Clamp(fullPitch, 45, 90);
|
|
||||||
Debug.Log("fullPitch: " + fullPitch);
|
|
||||||
|
|
||||||
if (fullPitch >= neckStartAngle) {
|
if (fullPitch >= neckStartAngle) {
|
||||||
playerNeck.localEulerAngles = Vector3.right * (fullPitch - neckStartAngle);
|
playerNeck.localEulerAngles = Vector3.right * (fullPitch - neckStartAngle);
|
||||||
@@ -88,13 +101,7 @@ public class PlayerController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
playerCamera.position = playerNeck.position;
|
playerCamera.position = playerNeck.position;
|
||||||
playerCamera.position += playerNeck.up * neckLength;
|
playerCamera.position += playerNeck.up * neckLength;
|
||||||
/*
|
|
||||||
playerNeck.localEulerAngles = Vector3.right * neckPitch;
|
|
||||||
playerCamera.localEulerAngles = Vector3.right * cameraPitch;
|
|
||||||
playerCamera.position = playerNeck.position;
|
|
||||||
playerCamera.position += playerNeck.up * neckLength;*/
|
|
||||||
//playerCamera.RotateAround(playerNeck.position, Vector3.right, cameraPitch* Mathf.Deg2Rad - playerCamera.transform.rotation.x);
|
|
||||||
|
|
||||||
transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); //Rotate the hole player if looked sideways (Rotates the player left and right)
|
transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); //Rotate the hole player if looked sideways (Rotates the player left and right)
|
||||||
}
|
}
|
||||||
private void UpdateMovement()
|
private void UpdateMovement()
|
||||||
|
|||||||
28
Assets/Scripts/Player/PlayerNetworkingScript.cs
Normal file
28
Assets/Scripts/Player/PlayerNetworkingScript.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using MLAPI;
|
||||||
|
using MLAPI.NetworkVariable;
|
||||||
|
using MLAPI.Transports;
|
||||||
|
using MLAPI.Messaging;
|
||||||
|
using TMPro;
|
||||||
|
|
||||||
|
public class PlayerNetworkingScript : NetworkBehaviour
|
||||||
|
{
|
||||||
|
public NetworkVariableInt dice = new NetworkVariableInt(new NetworkVariableSettings
|
||||||
|
{
|
||||||
|
WritePermission = NetworkVariablePermission.ServerOnly,
|
||||||
|
ReadPermission = NetworkVariablePermission.Everyone
|
||||||
|
});
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.J))
|
||||||
|
{
|
||||||
|
Debug.Log("J");
|
||||||
|
NetworkManager.Singleton.StopHost();
|
||||||
|
NetworkManager.Singleton.StartClient();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
11
Assets/Scripts/Player/PlayerNetworkingScript.cs.meta
Normal file
11
Assets/Scripts/Player/PlayerNetworkingScript.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bfd6cd3bbcb023440832d53f9f1f0041
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -99,7 +99,7 @@ PlayerSettings:
|
|||||||
xboxEnableFitness: 0
|
xboxEnableFitness: 0
|
||||||
visibleInBackground: 1
|
visibleInBackground: 1
|
||||||
allowFullscreenSwitch: 1
|
allowFullscreenSwitch: 1
|
||||||
fullscreenMode: 1
|
fullscreenMode: 3
|
||||||
xboxSpeechDB: 0
|
xboxSpeechDB: 0
|
||||||
xboxEnableHeadOrientation: 0
|
xboxEnableHeadOrientation: 0
|
||||||
xboxEnableGuest: 0
|
xboxEnableGuest: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user