Added PlayerMovement and other

This commit is contained in:
2026-06-20 16:32:20 +03:00
parent f5c79c7241
commit eca9be620a
25 changed files with 3630 additions and 2200 deletions
@@ -5,177 +5,151 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1437874977583500762, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 1437874977583500762, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_Name
value: Progress Bar - Gradient - Blue
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 150
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_SizeDelta.x
value: 300
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_SizeDelta.y
value: 10
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color1.r
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color1.g
value: 0.6117647
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_SizeDelta.x
value: 300
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_SizeDelta.y
value: 10
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 150
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1437874977583500763, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color2.r
value: 0.68235296
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.g
value: 0.6117647
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color2.g
value: 0.24313726
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.r
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.b
value: 0.7882353
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color1.r
value: 0.29803923
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.g
value: 0.24313726
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color1.g
value: 0.43137255
- target: {fileID: 2157890509039246883, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.r
value: 0.68235296
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.b
value: 0.9607843
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color2.r
value: 0.68235296
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.g
value: 0.43137255
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
propertyPath: Color2.g
value: 0.24313726
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color1.r
value: 0.29803923
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5,
type: 3}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.b
value: 0.7882353
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.g
value: 0.24313726
objectReference: {fileID: 0}
- target: {fileID: 3717123034537721815, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: Color2.r
value: 0.68235296
objectReference: {fileID: 0}
- target: {fileID: 4141557384236912104, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 51cd748984872494e9aca3bc15de37b5, type: 3}
+1 -1
View File
@@ -216,7 +216,7 @@ MonoBehaviour:
Prefabs:
NetworkPrefabsLists:
- {fileID: 11400000, guid: 663d8433359c7294fb75055865735a14, type: 2}
TickRate: 30
TickRate: 60
ClientConnectionBufferTimeout: 10
ConnectionApproval: 0
ConnectionData:
+462 -5
View File
@@ -379,7 +379,7 @@ GameObject:
- component: {fileID: 126682277}
- component: {fileID: 126682276}
- component: {fileID: 126682275}
m_Layer: 0
m_Layer: 8
m_Name: Stairs
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -2306,7 +2306,7 @@ GameObject:
- component: {fileID: 584117528}
- component: {fileID: 584117527}
- component: {fileID: 584117526}
m_Layer: 0
m_Layer: 8
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -2658,7 +2658,7 @@ GameObject:
- component: {fileID: 687489085}
- component: {fileID: 687489084}
- component: {fileID: 687489083}
m_Layer: 0
m_Layer: 8
m_Name: Stairs (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -4615,6 +4615,81 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &774134802
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 774134805}
- component: {fileID: 774134804}
- component: {fileID: 774134803}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &774134803
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 774134802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.29653314, g: 0.5566038, b: 0, 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_Sprite: {fileID: 21300000, guid: 3f8bf846444247c41b8e5ee2f2073f6c, type: 3}
m_Type: 3
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &774134804
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 774134802}
m_CullTransparentMesh: 1
--- !u!224 &774134805
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 774134802}
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: 1200277974}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &803348426
GameObject:
m_ObjectHideFlags: 0
@@ -4694,6 +4769,143 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &973869019
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 973869020}
- component: {fileID: 973869021}
- component: {fileID: 973869022}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &973869020
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 973869019}
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: 1200277974}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &973869021
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 973869019}
m_CullTransparentMesh: 1
--- !u!114 &973869022
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 973869019}
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: 100%
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9deb79b311e1349f6801bb979624df47, type: 2}
m_sharedMaterial: {fileID: 6430788736551228157, guid: 9deb79b311e1349f6801bb979624df47, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, 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: 20.57
m_fontSizeBase: 20.57
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 8192
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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!43 &1012369705
Mesh:
m_ObjectHideFlags: 0
@@ -4859,6 +5071,58 @@ Mesh:
offset: 0
size: 0
path:
--- !u!1 &1200277972
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1200277974}
- component: {fileID: 1200277973}
m_Layer: 5
m_Name: Holder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1200277973
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1200277972}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59027e05b1e47d84d844ed542398d01a, type: 3}
m_Name:
m_EditorClassIdentifier:
healthText: {fileID: 973869022}
healthBar: {fileID: 774134803}
--- !u!224 &1200277974
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1200277972}
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:
- {fileID: 774134805}
- {fileID: 973869020}
m_Father: {fileID: 2146774477}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 11.835815}
m_SizeDelta: {x: 383, y: 23.5}
m_Pivot: {x: 0.5, y: 0}
--- !u!43 &1293374969
Mesh:
m_ObjectHideFlags: 0
@@ -5038,7 +5302,7 @@ GameObject:
- component: {fileID: 1376553207}
- component: {fileID: 1376553206}
- component: {fileID: 1376553205}
m_Layer: 0
m_Layer: 8
m_Name: Ground
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -5227,6 +5491,148 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1383824585
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1383824589}
- component: {fileID: 1383824588}
- component: {fileID: 1383824587}
- component: {fileID: 1383824586}
- component: {fileID: 1383824590}
- component: {fileID: 1383824591}
m_Layer: 5
m_Name: Canvas-Player
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1383824586
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1383824587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1383824588
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 1
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1383824589
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2146774477}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1383824590
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 3532832442
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 0
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &1383824591
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1383824585}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df6776ae1b2a9ea4faec1e9006289f29, type: 3}
m_Name:
m_EditorClassIdentifier:
playerHealthUIController: {fileID: 2146774476}
--- !u!43 &1384276738
Mesh:
m_ObjectHideFlags: 0
@@ -5780,7 +6186,7 @@ GameObject:
- component: {fileID: 2097967100}
- component: {fileID: 2097967099}
- component: {fileID: 2097967098}
m_Layer: 0
m_Layer: 8
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -6118,6 +6524,56 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2146774475
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2146774477}
- component: {fileID: 2146774476}
m_Layer: 5
m_Name: Container-HealthUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2146774476
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2146774475}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44d1556056dfc6f4da444f682c5a8de2, type: 3}
m_Name:
m_EditorClassIdentifier:
view: {fileID: 1200277973}
--- !u!224 &2146774477
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2146774475}
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:
- {fileID: 1200277974}
m_Father: {fileID: 1383824589}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &2417903281996322891
PrefabInstance:
m_ObjectHideFlags: 0
@@ -6200,3 +6656,4 @@ SceneRoots:
- {fileID: 687489088}
- {fileID: 2417903281996322891}
- {fileID: 13746291}
- {fileID: 1383824589}
@@ -14,11 +14,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
IsDefault: 0
List:
- Override: 0
Prefab: {fileID: 2245960613504829429, guid: 1e9db26aa37525e4ab9227927da53137, type: 3}
SourcePrefabToOverride: {fileID: 0}
SourceHashToOverride: 0
OverridingTargetPrefab: {fileID: 0}
- Override: 0
Prefab: {fileID: 2553183295301017937, guid: 4a584a7d7a00d754fb7a6eb84847d496, type: 3}
SourcePrefabToOverride: {fileID: 0}
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 992a538ee10876f4fad54357765c3dd4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

+130
View File
@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 3f8bf846444247c41b8e5ee2f2073f6c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicsMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Physics Material
serializedVersion: 2
m_DynamicFriction: 0
m_StaticFriction: 0
m_Bounciness: 0
m_FrictionCombine: 2
m_BounceCombine: 2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c6102b1a8a795044986ea36d0cbe55c3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:
@@ -160,143 +160,6 @@ MeshRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &1176123984892952064
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7954880842502860370}
- component: {fileID: 4383252625990137070}
- component: {fileID: 8187299151670170284}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7954880842502860370
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1176123984892952064}
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: 6088637548295755029}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0, y: 0}
--- !u!222 &4383252625990137070
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1176123984892952064}
m_CullTransparentMesh: 1
--- !u!114 &8187299151670170284
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1176123984892952064}
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: test
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: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, 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: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 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!1 &1205214087950268742
GameObject:
m_ObjectHideFlags: 0
@@ -571,6 +434,9 @@ GameObject:
- component: {fileID: 3924378418118045030}
- component: {fileID: 5519469453299969230}
- component: {fileID: 912785952882763112}
- component: {fileID: 8786382977880960132}
- component: {fileID: 7845123456789012345}
- component: {fileID: 3541666218759354771}
m_Layer: 0
m_Name: NetworkPlayer
m_TagString: Player
@@ -593,7 +459,6 @@ Transform:
m_Children:
- {fileID: 643528348970133323}
- {fileID: 2142486437948056408}
- {fileID: 6088637548295755029}
- {fileID: 5017856760505747688}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -635,13 +500,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
moveSpeed: 10
playerCamera: {fileID: 358431225805014765}
playerHandCamera: {fileID: 5617290128103056897}
tpvHands: {fileID: 262780200250670577}
fpvHands: {fileID: 149248327471132257}
mouseSensitivity: 2
cameraRoot: {fileID: 2142486437948056408}
--- !u!114 &6885894728237704640
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -672,14 +534,14 @@ MonoBehaviour:
SyncPositionX: 1
SyncPositionY: 1
SyncPositionZ: 1
SyncRotAngleX: 1
SyncRotAngleX: 0
SyncRotAngleY: 1
SyncRotAngleZ: 1
SyncScaleX: 1
SyncScaleY: 1
SyncScaleZ: 1
PositionThreshold: 0.001
RotAngleThreshold: 0.01
SyncRotAngleZ: 0
SyncScaleX: 0
SyncScaleY: 0
SyncScaleZ: 0
PositionThreshold: 0
RotAngleThreshold: 0.00001
ScaleThreshold: 0.01
UseQuaternionSynchronization: 0
UseQuaternionCompression: 0
@@ -702,7 +564,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
maxHealth: 100
healthText: {fileID: 8187299151670170284}
currentHealth:
UpdateTraits:
MinSecondsBetweenUpdates: 0
@@ -737,7 +598,7 @@ CapsuleCollider:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2553183295301017937}
m_Material: {fileID: 0}
m_Material: {fileID: 13400000, guid: c6102b1a8a795044986ea36d0cbe55c3, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
@@ -775,11 +636,84 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 1
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 112
m_CollisionDetection: 2
m_CollisionDetection: 1
--- !u!114 &8786382977880960132
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2553183295301017937}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad25c27019239e149bb32c828a8d9f32, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
playerMovement: {fileID: 7845123456789012345}
playerHealth: {fileID: 1055737657517928686}
playerShoot: {fileID: 3924378418118045030}
playerUIController: {fileID: 0}
--- !u!114 &7845123456789012345
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2553183295301017937}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1e2a76beda2b2fb4aa4bab0306e24560, type: 3}
m_Name:
m_EditorClassIdentifier:
walkSpeed: 8
sprintSpeed: 16
groundAcceleration: 90
airAcceleration: 35
groundDeceleration: 70
jumpHeight: 1.6
coyoteTime: 0.12
jumpBufferTime: 0.12
gravity: -28
fallMultiplier: 1.6
lowJumpMultiplier: 2.5
maxFallSpeed: -40
stepOffset: 0.4
slopeLimit: 50
groundStickForce: -4
mouseSensitivity: 2
cameraRoot: {fileID: 2142486437948056408}
minPitch: -89
maxPitch: 89
--- !u!143 &3541666218759354771
CharacterController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2553183295301017937}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Height: 2
m_Radius: 0.5
m_SlopeLimit: 50
m_StepOffset: 0.4
m_SkinWidth: 0.08
m_MinMoveDistance: 0.001
m_Center: {x: 0, y: 1, z: 0}
--- !u!1 &3046942642847312462
GameObject:
m_ObjectHideFlags: 0
@@ -1181,123 +1115,6 @@ MeshRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4649230851043662640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6088637548295755029}
- component: {fileID: 3728548608008949096}
- component: {fileID: 7027885826609405813}
- component: {fileID: 5316955344742389547}
- component: {fileID: 369840709818755588}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6088637548295755029
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649230851043662640}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7954880842502860370}
m_Father: {fileID: 2264751121530880260}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &3728548608008949096
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649230851043662640}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 1
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &7027885826609405813
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649230851043662640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &5316955344742389547
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649230851043662640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &369840709818755588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4649230851043662640}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df6776ae1b2a9ea4faec1e9006289f29, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
hudCanvas: {fileID: 3728548608008949096}
--- !u!1 &5009018705790251557
GameObject:
m_ObjectHideFlags: 0
@@ -1373,7 +1190,7 @@ Camera:
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 183
m_Bits: 439
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
@@ -3,19 +3,11 @@ using UnityEngine;
public class PlayerController : NetworkBehaviour
{
[SerializeField] private float moveSpeed = 5f;
[SerializeField] private Camera playerCamera;
[SerializeField] private Camera playerHandCamera;
[SerializeField] private GameObject tpvHands;
[SerializeField] private GameObject fpvHands;
[SerializeField] private float mouseSensitivity = 2f;
[SerializeField] private Transform cameraRoot;
float verticalRotation = 0f;
public override void OnNetworkSpawn()
{
if (playerCamera != null)
@@ -38,39 +30,5 @@ public class PlayerController : NetworkBehaviour
{
meshRenderer.material.color = playerColor;
}
// if (IsOwner)
// {
// transform.position = new Vector3(Random.Range(-10f, 10f), 1f, Random.Range(-10f, 10f));
// }
}
public void Update()
{
if(!IsOwner) return;
HandleMovement();
HandleRotation();
}
private void HandleMovement()
{
float _moveX = Input.GetAxis("Horizontal");
float _moveZ = Input.GetAxis("Vertical");
Vector3 move = transform.right * _moveX + transform.forward * _moveZ;
transform.position += move * moveSpeed * Time.deltaTime;
}
private void HandleRotation()
{
float _mouseX = Input.GetAxis("Mouse X") * mouseSensitivity;
float _mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity;
transform.Rotate(Vector3.up * _mouseX);
verticalRotation -= _mouseY;
verticalRotation = Mathf.Clamp(verticalRotation, -90f, 90f);
cameraRoot.localRotation = Quaternion.Euler(verticalRotation, 0f, 0f);
}
}
@@ -0,0 +1,51 @@
using UnityEngine;
using Unity.Netcode;
using System.Collections;
public class PlayerFacade : NetworkBehaviour
{
// [SerializeField] private PlayerController playerController;
[SerializeField] private PlayerMovement playerMovement;
[SerializeField] private PlayerHealth playerHealth;
[SerializeField] private PlayerShoot playerShoot;
[SerializeField] private PlayerUIController playerUIController;
public PlayerHealth PlayerHealth => playerHealth;
public override void OnNetworkSpawn()
{
if(IsOwner)
{
StartCoroutine(InitPlayerUIController());
if(playerMovement != null)
{
playerMovement.Init();
}
if(playerShoot != null)
{
playerShoot.Init();
}
}
if(playerHealth != null)
{
playerHealth.Init(IsServer);
}
}
private IEnumerator InitPlayerUIController()
{
yield return new WaitUntil(() =>
{
playerUIController = FindFirstObjectByType<PlayerUIController>();
return playerUIController != null;
});
if(playerUIController != null)
{
playerUIController.Init(this);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ad25c27019239e149bb32c828a8d9f32
@@ -1,11 +1,11 @@
using UnityEngine;
using Unity.Netcode;
using TMPro;
using System;
public class PlayerHealth : NetworkBehaviour
{
[SerializeField] private int maxHealth = 100;
[SerializeField] private TMP_Text healthText;
public NetworkVariable<int> currentHealth = new NetworkVariable<int>(
100,
@@ -15,56 +15,41 @@ public class PlayerHealth : NetworkBehaviour
public NetworkVariable<bool> isDead = new NetworkVariable<bool>(false);
public override void OnNetworkSpawn()
public event Action<int, int> HealthChanged;
public event Action Died;
private bool isServer;
public void Init(bool _isServer)
{
isServer = _isServer;
currentHealth.OnValueChanged += OnHealthChanged;
if (IsServer)
if(isServer)
{
currentHealth.Value = maxHealth;
RoundManager.Current?.RegisterPlayer(OwnerClientId);
}
healthText.text = $"Health: {maxHealth}";
HealthChanged?.Invoke(currentHealth.Value, maxHealth);
}
private void OnHealthChanged(int _previousValue, int _newValue)
{
Debug.Log($"Health changed from {_previousValue} to {_newValue}");
HealthChanged?.Invoke(_newValue, maxHealth);
healthText.text = $"Health: {_newValue}";
}
public void TakeDamage(int _damageAmount)
{
if (!IsServer) return;
if(isDead.Value) return;
if (RoundManager.Current == null || !RoundManager.Current.IsRoundActive) return;
currentHealth.Value = Mathf.Max(0, currentHealth.Value - _damageAmount);
if (currentHealth.Value <= 0)
if(_newValue <= 0)
{
Die();
}
}
private void Die()
public void TakeDamage(int _damageAmount)
{
if(!IsServer) return;
isDead.Value = true;
OnDiedClientRpc();
if (!isServer) return;
if(isDead.Value) return;
// RoundManager.Current?.OnPlayerDied(this);
}
[ClientRpc]
private void OnDiedClientRpc()
{
Debug.Log($"Player {OwnerClientId} died");
SetPhysicsAndVisualsActive(false);
currentHealth.Value = Mathf.Max(0, currentHealth.Value - _damageAmount);
}
public override void OnNetworkDespawn()
@@ -72,15 +57,36 @@ public class PlayerHealth : NetworkBehaviour
currentHealth.OnValueChanged -= OnHealthChanged;
}
private void Die()
{
if(!isServer) return;
isDead.Value = true;
OnDiedClientRpc();
}
public void Respawn(Vector3 _spawnPosition)
{
if(!IsServer) return;
if(!isServer) return;
isDead.Value = false;
currentHealth.Value = maxHealth;
RespawnClientRpc(_spawnPosition);
}
public void PushCurrentHealthValue()
{
HealthChanged?.Invoke(currentHealth.Value, maxHealth);
}
[ClientRpc]
private void OnDiedClientRpc()
{
Debug.Log($"Player {OwnerClientId} died");
SetPhysicsAndVisualsActive(false);
Died?.Invoke();
}
[ClientRpc]
private void RespawnClientRpc(Vector3 _spawnPosition)
{
@@ -96,6 +102,15 @@ public class PlayerHealth : NetworkBehaviour
foreach (MeshRenderer meshRenderer in GetComponentsInChildren<MeshRenderer>())
meshRenderer.enabled = _isActive;
GetComponent<Rigidbody>().isKinematic = !_isActive;
Rigidbody rigidbody = GetComponent<Rigidbody>();
if (rigidbody == null) return;
rigidbody.isKinematic = !_isActive;
if (_isActive)
{
rigidbody.linearVelocity = Vector3.zero;
rigidbody.angularVelocity = Vector3.zero;
}
}
}
@@ -0,0 +1,18 @@
using UnityEngine;
public class PlayerHealthUIController : MonoBehaviour
{
[SerializeField] private PlayerHealthView view;
public void Bind(PlayerHealth _playerHealth)
{
_playerHealth.HealthChanged += OnHealthChanged;
_playerHealth.PushCurrentHealthValue();
}
public void OnHealthChanged(int _currentHealth, int _maxHealth)
{
view.UpdateHealth(_currentHealth, _maxHealth);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 44d1556056dfc6f4da444f682c5a8de2
@@ -0,0 +1,15 @@
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class PlayerHealthView : MonoBehaviour
{
[SerializeField] private TMP_Text healthText;
[SerializeField] private Image healthBar;
public void UpdateHealth(int _currentHealth, int _maxHealth)
{
healthText.text = $"{_currentHealth}/{_maxHealth}";
healthBar.fillAmount = (float)_currentHealth / _maxHealth;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 59027e05b1e47d84d844ed542398d01a
@@ -0,0 +1,235 @@
using UnityEngine;
/// <summary>
/// Отзывчивый аркадный FPS-контроллер на CharacterController.
/// Move() вызывается в Update — движение плавное на частоте кадров без интерполяции.
/// Step offset и slope limit — встроенные в CharacterController.
/// Init() вызывается из PlayerFacade только у владельца.
/// </summary>
[RequireComponent(typeof(CharacterController))]
public class PlayerMovement : MonoBehaviour
{
[Header("Speed")]
[SerializeField] private float walkSpeed = 8f;
[SerializeField] private float sprintSpeed = 12f;
[Header("Acceleration")]
[SerializeField] private float groundAcceleration = 80f; // как быстро набираем скорость на земле
[SerializeField] private float airAcceleration = 30f; // управление в воздухе
[SerializeField] private float groundDeceleration = 60f; // трение/торможение при отпускании клавиш
[Header("Jump")]
[SerializeField] private float jumpHeight = 1.6f; // желаемая высота прыжка в метрах
[SerializeField] private float coyoteTime = 0.12f; // окно прыжка после схода с края
[SerializeField] private float jumpBufferTime = 0.12f; // окно "запоминания" нажатия прыжка
[Header("Gravity")]
[SerializeField] private float gravity = -28f; // выше реального -9.81 = более аркадно/отзывчиво
[SerializeField] private float fallMultiplier = 1.6f; // падаем тяжелее — меньше "плавучести"
[SerializeField] private float lowJumpMultiplier = 2.5f; // отпустил прыжок раньше = короткий прыжок
[SerializeField] private float maxFallSpeed = -40f; // ограничение скорости падения
[Header("Ground / Steps / Slopes")]
[SerializeField] private float stepOffset = 0.4f; // высота ступеньки на которую можно зайти
[SerializeField] private float slopeLimit = 50f; // макс. угол склона
[SerializeField] private float groundStickForce = -4f; // прижим к земле чтобы не отрывало на спусках
[Header("Look")]
[SerializeField] private float mouseSensitivity = 2f;
[SerializeField] private Transform cameraRoot;
[SerializeField] private float minPitch = -89f;
[SerializeField] private float maxPitch = 89f;
private CharacterController controller;
private PlayerHealth playerHealth;
private bool isActive;
// Горизонтальная скорость (x, z) — храним между кадрами для инерции
private Vector3 horizontalVelocity;
private float verticalVelocity;
// Look
private float pitch;
// Jump timers
private float coyoteCounter;
private float jumpBufferCounter;
public void Init()
{
controller = GetComponent<CharacterController>();
playerHealth = GetComponent<PlayerHealth>();
// Встроенные возможности CharacterController — задаём из инспектора
controller.stepOffset = stepOffset;
controller.slopeLimit = slopeLimit;
// // Прячем курсор — только у владельца, Init для не-владельца не вызывается
// Cursor.lockState = CursorLockMode.Locked;
// Cursor.visible = false;
isActive = true;
}
private void Update()
{
if (!isActive) return;
// Esc — освободить курсор (удобно в редакторе)
// if (Input.GetKeyDown(KeyCode.Escape))
// {
// Cursor.lockState = CursorLockMode.None;
// Cursor.visible = true;
// }
if (IsMovementBlocked())
{
// Мёртвый стоит — гасим горизонталь, но гравитацию оставляем
horizontalVelocity = Vector3.zero;
ApplyGravityOnly();
return;
}
HandleLookYaw(); // поворот тела по горизонтали — здесь, камера-ребёнок следует за ним
UpdateJumpTimers();
HandleHorizontal();
HandleJumpAndGravity();
// Один общий Move за кадр — и горизонталь, и вертикаль
Vector3 velocity = horizontalVelocity + Vector3.up * verticalVelocity;
controller.Move(velocity * Time.deltaTime);
}
private void LateUpdate()
{
if (!isActive) return;
// Наклон камеры (pitch) — после движения, чтобы не было микро-дрожи
cameraRoot.localRotation = Quaternion.Euler(pitch, 0f, 0f);
}
private bool IsMovementBlocked()
{
return playerHealth != null && playerHealth.isDead.Value;
}
// ── LOOK ──────────────────────────────────────────────
private void HandleLookYaw()
{
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity;
transform.Rotate(Vector3.up * mouseX);
float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity;
pitch = Mathf.Clamp(pitch - mouseY, minPitch, maxPitch);
}
// ── HORIZONTAL MOVEMENT ───────────────────────────────
private void HandleHorizontal()
{
Vector3 input = new Vector3(Input.GetAxisRaw("Horizontal"), 0f, Input.GetAxisRaw("Vertical"));
input = Vector3.ClampMagnitude(input, 1f);
Vector3 wishDirection = transform.right * input.x + transform.forward * input.z;
bool isSprinting = Input.GetKey(KeyCode.LeftShift);
float targetSpeed = isSprinting ? sprintSpeed : walkSpeed;
bool grounded = controller.isGrounded;
if (wishDirection.sqrMagnitude > 0.01f)
{
// Есть ввод — разгоняемся к целевой скорости
float acceleration = grounded ? groundAcceleration : airAcceleration;
Vector3 targetVelocity = wishDirection * targetSpeed;
horizontalVelocity = Vector3.MoveTowards(
horizontalVelocity,
targetVelocity,
acceleration * Time.deltaTime
);
}
else if (grounded)
{
// Нет ввода на земле — тормозим до нуля (трение)
horizontalVelocity = Vector3.MoveTowards(
horizontalVelocity,
Vector3.zero,
groundDeceleration * Time.deltaTime
);
}
// В воздухе без ввода — сохраняем импульс (момент инерции)
}
// ── JUMP & GRAVITY ────────────────────────────────────
private void UpdateJumpTimers()
{
if (controller.isGrounded)
coyoteCounter = coyoteTime;
else
coyoteCounter -= Time.deltaTime;
if (Input.GetButtonDown("Jump"))
jumpBufferCounter = jumpBufferTime;
else
jumpBufferCounter -= Time.deltaTime;
}
private void HandleJumpAndGravity()
{
bool grounded = controller.isGrounded;
// Прижим к земле — иначе на спусках и ступеньках вниз отрывает в "полёт"
if (grounded && verticalVelocity < 0f)
verticalVelocity = groundStickForce;
// Прыжок: есть буфер нажатия И есть coyote-окно
if (jumpBufferCounter > 0f && coyoteCounter > 0f)
{
jumpBufferCounter = 0f;
coyoteCounter = 0f;
// Скорость из желаемой высоты: v = sqrt(2 * h * g)
verticalVelocity = Mathf.Sqrt(jumpHeight * -2f * gravity);
}
ApplyGravity(grounded);
}
private void ApplyGravity(bool grounded)
{
if (grounded && verticalVelocity <= 0f)
return; // на земле гравитацию не копим (кроме прыжка вверх)
float g = gravity;
if (verticalVelocity < 0f)
{
g *= fallMultiplier; // падаем — тяжелее
}
else if (verticalVelocity > 0f && !Input.GetButton("Jump"))
{
g *= lowJumpMultiplier; // отпустил прыжок — короткий хоп
}
verticalVelocity += g * Time.deltaTime;
verticalVelocity = Mathf.Max(verticalVelocity, maxFallSpeed);
}
// Используется когда движение заблокировано (смерть) — только падение
private void ApplyGravityOnly()
{
if (controller == null) return;
if (controller.isGrounded && verticalVelocity < 0f)
verticalVelocity = groundStickForce;
else
{
verticalVelocity += gravity * Time.deltaTime;
verticalVelocity = Mathf.Max(verticalVelocity, maxFallSpeed);
}
controller.Move(Vector3.up * verticalVelocity * Time.deltaTime);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1e2a76beda2b2fb4aa4bab0306e24560
@@ -11,22 +11,32 @@ public class PlayerShoot : NetworkBehaviour
private PlayerHealth playerHealth;
public override void OnNetworkSpawn()
private bool isActive = false;
public void Init()
{
if (IsOwner)
{
playerHealth = GetComponent<PlayerHealth>();
if (playerHealth == null)
{
Debug.LogError("PlayerHealth component not found on player");
}
}
isActive = true;
}
// public override void OnNetworkSpawn()
// {
// if (IsOwner)
// {
// playerHealth = GetComponent<PlayerHealth>();
// if (playerHealth == null)
// {
// Debug.LogError("PlayerHealth component not found on player");
// }
// }
// }
void Update()
{
if (!IsOwner) return;
if(!isActive) return;
playerHealth = GetComponent<PlayerHealth>();
if(playerHealth == null || playerHealth.isDead.Value) return;
if (Input.GetMouseButtonDown(0))
@@ -59,7 +69,7 @@ public class PlayerShoot : NetworkBehaviour
[ClientRpc]
private void SpawnHitEffectClientRpc(Vector3 _hitPosition)
{
Debug.Log($"Spawning hit effect at {_hitPosition}");
// Debug.Log($"Spawning hit effect at {_hitPosition}");
Instantiate(hitEffectPrefab, _hitPosition, Quaternion.identity);
}
}
@@ -1,17 +1,25 @@
using UnityEngine;
using Unity.Netcode;
using System.Collections;
using TMPro;
public class PlayerUIController : NetworkBehaviour
public class PlayerUIController : MonoBehaviour
{
[SerializeField] private Canvas hudCanvas;
[SerializeField] private PlayerHealthUIController playerHealthUIController;
public IEnumerator Start()
private PlayerFacade playerFacade;
private bool isActive = false;
public void Init(PlayerFacade _playerFacade)
{
NetworkObject _netObj = GetComponentInParent<NetworkObject>();
isActive = true;
yield return new WaitUntil(() => _netObj != null);
playerFacade = _playerFacade;
playerHealthUIController.Bind(playerFacade.PlayerHealth);
hudCanvas.enabled = _netObj.IsOwner;
}
}
@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.Netcode;
using UnityEngine;
@@ -28,6 +29,9 @@ public class RoundManager : NetworkBehaviour
[SerializeField] private float roundStartDelay = 3f;
[SerializeField] private Transform[] spawnPoints;
private NetworkVariable<float> roundDuration = new NetworkVariable<float>(180f);
private NetworkVariable<float> roundTimeRemaining = new NetworkVariable<float>(0f);
private NetworkVariable<int> currentRound = new NetworkVariable<int>(0);
private NetworkVariable<bool> isRoundActive = new NetworkVariable<bool>(false);
@@ -35,24 +39,51 @@ public class RoundManager : NetworkBehaviour
private NetworkList<PlayerScore> playerScores;
void Awake()
{
Current = this;
playerScores = new NetworkList<PlayerScore>();
}
private bool isTimerRunning = false;
public override void OnNetworkSpawn()
{
currentRound.OnValueChanged += OnRoundChanged;
isRoundActive.OnValueChanged += OnRoundStateChanged;
// roundTimeRemaining.OnValueChanged += OnTimerChanged;
if (IsServer)
{
// StartTimerServerRPC();
StartCoroutine(StartRoundWithDelay());
}
}
private void Update()
{
if (!IsServer) return;
if(!IsRoundActive) return;
roundTimeRemaining.Value = Mathf.Max(0f, roundTimeRemaining.Value - Time.deltaTime);
if(roundTimeRemaining.Value <= 0f)
{
StartCoroutine(EndRound(0ul));
}
}
// public void OnTimerChanged(float _previousValue, float _newValue)
void Awake()
{
Current = this;
playerScores = new NetworkList<PlayerScore>();
roundTimeRemaining.Value = roundDuration.Value;
}
public void OnPlayerFellIntoPit(ulong _winnerClientId)
{
if (!IsServer) return;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -13,7 +13,7 @@ TagManager:
- UI
- FPV
- TPV
-
- Ground
-
-
-