21 Commits
master ... Tuan

Author SHA1 Message Date
0e6e763b64 fix di chuyen update maze ui update map 2026-04-22 13:22:42 +07:00
666b4a5058 di chuyen nhu cc 2026-04-15 19:53:29 +07:00
928918c840 Merge branch 'main' of https://scove-vault.duckdns.org/scove/HALLUCINATION 2026-04-15 10:45:57 +07:00
02c2390d83 update hehehe 2026-04-15 10:45:47 +07:00
manhduyhoang90
89f8b35ee6 Add font,setup 2 scene 2026-04-14 09:49:11 +07:00
manhduyhoang90
77eb16bb37 SceneLobby(main):Add script and setup 2026-04-11 18:13:40 +07:00
e51f5cb82d Merge remote-tracking branch 'origin/master' 2026-04-09 09:44:42 +07:00
82705681b9 tesst 2026-04-08 12:40:20 +07:00
151bc234af test 2026-04-08 12:28:57 +07:00
8599c44a3e bru 2026-04-08 12:27:35 +07:00
dec07d993e 1 2026-04-08 12:24:14 +07:00
1ae5446a5a bru 2026-04-08 12:22:36 +07:00
13d271ded4 Update REAME 2026-04-08 12:20:26 +07:00
7cb68fdca2 Update README 2026-04-08 12:16:34 +07:00
158a3038e3 Update README 2026-04-08 12:02:18 +07:00
b22e952dd9 Update README 2026-04-08 11:56:05 +07:00
d4d7945c8f Update 2026-04-08 11:51:17 +07:00
bd40c0733b Testing 2026-04-08 11:50:13 +07:00
05191bda50 Update README file for better visualization 2026-04-08 11:47:56 +07:00
6564f594f6 Update 2026-04-08 11:36:42 +07:00
Scove
c002fca027 Update 2026-04-08 11:32:54 +07:00
43 changed files with 19687 additions and 268 deletions

View File

View File

@@ -4,7 +4,10 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="" /> <list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/Assets/Scripts/GameSetup/Maze/Maze.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/GameSetup/Maze/Maze.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player Controller/PlayerStateMachine.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player Controller/PlayerStateMachine.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -43,7 +46,7 @@
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;, &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;, &quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
&quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;, &quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;, &quot;git-widget-placeholder&quot;: &quot;Tuan&quot;,
&quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;, &quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
@@ -126,6 +129,9 @@
<workItem from="1775100366425" duration="2192000" /> <workItem from="1775100366425" duration="2192000" />
<workItem from="1775106342316" duration="15040000" /> <workItem from="1775106342316" duration="15040000" />
<workItem from="1775313757656" duration="8722000" /> <workItem from="1775313757656" duration="8722000" />
<workItem from="1776130728673" duration="7161000" />
<workItem from="1776255558934" duration="1896000" />
<workItem from="1776734429973" duration="5497000" />
</task> </task>
<servers /> <servers />
</component> </component>

Binary file not shown.

View File

@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 3efebbfa35a5ea14187c984a295ccbbf
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- VCR OSD Mono
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -20,6 +20,7 @@ GameObject:
- component: {fileID: 5773292363125757170} - component: {fileID: 5773292363125757170}
- component: {fileID: 504047695906043424} - component: {fileID: 504047695906043424}
- component: {fileID: -5076913349690967641} - component: {fileID: -5076913349690967641}
- component: {fileID: 591040529181574494}
m_Layer: 0 m_Layer: 0
m_Name: Player m_Name: Player
m_TagString: Player m_TagString: Player
@@ -399,6 +400,7 @@ MonoBehaviour:
_NetworkedCameraRotation: {x: 0, y: 0, z: 0, w: 0} _NetworkedCameraRotation: {x: 0, y: 0, z: 0, w: 0}
_NetworkedMoveInput: {x: 0, y: 0} _NetworkedMoveInput: {x: 0, y: 0}
_NetworkedSpeed: 0 _NetworkedSpeed: 0
_NetworkedPosition: {x: 0, y: 0, z: 0}
--- !u!114 &3043298118541876184 --- !u!114 &3043298118541876184
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -497,6 +499,23 @@ MonoBehaviour:
- {fileID: 830356296960548640} - {fileID: 830356296960548640}
- {fileID: 504047695906043424} - {fileID: 504047695906043424}
ForceRemoteRenderTimeframe: 0 ForceRemoteRenderTimeframe: 0
--- !u!114 &591040529181574494
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1054594849095937263}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf6aff0b7e11d41439ac80f4963a0795, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.PlayerDebugProvider
stateMachine: {fileID: 830356296960548640}
debugCanvas: {fileID: 0}
followOffset: {x: 1.5, y: 2, z: 0}
smoothTime: 0.15
lookAtCamera: 1
--- !u!1 &3751838835891881608 --- !u!1 &3751838835891881608
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -0,0 +1,434 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1853746013808319519
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5982873655778506037}
- component: {fileID: 8896812907915532518}
- component: {fileID: 4177780663107501751}
- component: {fileID: 1411665212565219828}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5982873655778506037
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1853746013808319519}
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: 2543758985893545093}
m_Father: {fileID: 5378081550572335840}
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: 410, y: 4.6379}
m_SizeDelta: {x: 261.8912, y: 93.6114}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8896812907915532518
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1853746013808319519}
m_CullTransparentMesh: 1
--- !u!114 &4177780663107501751
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1853746013808319519}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1411665212565219828
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1853746013808319519}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 4177780663107501751}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2244009255029591300
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7674429389542475356}
- component: {fileID: 5544655301380416617}
- component: {fileID: 5386633168520988913}
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 &7674429389542475356
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2244009255029591300}
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: 5378081550572335840}
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: -311.46613, y: 5.9117966}
m_SizeDelta: {x: 856.9009, y: 142.0092}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5544655301380416617
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2244009255029591300}
m_CullTransparentMesh: 1
--- !u!114 &5386633168520988913
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2244009255029591300}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: Room 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a32ff21294cb0854181fe2ea1602ab9f, type: 2}
m_sharedMaterial: {fileID: -5366533617542256513, guid: a32ff21294cb0854181fe2ea1602ab9f, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, 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: 72
m_fontSizeBase: 72
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
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 &3321258058090925004
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5378081550572335840}
m_Layer: 5
m_Name: RoomItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5378081550572335840
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3321258058090925004}
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: 7674429389542475356}
- {fileID: 5982873655778506037}
m_Father: {fileID: 0}
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: 279.51804}
m_SizeDelta: {x: 1920, y: 192.6139}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &8791818078200538887
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2543758985893545093}
- component: {fileID: 1222051649351433350}
- component: {fileID: 5924695834248632598}
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 &2543758985893545093
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8791818078200538887}
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: 5982873655778506037}
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 &1222051649351433350
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8791818078200538887}
m_CullTransparentMesh: 1
--- !u!114 &5924695834248632598
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8791818078200538887}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: Join
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a32ff21294cb0854181fe2ea1602ab9f, type: 2}
m_sharedMaterial: {fileID: -5366533617542256513, guid: a32ff21294cb0854181fe2ea1602ab9f, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, 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: 72
m_fontSizeBase: 72
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
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}

View File

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

3169
Assets/Scenes/Lobby.unity Normal file

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -119,118 +119,6 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &75539241
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 75539245}
- component: {fileID: 75539244}
- component: {fileID: 75539243}
- component: {fileID: 75539242}
m_Layer: 6
m_Name: Cube for stepping up the maze
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &75539242
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 75539241}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &75539243
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 75539241}
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_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &75539244
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 75539241}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &75539245
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 75539241}
serializedVersion: 2
m_LocalRotation: {x: 0.02398076, y: -0.031742785, z: -0.60231304, w: 0.7972681}
m_LocalPosition: {x: 0, y: -2.04, z: 8}
m_LocalScale: {x: 10, y: 10, z: 10}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: -4.56, z: -74.14}
--- !u!137 &166789747 stripped --- !u!137 &166789747 stripped
SkinnedMeshRenderer: SkinnedMeshRenderer:
m_CorrespondingSourceObject: {fileID: 1058696422167757239, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} m_CorrespondingSourceObject: {fileID: 1058696422167757239, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
@@ -328,11 +216,11 @@ Transform:
m_GameObject: {fileID: 200732282} m_GameObject: {fileID: 200732282}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalPosition: {x: 3.5546, y: -2.7962599, z: 4.39807}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1368410213}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &200732285 --- !u!114 &200732285
MonoBehaviour: MonoBehaviour:
@@ -384,6 +272,11 @@ Camera:
m_CorrespondingSourceObject: {fileID: 452500236988029996, guid: fb7874830b9e56341bf88f2a1123c677, type: 3} m_CorrespondingSourceObject: {fileID: 452500236988029996, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
m_PrefabInstance: {fileID: 3886963620680427248} m_PrefabInstance: {fileID: 3886963620680427248}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!4 &442028708 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
m_PrefabInstance: {fileID: 3886963620680427248}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1185172173 --- !u!1 &1185172173
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -426,12 +319,45 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185172173} m_GameObject: {fileID: 1185172173}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -5.340607, y: 5.437105, z: 5.723578} m_LocalPosition: {x: -1.7860072, y: -0.3591547, z: 10.121648}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1368410213}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1313417866
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1313417867}
m_Layer: 0
m_Name: _MAP
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1313417867
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1313417866}
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:
- {fileID: 1439162687}
- {fileID: 1437922952}
m_Father: {fileID: 1997343489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1333385347 --- !u!1 &1333385347
GameObject: GameObject:
@@ -460,12 +386,12 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1333385347} m_GameObject: {fileID: 1333385347}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -62.34701, y: 0, z: 37.91954} m_LocalPosition: {x: -58.79241, y: -5.79626, z: 42.31761}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1997343489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1333385349 --- !u!114 &1333385349
MonoBehaviour: MonoBehaviour:
@@ -482,6 +408,7 @@ MonoBehaviour:
width: 30 width: 30
depth: 30 depth: 30
scale: 6 scale: 6
_mapParentObjet: {fileID: 1439162687}
--- !u!114 &1333385350 --- !u!114 &1333385350
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -497,6 +424,7 @@ MonoBehaviour:
width: 30 width: 30
depth: 30 depth: 30
scale: 6 scale: 6
_mapParentObjet: {fileID: 1439162687}
--- !u!114 &1333385351 --- !u!114 &1333385351
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -512,6 +440,40 @@ MonoBehaviour:
width: 30 width: 30
depth: 30 depth: 30
scale: 7 scale: 7
_mapParentObjet: {fileID: 1439162687}
--- !u!1 &1368410212
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1368410213}
m_Layer: 0
m_Name: _Enviroment
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1368410213
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1368410212}
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:
- {fileID: 200732284}
- {fileID: 1185172175}
m_Father: {fileID: 1997343489}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1437922948 --- !u!1 &1437922948
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -618,12 +580,43 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1437922948} m_GameObject: {fileID: 1437922948}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0, z: 0} m_LocalPosition: {x: 3.5546, y: -5.79626, z: 4.39807}
m_LocalScale: {x: 50, y: 1, z: 50} m_LocalScale: {x: 50, y: 1, z: 50}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1313417867}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1439162686
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1439162687}
m_Layer: 0
m_Name: _MapParentObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1439162687
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1439162686}
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: 1313417867}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1631120432 stripped --- !u!4 &1631120432 stripped
Transform: Transform:
@@ -635,6 +628,42 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8004958684693924044, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} m_CorrespondingSourceObject: {fileID: 8004958684693924044, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
m_PrefabInstance: {fileID: 8240317044381527393} m_PrefabInstance: {fileID: 8240317044381527393}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &1997343488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1997343489}
m_Layer: 0
m_Name: _SCENE
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1997343489
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1997343488}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.5546, y: 5.79626, z: -4.39807}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 442028708}
- {fileID: 216247148}
- {fileID: 1333385348}
- {fileID: 1313417867}
- {fileID: 1368410213}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2101138892 --- !u!1 &2101138892
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -666,25 +695,86 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 1732205146} m_Father: {fileID: 1732205146}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2116497666
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2116497667}
- component: {fileID: 2116497669}
- component: {fileID: 2116497668}
m_Layer: 0
m_Name: Lobby Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2116497667
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2116497666}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.5546, y: 5.79626, z: -4.39807}
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!114 &2116497668
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2116497666}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b5aeb4670d7bf41499d3aaf409820260, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::LobbyManager
roomListContent: {fileID: 2116497667}
--- !u!114 &2116497669
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2116497666}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ca752d01bdc2c5e42938776307031da3, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::_BasicSpawner
LobbyManager: {fileID: 0}
_playerPrefab:
RawGuidValue: 761bdf2e5c0cff4488527355acb975e5
--- !u!1001 &3886963620680427248 --- !u!1001 &3886963620680427248
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 1997343489}
m_Modifications: m_Modifications:
- target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3} - target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 3.5546
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3} - target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 1 value: -4.79626
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3} - target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -10 value: -5.60193
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3} - target: {fileID: 2207112960010484425, guid: fb7874830b9e56341bf88f2a1123c677, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -761,8 +851,12 @@ PrefabInstance:
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 1997343489}
m_Modifications: m_Modifications:
- target: {fileID: -5076913349690967641, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: SortKey
value: 225553585
objectReference: {fileID: 0}
- target: {fileID: 830356296960548640, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 830356296960548640, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: <InteractionMask>k__BackingField.m_Bits propertyPath: <InteractionMask>k__BackingField.m_Bits
value: 512 value: 512
@@ -829,15 +923,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -3.68 value: 5.34
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 5.166 value: -0.63026
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -4.537 value: -1.89
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -845,15 +939,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: -0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3} - target: {fileID: 3154409663696148700, guid: 761bdf2e5c0cff4488527355acb975e5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@@ -902,10 +996,5 @@ PrefabInstance:
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_Roots: m_Roots:
- {fileID: 3886963620680427248} - {fileID: 1997343489}
- {fileID: 200732284} - {fileID: 2116497667}
- {fileID: 1333385348}
- {fileID: 1437922952}
- {fileID: 8240317044381527393}
- {fileID: 75539245}
- {fileID: 1185172175}

View File

@@ -137,7 +137,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!65 &75539242 --- !u!65 &75539242
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -326,7 +326,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!114 &153890424 --- !u!114 &153890424
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -566,6 +566,143 @@ MonoBehaviour:
m_ShadowLayerMask: 1 m_ShadowLayerMask: 1
m_RenderingLayers: 1 m_RenderingLayers: 1
m_ShadowRenderingLayers: 1 m_ShadowRenderingLayers: 1
--- !u!1 &537584989
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 537584990}
- component: {fileID: 537584991}
- component: {fileID: 537584992}
m_Layer: 5
m_Name: WIN
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &537584990
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 537584989}
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: 2014458575}
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: -37.7702, y: -14.4365}
m_SizeDelta: {x: 333.5404, y: 101.1271}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &537584991
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 537584989}
m_CullTransparentMesh: 1
--- !u!114 &537584992
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 537584989}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: New 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: 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 &731807201 --- !u!1 &731807201
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -584,7 +721,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!65 &731807202 --- !u!65 &731807202
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -678,6 +815,122 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &792545169
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 792545173}
- component: {fileID: 792545172}
- component: {fileID: 792545171}
- component: {fileID: 792545170}
- component: {fileID: 792545174}
m_Layer: 0
m_Name: Maze Generator
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &792545170
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 792545169}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f12a5f6746a454e08a295f64a34f5dcf, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Prims
width: 30
depth: 30
scale: 6
_mapParentObjet: {fileID: 1759410438}
_MazeSeed: 0
wallMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
floorMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
goalPrefab: {fileID: 0}
--- !u!114 &792545171
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 792545169}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1039d646c358a4bd5ac697b0446a2f7e, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Maze
width: 30
depth: 30
scale: 6
_mapParentObjet: {fileID: 1759410438}
_MazeSeed: 0
wallMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
floorMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
goalPrefab: {fileID: 0}
--- !u!114 &792545172
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 792545169}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 33bbdb95ccc4b4577a62495732a02d3e, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Recursive
width: 30
depth: 30
scale: 7
_mapParentObjet: {fileID: 1759410438}
_MazeSeed: 0
wallMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
floorMaterial: {fileID: 2100000, guid: 57d02ef294a3bd04fa1e148123d97194, type: 2}
goalPrefab: {fileID: 0}
--- !u!4 &792545173
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 792545169}
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: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &792545174
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 792545169}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1552182283, guid: e725a070cec140c4caffb81624c8c787, type: 3}
m_Name:
m_EditorClassIdentifier: Fusion.Runtime.dll::Fusion.NetworkObject
SortKey: 166757071
ObjectInterest: 1
Flags: 262145
NestedObjects: []
NetworkedBehaviours:
- {fileID: 792545172}
- {fileID: 792545171}
- {fileID: 792545170}
ForceRemoteRenderTimeframe: 0
--- !u!1 &830381275 stripped --- !u!1 &830381275 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 4300131081491030878, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3} m_CorrespondingSourceObject: {fileID: 4300131081491030878, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3}
@@ -717,6 +970,119 @@ Light:
m_CorrespondingSourceObject: {fileID: 3593740734441989150, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3} m_CorrespondingSourceObject: {fileID: 3593740734441989150, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3}
m_PrefabInstance: {fileID: 1937191200} m_PrefabInstance: {fileID: 1937191200}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &856138082
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 856138083}
- component: {fileID: 856138086}
- component: {fileID: 856138085}
- component: {fileID: 856138084}
m_Layer: 6
m_Name: Ground
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &856138083
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 856138082}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 50, y: 1, z: 50}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2050395245}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!64 &856138084
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 856138082}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &856138085
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 856138082}
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_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: e2e2684e969402049b87d7f81417c603, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &856138086
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 856138082}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &874617061 stripped --- !u!1 &874617061 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 5789896249604009285, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3} m_CorrespondingSourceObject: {fileID: 5789896249604009285, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3}
@@ -987,13 +1353,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1222728863} m_GameObject: {fileID: 1222728863}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1880766867} - {fileID: 1880766867}
m_Father: {fileID: 1579856156} m_Father: {fileID: 1493821250}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1091,7 +1457,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!64 &1437922949 --- !u!64 &1437922949
MeshCollider: MeshCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1186,6 +1552,179 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1476208410
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1476208413}
- component: {fileID: 1476208412}
- component: {fileID: 1476208411}
m_Layer: 5
m_Name: TIME
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1476208411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1476208410}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
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: TIME 0:00
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!222 &1476208412
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1476208410}
m_CullTransparentMesh: 1
--- !u!224 &1476208413
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1476208410}
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: 1579856156}
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: -800, y: 482}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1493821249
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1493821250}
m_Layer: 5
m_Name: PromptGroup
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1493821250
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1493821249}
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: 1222728864}
m_Father: {fileID: 1579856156}
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: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1579856151 --- !u!1 &1579856151
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1219,8 +1758,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::UI.MyUIDisplay m_EditorClassIdentifier: Assembly-CSharp::UI.MyUIDisplay
playerDebugProvider: {fileID: 0} playerDebugProvider: {fileID: 0}
interactionPromptContainer: {fileID: 1222728863} interactionPromptContainer: {fileID: 1493821249}
interactionPromptText: {fileID: 0} interactionPromptText: {fileID: 1222728865}
--- !u!114 &1579856153 --- !u!114 &1579856153
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1279,7 +1818,7 @@ Canvas:
m_OverridePixelPerfect: 0 m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0 m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0 m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0 m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0 m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingOrder: 0 m_SortingOrder: 0
@@ -1296,7 +1835,9 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1222728864} - {fileID: 1493821250}
- {fileID: 2014458575}
- {fileID: 1476208413}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@@ -1323,7 +1864,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!114 &1667007658 --- !u!114 &1667007658
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1337,7 +1878,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.DoorInteractable m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.DoorInteractable
interactionData: {fileID: 11400000, guid: d3011be1ae644ac4e8430e89705cf443, type: 2} interactionData: {fileID: 11400000, guid: d3011be1ae644ac4e8430e89705cf443, type: 2}
woodDoorScript: {fileID: 0} woodDoorScript: {fileID: 1771364118}
animator: {fileID: 0} animator: {fileID: 0}
boolParameterName: IsOpen boolParameterName: IsOpen
--- !u!65 &1667007659 --- !u!65 &1667007659
@@ -1451,7 +1992,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!65 &1738061768 --- !u!65 &1738061768
BoxCollider: BoxCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1545,6 +2086,37 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1759410437
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1759410438}
m_Layer: 0
m_Name: _MapParentObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1759410438
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1759410437}
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: 2050395245}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1771364109 stripped --- !u!1 &1771364109 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 1534469393933210, guid: b5a5a17dc3a6d9e47bd468828a2dec34, type: 3} m_CorrespondingSourceObject: {fileID: 1534469393933210, guid: b5a5a17dc3a6d9e47bd468828a2dec34, type: 3}
@@ -1682,7 +2254,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.DoorInteractable m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.DoorInteractable
interactionData: {fileID: 11400000, guid: d3011be1ae644ac4e8430e89705cf443, type: 2} interactionData: {fileID: 11400000, guid: d3011be1ae644ac4e8430e89705cf443, type: 2}
woodDoorScript: {fileID: 0} woodDoorScript: {fileID: 1771364118}
animator: {fileID: 0} animator: {fileID: 0}
boolParameterName: IsOpen boolParameterName: IsOpen
--- !u!4 &1907283845 --- !u!4 &1907283845
@@ -1794,6 +2366,131 @@ PrefabInstance:
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 830381277} addedObject: {fileID: 830381277}
m_SourcePrefab: {fileID: 100100000, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 120d7631bf5b4b94f8271411b1868e06, type: 3}
--- !u!1 &2014458574
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2014458575}
- component: {fileID: 2014458577}
- component: {fileID: 2014458576}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &2014458575
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014458574}
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: 537584990}
m_Father: {fileID: 1579856156}
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!114 &2014458576
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014458574}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2014458577
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2014458574}
m_CullTransparentMesh: 1
--- !u!1 &2050395244
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2050395245}
- component: {fileID: 2050395246}
m_Layer: 0
m_Name: _MAP
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2050395245
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2050395244}
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:
- {fileID: 1759410438}
- {fileID: 856138083}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2050395246
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2050395244}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d7143f5824569245ae215ae06b6cce1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::OnlyScove.Scripts.UI.MazeUI
winPanel: {fileID: 2014458574}
winMessageText: {fileID: 537584992}
timerText: {fileID: 1476208411}
--- !u!1001 &3886963620680427248 --- !u!1001 &3886963620680427248
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1919,3 +2616,5 @@ SceneRoots:
- {fileID: 1579856156} - {fileID: 1579856156}
- {fileID: 153890428} - {fileID: 153890428}
- {fileID: 1937191200} - {fileID: 1937191200}
- {fileID: 792545173}
- {fileID: 2050395245}

8
Assets/Scripts/Duy.meta Normal file
View File

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

View File

@@ -0,0 +1,113 @@
using System.Collections.Generic;
using Fusion;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class _LobbyManager : MonoBehaviour
{
public GameObject lobbyPanel;
public GameObject characterSelectionPanel;
public _BasicSpawner spawner;
[Header("Character Selection")] public TMP_InputField playerNameInput;
public Image[] characterPreviewImages;
public int selectedCharacterIndex = 0;
[Header("Room List")] public GameObject roomListParent;
public GameObject roomListItemPrefab;
public TMP_InputField roomNameInput;
// Start is called once before the first execution of Update after the MonoBehaviour is created
async void Start()
{
lobbyPanel.SetActive(false);
characterSelectionPanel.SetActive(true);
OnSelectCharacter(selectedCharacterIndex);
spawner = FindFirstObjectByType<_BasicSpawner>();
await spawner.StartLobby();
}
public void OnSelectCharacter(int index)
{
selectedCharacterIndex = index;
// update preview images
for (var i = 0; i < characterPreviewImages.Length; i++)
{
characterPreviewImages[i].color = (i == index)
? Color.green
: Color.white;
}
}
public void OnNextButton()
{
var playerName = playerNameInput.text;
if (string.IsNullOrEmpty(playerName))
{
Debug.LogWarning("Player name cannot be empty!");
return;
}
// tạo 1 player _profile tạm thời, sau này sẽ gửi lên server để tạo player object
var _profile = new _PlayerProfile()
{
Name = playerName,
Class = (_CharacterClass)selectedCharacterIndex
};
spawner.SetLocalPlayerProfile(_profile);
// đưa lên host để tạo player object, ở đây tạm thời chỉ log ra console
Debug.Log($"Player Name: {_profile.Name}, Class: {_profile.Class}");
// chuyển sang lobby panel
characterSelectionPanel.SetActive(false);
lobbyPanel.SetActive(true);
}
// hiển thị danh sách phòng
public void DisplayRoomList(List<SessionInfo> sessions)
{
Debug.Log($"Received {sessions.Count} sessions from lobby");
// clear danh sách cũ
foreach (Transform child in roomListParent.transform)
{
Destroy(child.gameObject);
}
if (sessions.Count == 0) return;
// tạo item mới cho mỗi phòng
foreach (var session in sessions)
{
var item = Instantiate(roomListItemPrefab, roomListParent.transform);
var text = item.GetComponentInChildren<TextMeshProUGUI>();
text.text = $"{session.Name} ({session.PlayerCount}/{session.MaxPlayers})";
var button = item.GetComponentInChildren<Button>();
button.onClick.AddListener(() => OnJoinRoom(session.Name));
item.SetActive(true);
}
}
async void OnJoinRoom(string sessionName)
{
await spawner.StartClient(sessionName);
}
public async void OnCreateRoomButton()
{
var roomName = roomNameInput.text;
if (string.IsNullOrEmpty(roomName))
{
Debug.LogWarning("Room name cannot be empty!");
return;
}
// tạo phòng mới với tên đã nhập
await spawner.StartHost(roomName, SceneRef.FromIndex(1));
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 258164a5e282e34489a3c62c443c22f0

View File

@@ -0,0 +1,31 @@
using Fusion;
using UnityEngine;
// struct quản lý thông tin
public struct _PlayerMetaData : INetworkStruct
{
public NetworkString<_16> Name;
public _CharacterClass Class;
}
public class _PlayerDataManager : NetworkBehaviour
{
// biến này của Fusion sẽ tự động đồng bộ giữa các client và host,
// khi có thay đổi sẽ tự động cập nhật ở tất cả các bên
[Networked]
public NetworkDictionary<PlayerRef, _PlayerMetaData> Players => default;
// RPC: phương thức này sẽ được gọi từ client hoặc
// host để cập nhật thông tin player, sau đó sẽ được gửi
// đến state authority (host) để xử lý và đồng bộ lại cho tất cả các client
[Rpc(RpcSources.All, RpcTargets.StateAuthority)]
public void RPC_UpdatePlayerMetaData(PlayerRef playerRef, _PlayerMetaData metaData)
{
Players.Set(playerRef, metaData);
}
public bool TryGetPlayerMetaData(PlayerRef playerRef, out _PlayerMetaData metaData)
{
return Players.TryGet(playerRef, out metaData);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: b3d9934ebd60c9c4ea3e464b77fd7ae0

View File

@@ -0,0 +1,50 @@
using Fusion;
using TMPro;
using UnityEngine;
public enum _CharacterClass
{
Blue,
Red
}
public struct _PlayerProfile
{
public string Name;
public _CharacterClass Class;
}
public class PlayerInfo : NetworkBehaviour
{
[Networked] public string playerName { get; set; }
public _PlayerDataManager playerDataManager;
public TextMeshProUGUI nameText;
public GameObject[] characterIcons; // mảng chứa icon tương ứng với từng class, có thể gán trong inspector
// sau khi game object được tạo ra trên mạng,
// sẽ gọi phương thức này để khởi tạo thông tin player
public override void Spawned()
{
playerDataManager = FindFirstObjectByType<_PlayerDataManager>(); // tìm PlayerDataManager trong scene
}
// phương thức này sẽ được gọi mỗi frame để cập nhật thông tin hiển thị của player
public override void Render()
{
if (playerDataManager == null) return;
if (playerDataManager.TryGetPlayerMetaData(Object.InputAuthority, out var metadata))
{
var name = metadata.Name;
var charClass = metadata.Class;
nameText.text = $"{name} ({charClass})";
for (var i = 0; i < characterIcons.Length; i++)
{
characterIcons[i].SetActive(i == (int)charClass); // hiển thị icon tương ứng với class của player
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 70abb536cf50f2948882e913634daedf

View File

@@ -0,0 +1,6 @@
using Fusion;
public partial struct _PlayerInputData : INetworkInput
{
public float direction;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 731ed4a4b6e0ae64c8194463a76646c7

View File

@@ -0,0 +1,278 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Fusion;
using Fusion.Sockets;
using UnityEngine;
// ghi nhận các input của người chơi, ở đây chỉ có hướng di chuyển
public class _BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
{
private NetworkRunner _runner { get; set; }
public _LobbyManager LobbyManager;
private void Awake()
{
// dont destroy this object when loading new scenes
if(_runner == null) _runner = gameObject.AddComponent<NetworkRunner>();
DontDestroyOnLoad(gameObject);
}
// thông tin profile của player local, sẽ được tạo ra từ lobby và gửi lên host để tạo player object, ở đây tạm thời chỉ tạo 1 profile mặc định
public _PlayerProfile LocalPlayerProfile { get; private set; }
public void SetLocalPlayerProfile(_PlayerProfile _profile)
{
LocalPlayerProfile = _profile;
}
// start lobby
public async Task StartLobby()
{
if(_runner == null) _runner = gameObject.AddComponent<NetworkRunner>();
_runner.ProvideInput = true;
_runner.AddCallbacks(this);
var result = await _runner.JoinSessionLobby(SessionLobby.ClientServer);
if (result.Ok)
{
Debug.Log("Joined lobby successfully!");
}
else
{
Debug.LogError($"Failed to join lobby: {result.ShutdownReason}");
}
}
// tạo phòng
public async Task StartHost(string sessionName, SceneRef scene)
{
var result = await _runner.StartGame(new StartGameArgs()
{
GameMode = GameMode.Host,
SessionName = sessionName,
Scene = scene,
PlayerCount = 2,
SceneManager = gameObject.AddComponent<NetworkSceneManagerDefault>()
});
if (result.Ok)
{
Debug.Log("Started host successfully!");
}
else
{
Debug.LogError($"Failed to start host: {result.ShutdownReason}");
}
}
// tham gia phòng
public async Task StartClient(string sessionName)
{
var result = await _runner.StartGame(new StartGameArgs()
{
GameMode = GameMode.Client,
SessionName = sessionName,
SceneManager = gameObject.AddComponent<NetworkSceneManagerDefault>()
});
if (result.Ok) {
Debug.Log("Started client successfully!");
}
else {
Debug.LogError($"Failed to start client: {result.ShutdownReason}");
}
}
public void OnObjectExitAOI(NetworkRunner runner, NetworkObject obj, PlayerRef player)
{
}
public void OnObjectEnterAOI(NetworkRunner runner, NetworkObject obj, PlayerRef player)
{
}
[SerializeField] private NetworkPrefabRef _playerPrefab;
private Dictionary<PlayerRef, NetworkObject> _spawnedCharacters = new Dictionary<PlayerRef, NetworkObject>();
public void OnPlayerJoined(NetworkRunner runner, PlayerRef player)
{
// nếu là host
if (runner.IsServer)
{
Vector2 spawnPosition;
if (player == runner.LocalPlayer)
{
spawnPosition = new Vector2(-8, 0);
}
else
{
spawnPosition = new Vector2(8, 0);
}
// Create a unique position for the player
// var spawnPosition = new Vector2(Random.Range(0, 5), Random.Range(0, 5));
var networkPlayerObject = runner.Spawn(
_playerPrefab,
spawnPosition,
Quaternion.identity,
player);
// Keep track of the player avatars for easy access
_spawnedCharacters.Add(player, networkPlayerObject);
// if (runner.ActivePlayers.Count() == 2 && !_ballStarted)
// {
// var ball = FindFirstObjectByType<Ball>();
// ball.Launch();
// _ballStarted = true;
// }
}
Debug.Log("Player joined: " + player + ", is local player: " + (player == runner.LocalPlayer));
if (player == runner.LocalPlayer)
{
var pdm = FindFirstObjectByType<_PlayerDataManager>();
if (pdm == null) return;
var metaData = new _PlayerMetaData()
{
Name = LocalPlayerProfile.Name,
Class = LocalPlayerProfile.Class,
};
pdm.RPC_UpdatePlayerMetaData(player, metaData);
}
}
public void OnPlayerLeft(NetworkRunner runner, PlayerRef player)
{
if (_spawnedCharacters.TryGetValue(player, out NetworkObject networkObject))
{
runner.Despawn(networkObject);
_spawnedCharacters.Remove(player);
if (runner.IsServer)
{
runner.Shutdown();
}
}
}
private bool IsGameReady(NetworkRunner runner)
{
return runner.ActivePlayers.Count() >= 2;
}
public void OnShutdown(NetworkRunner runner, ShutdownReason shutdownReason)
{
Debug.Log("Game shutdown: " + shutdownReason);
UnityEngine.SceneManagement.SceneManager.LoadScene("Lobby");
}
public void OnDisconnectedFromServer(NetworkRunner runner, NetDisconnectReason reason)
{
}
public void OnConnectRequest(NetworkRunner runner, NetworkRunnerCallbackArgs.ConnectRequest request, byte[] token)
{
}
public void OnConnectFailed(NetworkRunner runner, NetAddress remoteAddress, NetConnectFailedReason reason)
{
}
public void OnUserSimulationMessage(NetworkRunner runner, SimulationMessagePtr message)
{
}
public void OnReliableDataReceived(NetworkRunner runner, PlayerRef player, ReliableKey key, ArraySegment<byte> data)
{
}
public void OnReliableDataProgress(NetworkRunner runner, PlayerRef player, ReliableKey key, float progress)
{
}
public void OnInput(NetworkRunner runner, NetworkInput input)
{
// collect the input and send it to the runner, which will then be sent to the server and other clients
var data = new _PlayerInputData();
data.direction = Input.GetAxis("Vertical");
input.Set(data);
}
public void OnInputMissing(NetworkRunner runner, PlayerRef player, NetworkInput input)
{
}
public void OnConnectedToServer(NetworkRunner runner)
{
}
// khi có update về danh sách phòng,
// ví dụ khi có phòng mới được tạo hoặc phòng bị xóa,
// host sẽ gửi update này cho tất cả client trong lobby
public void OnSessionListUpdated(NetworkRunner runner, List<SessionInfo> sessionList)
{
Debug.Log("Session list updated, total sessions: " + sessionList.Count);
LobbyManager.DisplayRoomList(sessionList);
}
public void OnCustomAuthenticationResponse(NetworkRunner runner, Dictionary<string, object> data)
{
}
public void OnHostMigration(NetworkRunner runner, HostMigrationToken hostMigrationToken)
{
}
public void OnSceneLoadDone(NetworkRunner runner)
{
}
public void OnSceneLoadStart(NetworkRunner runner)
{
}
public void DespawnGO(NetworkObject networkObject)
{
if (_runner != null && networkObject != null)
{
_runner.Despawn(networkObject);
}
}
public NetworkObject SpawnGO(NetworkPrefabRef prefabRef, Vector2 position,Quaternion rotation, PlayerRef owner = default)
{
if (_runner != null)
{
return _runner.Spawn(prefabRef, position, rotation, owner);
}
return null;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ca752d01bdc2c5e42938776307031da3

View File

@@ -8,7 +8,6 @@ using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
// Struct input đồng bộ giữa Spawner, Movement và StateMachine
public struct PlayerInputData : INetworkInput public struct PlayerInputData : INetworkInput
{ {
public Vector2 Direction; public Vector2 Direction;
@@ -25,7 +24,6 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
[SerializeField] private NetworkPrefabRef _playerPrefab; [SerializeField] private NetworkPrefabRef _playerPrefab;
private Dictionary<PlayerRef, NetworkObject> _spawnedCharacters = new Dictionary<PlayerRef, NetworkObject>(); private Dictionary<PlayerRef, NetworkObject> _spawnedCharacters = new Dictionary<PlayerRef, NetworkObject>();
// Thông tin profile local
public PlayerProfile LocalPlayerProfile { get; private set; } public PlayerProfile LocalPlayerProfile { get; private set; }
public void SetLocalPlayerProfile(PlayerProfile profile) public void SetLocalPlayerProfile(PlayerProfile profile)
{ {
@@ -38,10 +36,9 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
DontDestroyOnLoad(gameObject); DontDestroyOnLoad(gameObject);
} }
// Khởi tạo Game (Host/Client)
public async Task StartGame(GameMode mode, string sessionName = "TestRoom") public async Task StartGame(GameMode mode, string sessionName = "TestRoom")
{ {
Debug.Log($"<color=yellow>Fusion:</color> Đang khởi tạo kết nối với Mode: {mode} | Phòng: {sessionName}"); Debug.Log($"<color=yellow>Fusion:</color> Starting with Mode: {mode} | Room: {sessionName}");
if (_runner == null) _runner = gameObject.AddComponent<NetworkRunner>(); if (_runner == null) _runner = gameObject.AddComponent<NetworkRunner>();
_runner.ProvideInput = true; _runner.ProvideInput = true;
@@ -57,18 +54,10 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
SceneManager = sceneManager SceneManager = sceneManager
}); });
if (result.Ok) if (!result.Ok)
{ {
Debug.Log($"<color=green>Fusion thành công:</color> Đã vào phòng {sessionName}"); Debug.LogError($"<color=red>Fusion failed:</color> {result.ShutdownReason}");
} if (_runner != null) { Destroy(_runner); _runner = null; }
else
{
Debug.LogError($"<color=red>Fusion thất bại:</color> Lý do: {result.ShutdownReason}");
if (_runner != null)
{
Destroy(_runner);
_runner = null;
}
} }
} }
@@ -76,20 +65,12 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
{ {
if (_runner == null || !_runner.IsRunning) if (_runner == null || !_runner.IsRunning)
{ {
float width = 400; float width = 400; float height = 300;
float height = 300; float x = (Screen.width - width) / 2f; float y = (Screen.height - height) / 2f;
float x = (Screen.width - width) / 2f;
float y = (Screen.height - height) / 2f;
GUI.Box(new Rect(x, y, width, height), "FUSION MULTIPLAYER"); GUI.Box(new Rect(x, y, width, height), "FUSION MULTIPLAYER");
float innerX = x + 20; float innerY = y + 40; float contentWidth = width - 40;
float innerX = x + 20; GUI.Label(new Rect(innerX, innerY, 100, 30), "Room Name:");
float innerY = y + 40;
float contentWidth = width - 40;
GUI.Label(new Rect(innerX, innerY, 100, 30), "Tên phòng:");
_roomName = GUI.TextField(new Rect(innerX + 100, innerY, contentWidth - 100, 30), _roomName); _roomName = GUI.TextField(new Rect(innerX + 100, innerY, contentWidth - 100, 30), _roomName);
if (GUI.Button(new Rect(innerX, innerY + 50, contentWidth, 60), "VÀO PHÒNG\n(Tự động Host/Client)")) if (GUI.Button(new Rect(innerX, innerY + 50, contentWidth, 60), "VÀO PHÒNG\n(Tự động Host/Client)"))
{ {
_ = StartGame(GameMode.AutoHostOrClient, _roomName); _ = StartGame(GameMode.AutoHostOrClient, _roomName);
@@ -127,8 +108,8 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
{ {
if (runner.IsServer) if (runner.IsServer)
{ {
Vector3 spawnPosition = new Vector3(Random.Range(-10f, 10f), 2f, Random.Range(-10f, 10f)); Maze maze = GameObject.FindAnyObjectByType<Maze>();
spawnPosition += new Vector3(player.RawEncoded % 3, 0, player.RawEncoded % 3); Vector3 spawnPosition = (maze != null) ? maze.GetPlayerSpawnPoint() : new Vector3(0, 2f, 0);
var networkPlayerObject = runner.Spawn(_playerPrefab, spawnPosition, Quaternion.identity, player); var networkPlayerObject = runner.Spawn(_playerPrefab, spawnPosition, Quaternion.identity, player);
runner.SetPlayerObject(player, networkPlayerObject); runner.SetPlayerObject(player, networkPlayerObject);
@@ -148,8 +129,6 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
public void OnInput(NetworkRunner runner, NetworkInput input) public void OnInput(NetworkRunner runner, NetworkInput input)
{ {
var data = new PlayerInputData(); var data = new PlayerInputData();
// ĐỌC TRỰC TIẾP: Không dùng Buffer để tránh bị trôi phím
data.Direction = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")); data.Direction = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
data.sprint = Input.GetKey(KeyCode.LeftShift); data.sprint = Input.GetKey(KeyCode.LeftShift);
@@ -159,7 +138,6 @@ public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks
if (sm.Cam != null) data.rot = sm.Cam.PlanarRotation; if (sm.Cam != null) data.rot = sm.Cam.PlanarRotation;
else data.rot = sm.NetworkedCameraRotation; else data.rot = sm.NetworkedCameraRotation;
} }
input.Set(data); input.Set(data);
} }

View File

@@ -0,0 +1,38 @@
using UnityEngine;
using Fusion;
namespace OnlyScove.Scripts.GameSetup.Maze
{
public class GoalSpot : MonoBehaviour
{
private bool _isActivated = false;
private void OnTriggerEnter(Collider healthcare)
{
if (_isActivated) return;
// Kiểm tra xem đối tượng chạm vào có phải là người chơi không
PlayerStateMachine player = healthcare.GetComponentInParent<PlayerStateMachine>();
if (player != null)
{
bool isOffline = player.Runner == null || !player.Runner.IsRunning;
// Nếu có mạng, kiểm tra quyền điều khiển. Nếu offline, mặc định là người chơi cục bộ.
bool canActivate = isOffline || (player.Object != null && player.Object.HasInputAuthority);
if (canActivate)
{
_isActivated = true;
player.CompleteMaze();
// Hiệu ứng hình ảnh khi chạm đích
var renderer = GetComponent<Renderer>();
if (renderer != null) renderer.material.color = Color.green;
Debug.Log("<color=cyan>Goal reached!</color>");
}
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d3b0727dd84fbb046ac472bb1404b363

View File

@@ -1,6 +1,8 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using Fusion;
using OnlyScove.Scripts.GameSetup.Maze;
public class MapLocation public class MapLocation
{ {
@@ -14,7 +16,7 @@ public class MapLocation
} }
} }
public class Maze : MonoBehaviour public class Maze : NetworkBehaviour
{ {
public List<MapLocation> directions = new List<MapLocation>() { public List<MapLocation> directions = new List<MapLocation>() {
new MapLocation(1,0), new MapLocation(1,0),
@@ -25,16 +27,54 @@ public class Maze : MonoBehaviour
public int depth = 30; //z length public int depth = 30; //z length
public byte[,] map; public byte[,] map;
public int scale = 6; public int scale = 6;
public Transform _mapParentObjet;
[Header("Sync & Materials")]
[Networked] public int MazeSeed { get; set; }
public Material wallMaterial;
public Material floorMaterial;
// Start is called before the first frame update [Header("Win Condition")]
void Start() public GameObject goalPrefab;
public override void Spawned()
{ {
if (Object.HasStateAuthority)
{
// Nếu chưa có seed thì tạo mới
if (MazeSeed == 0) MazeSeed = Random.Range(1, 99999);
}
GenerateMazeWithSeed(MazeSeed);
}
public void GenerateMazeWithSeed(int seed)
{
if (_mapParentObjet != null)
{
// Dùng list để tránh lỗi modify collection khi đang duyệt
List<GameObject> children = new List<GameObject>();
foreach (Transform child in _mapParentObjet) children.Add(child.gameObject);
foreach (GameObject child in children) Destroy(child);
}
Random.InitState(seed);
InitialiseMap(); InitialiseMap();
Generate(); Generate();
// Ép ô (1,1) là đường đi cho player spawn
map[1, 1] = 0;
PlaceExit();
DrawMap(); DrawMap();
} }
public Vector3 GetPlayerSpawnPoint()
{
// Trả về vị trí tại ô (1,1). y = 1.0f cục bộ
return transform.TransformPoint(new Vector3(1 * scale, 1.0f, 1 * scale));
}
void InitialiseMap() void InitialiseMap()
{ {
map = new byte[width,depth]; map = new byte[width,depth];
@@ -55,17 +95,60 @@ public class Maze : MonoBehaviour
} }
} }
public virtual void PlaceExit()
{
int x = width - 2;
int z = depth - 2;
map[x, z] = 2;
if (CountSquareNeighbours(x, z) == 0) map[x - 1, z] = 0;
}
void DrawMap() void DrawMap()
{ {
if (_mapParentObjet == null) _mapParentObjet = this.transform;
// Tạo sàn chống rơi và Z-fighting
GameObject floor = GameObject.CreatePrimitive(PrimitiveType.Plane);
floor.name = "Floor";
floor.transform.SetParent(_mapParentObjet);
floor.transform.localPosition = new Vector3((width - 1) * scale / 2f, -0.05f, (depth - 1) * scale / 2f);
floor.transform.localScale = new Vector3(width * scale / 10f, 1, depth * scale / 10f);
if (floorMaterial != null) floor.GetComponent<Renderer>().material = floorMaterial;
for (int z = 0; z < depth; z++) for (int z = 0; z < depth; z++)
for (int x = 0; x < width; x++) for (int x = 0; x < width; x++)
{ {
Vector3 pos = new Vector3(x * scale, scale / 2f, z * scale);
if (map[x, z] == 1) if (map[x, z] == 1)
{ {
Vector3 pos = new Vector3(x * scale, 0, z * scale);
GameObject wall = GameObject.CreatePrimitive(PrimitiveType.Cube); GameObject wall = GameObject.CreatePrimitive(PrimitiveType.Cube);
wall.name = $"Wall_{x}_{z}";
wall.transform.localScale = new Vector3(scale, scale, scale); wall.transform.localScale = new Vector3(scale, scale, scale);
wall.transform.position = pos; wall.transform.SetParent(_mapParentObjet);
wall.transform.localPosition = pos;
if (wallMaterial != null) wall.GetComponent<Renderer>().material = wallMaterial;
}
else if (map[x, z] == 2)
{
GameObject goalObj;
if (goalPrefab != null)
goalObj = Instantiate(goalPrefab, transform.TransformPoint(pos), Quaternion.identity);
else
{
goalObj = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
goalObj.GetComponent<Renderer>().material.color = Color.yellow;
goalObj.transform.localScale = new Vector3(scale * 0.5f, scale * 0.5f, scale * 0.5f);
}
goalObj.name = "Goal_WinSpot";
goalObj.transform.SetParent(_mapParentObjet);
goalObj.transform.localPosition = pos;
Collider col = goalObj.GetComponent<Collider>();
if (col == null) col = goalObj.AddComponent<CapsuleCollider>();
col.isTrigger = true;
if (goalObj.GetComponent<GoalSpot>() == null) goalObj.AddComponent<GoalSpot>();
} }
} }
} }

View File

@@ -19,6 +19,16 @@ namespace OnlyScove.Scripts
private Material lampMaterial; private Material lampMaterial;
private Color originalEmissionColor; private Color originalEmissionColor;
public override string InteractionPrompt
{
get
{
string action = isOn ? "Tắt " : "Bật ";
string name = interactionData != null ? interactionData.promptText : "Đèn";
return action + name;
}
}
private void Start() private void Start()
{ {
// Khởi tạo Material (tạo bản thực thi riêng để không lỗi Shader) // Khởi tạo Material (tạo bản thực thi riêng để không lỗi Shader)

View File

@@ -20,7 +20,7 @@ namespace OnlyScove.Scripts
if (input != Vector2.zero) if (input != Vector2.zero)
{ {
dashDirection = new Vector3(input.x, 0, input.y).normalized; dashDirection = new Vector3(input.x, 0, input.y).normalized;
dashDirection = stateMachine.NetworkedCameraRotation * dashDirection; dashDirection = stateMachine.CameraRotation * dashDirection;
} }
else else
{ {

View File

@@ -25,7 +25,7 @@ namespace OnlyScove.Scripts
if (input != Vector2.zero) if (input != Vector2.zero)
{ {
dashDirection = new Vector3(input.x, 0f, input.y).normalized; dashDirection = new Vector3(input.x, 0f, input.y).normalized;
dashDirection = stateMachine.NetworkedCameraRotation * dashDirection; dashDirection = stateMachine.CameraRotation * dashDirection;
dashDirection.y = 0; dashDirection.y = 0;
dashDirection.Normalize(); dashDirection.Normalize();

View File

@@ -20,7 +20,7 @@ namespace OnlyScove.Scripts
if (input != Vector2.zero) if (input != Vector2.zero)
{ {
dodgeDirection = new Vector3(input.x, 0, input.y).normalized; dodgeDirection = new Vector3(input.x, 0, input.y).normalized;
dodgeDirection = stateMachine.NetworkedCameraRotation * dodgeDirection; dodgeDirection = stateMachine.CameraRotation * dodgeDirection;
} }
else else
{ {

View File

@@ -37,7 +37,7 @@ namespace OnlyScove.Scripts
// ĐÚNG: Sử dụng MoveInput đã đồng bộ mạng // ĐÚNG: Sử dụng MoveInput đã đồng bộ mạng
Vector2 input = stateMachine.MoveInput; Vector2 input = stateMachine.MoveInput;
Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized; Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized;
Vector3 moveDirection = stateMachine.NetworkedCameraRotation * inputDir; Vector3 moveDirection = stateMachine.CameraRotation * inputDir;
moveDirection.y = 0; moveDirection.y = 0;
moveDirection.Normalize(); moveDirection.Normalize();

View File

@@ -43,7 +43,7 @@ namespace OnlyScove.Scripts
Vector2 input = stateMachine.MoveInput; Vector2 input = stateMachine.MoveInput;
Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized; Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized;
Vector3 moveDirection = stateMachine.NetworkedCameraRotation * inputDir; Vector3 moveDirection = stateMachine.CameraRotation * inputDir;
moveDirection.y = 0; moveDirection.y = 0;
moveDirection.Normalize(); moveDirection.Normalize();

View File

@@ -37,7 +37,7 @@ namespace OnlyScove.Scripts
} }
Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized; Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized;
Vector3 moveDirection = stateMachine.NetworkedCameraRotation * inputDir; Vector3 moveDirection = stateMachine.CameraRotation * inputDir;
moveDirection.y = 0; moveDirection.y = 0;
moveDirection.Normalize(); moveDirection.Normalize();

View File

@@ -36,7 +36,7 @@ namespace OnlyScove.Scripts
} }
Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized; Vector3 inputDir = new Vector3(input.x, 0, input.y).normalized;
Vector3 moveDirection = stateMachine.NetworkedCameraRotation * inputDir; Vector3 moveDirection = stateMachine.CameraRotation * inputDir;
moveDirection.y = 0; moveDirection.y = 0;
moveDirection.Normalize(); moveDirection.Normalize();

View File

@@ -47,9 +47,28 @@ namespace OnlyScove.Scripts
[field: SerializeField] public LayerMask InteractionMask { get; private set; } [field: SerializeField] public LayerMask InteractionMask { get; private set; }
[Networked] public Quaternion NetworkedCameraRotation { get; set; } [Networked] public Quaternion NetworkedCameraRotation { get; set; }
public Quaternion CameraRotation
{
get
{
if (Runner != null && Runner.IsRunning && Object != null)
return NetworkedCameraRotation;
if (Cam != null)
return Cam.PlanarRotation;
return transform.rotation;
}
}
[Networked] public Vector2 NetworkedMoveInput { get; set; } [Networked] public Vector2 NetworkedMoveInput { get; set; }
[Networked] public float NetworkedSpeed { get; set; } [Networked] public float NetworkedSpeed { get; set; }
[Networked] public Vector3 NetworkedPosition { get; set; } [Networked] public int StartTick { get; set; }
public float FinishTime { get; set; }
public bool IsFinished { get; set; }
private float startTimeOffline;
public Vector2 MoveInput { get; private set; } public Vector2 MoveInput { get; private set; }
public bool IsSprintHeld { get; private set; } public bool IsSprintHeld { get; private set; }
@@ -66,6 +85,7 @@ namespace OnlyScove.Scripts
private PlayerBaseState currentState; private PlayerBaseState currentState;
private bool hasControl = true; private bool hasControl = true;
private float localAnimatorSpeed;
private bool hasSpeedParam; private bool hasSpeedParam;
private bool hasVelocityXParam; private bool hasVelocityXParam;
@@ -78,9 +98,10 @@ namespace OnlyScove.Scripts
Anim = GetComponentInChildren<Animator>(); Anim = GetComponentInChildren<Animator>();
Scanner = GetComponent<EnvironmentScanner>(); Scanner = GetComponent<EnvironmentScanner>();
// Kiểm tra tham số có tồn tại trong Animator không để tránh lỗi log gây Disconnect
if (Anim != null) if (Anim != null)
{ {
// Ép tắt Root Motion để tránh lỗi cộng dồn tốc độ
Anim.applyRootMotion = false;
foreach (AnimatorControllerParameter param in Anim.parameters) foreach (AnimatorControllerParameter param in Anim.parameters)
{ {
if (param.name == speedParamName) hasSpeedParam = true; if (param.name == speedParamName) hasSpeedParam = true;
@@ -94,13 +115,40 @@ namespace OnlyScove.Scripts
velocityZHash = Animator.StringToHash(velocityZParamName); velocityZHash = Animator.StringToHash(velocityZParamName);
} }
private void Start()
{
if (Runner == null || !Runner.IsRunning)
{
InitializePlayer();
}
}
public override void Spawned() public override void Spawned()
{ {
SwitchState(new PlayerIdleState(this)); InitializePlayer();
if (Object.HasInputAuthority) // QUAN TRỌNG: Vô hiệu hóa Controller của người chơi khác để tránh giật hình.
// NetworkTransform sẽ tự lo việc làm mượt vị trí của họ.
if (Object != null && !Object.HasInputAuthority && !Runner.IsServer)
{
if (Controller != null) Controller.enabled = false;
}
}
private void InitializePlayer()
{
if (currentState == null)
{
SwitchState(new PlayerIdleState(this));
}
bool isOffline = Runner == null || !Runner.IsRunning;
bool hasAuthority = Object != null && Object.HasInputAuthority;
if (isOffline || hasAuthority)
{ {
Local = this; Local = this;
startTimeOffline = Time.time;
CameraController cameraController = GameObject.FindAnyObjectByType<CameraController>(); CameraController cameraController = GameObject.FindAnyObjectByType<CameraController>();
if (cameraController != null) if (cameraController != null)
@@ -112,16 +160,16 @@ namespace OnlyScove.Scripts
Input.OnNextInteractEvent += OnNextInteract; Input.OnNextInteractEvent += OnNextInteract;
Input.OnPreviousInteractEvent += OnPreviousInteract; Input.OnPreviousInteractEvent += OnPreviousInteract;
if (Controller != null) Controller.enabled = true;
} }
else
if (!isOffline && Object.HasStateAuthority)
{ {
// Vô hiệu hóa Controller của người chơi khác trên máy khách để tránh xung đột vật lý StartTick = (int)Runner.Tick;
if (Runner.IsClient && Controller != null) Controller.enabled = false;
} }
} }
private float localAnimatorSpeed;
public void Rotate(Vector3 moveDirection, float deltaTime) public void Rotate(Vector3 moveDirection, float deltaTime)
{ {
if (moveDirection == Vector3.zero) return; if (moveDirection == Vector3.zero) return;
@@ -136,19 +184,22 @@ namespace OnlyScove.Scripts
public void Move(Vector3 velocity, float animatorSpeed, float deltaTime) public void Move(Vector3 velocity, float animatorSpeed, float deltaTime)
{ {
// CHỈ thực hiện di chuyển nếu có quyền điều khiển hoặc là Server bool canMove = (Runner == null || !Runner.IsRunning) || Object.HasInputAuthority || Runner.IsServer;
if (!Object.HasInputAuthority && !Runner.IsServer) return; if (!canMove) return;
if (Controller != null && Controller.enabled) if (Controller != null && Controller.enabled)
{ {
Controller.Move(velocity * deltaTime); // SỬA LỖI CHẠY NHANH: Chỉ thực hiện lệnh Move vật lý trong Forward Tick.
// Cập nhật vị trí mạng ngay sau khi di chuyển để tick sau quay lại đây // Điều này ngăn việc cộng dồn vận tốc khi Fusion chạy Re-simulation.
NetworkedPosition = transform.position; if (Runner == null || !Runner.IsRunning || Runner.IsForward)
{
Controller.Move(velocity * deltaTime);
}
} }
localAnimatorSpeed = animatorSpeed; localAnimatorSpeed = animatorSpeed;
if (Object.HasStateAuthority) if (Object != null && Object.HasStateAuthority)
{ {
NetworkedSpeed = animatorSpeed; NetworkedSpeed = animatorSpeed;
NetworkedMoveInput = MoveInput; NetworkedMoveInput = MoveInput;
@@ -164,7 +215,7 @@ namespace OnlyScove.Scripts
float speedValue; float speedValue;
Vector2 inputVector; Vector2 inputVector;
if (Object.HasInputAuthority) if (Runner == null || !Runner.IsRunning || Object.HasInputAuthority)
{ {
speedValue = localAnimatorSpeed; speedValue = localAnimatorSpeed;
inputVector = MoveInput; inputVector = MoveInput;
@@ -175,7 +226,6 @@ namespace OnlyScove.Scripts
inputVector = NetworkedMoveInput; inputVector = NetworkedMoveInput;
} }
// Chỉ Set nếu tham số thực sự tồn tại (Tránh lỗi Hash does not exist)
if (hasSpeedParam) Anim.SetFloat(speedHash, speedValue, AnimationDamping, deltaTime); if (hasSpeedParam) Anim.SetFloat(speedHash, speedValue, AnimationDamping, deltaTime);
if (hasVelocityXParam) Anim.SetFloat(velocityXHash, inputVector.x * speedValue, AnimationDamping, deltaTime); if (hasVelocityXParam) Anim.SetFloat(velocityXHash, inputVector.x * speedValue, AnimationDamping, deltaTime);
if (hasVelocityZParam) Anim.SetFloat(velocityZHash, inputVector.y * speedValue, AnimationDamping, deltaTime); if (hasVelocityZParam) Anim.SetFloat(velocityZHash, inputVector.y * speedValue, AnimationDamping, deltaTime);
@@ -183,20 +233,7 @@ namespace OnlyScove.Scripts
public override void FixedUpdateNetwork() public override void FixedUpdateNetwork()
{ {
if (Object == null) return; if (Object == null || !Runner.IsRunning) return;
// ĐỒNG BỘ VỊ TRÍ: Ép nhân vật về vị trí mạng trước khi tính toán tick mới
// Điều này cực kỳ quan trọng để CharacterController không bị nhân đôi vận tốc khi Resimulation
if (NetworkedPosition != Vector3.zero)
{
if (Controller != null)
{
// Tạm thời tắt Controller để dịch chuyển Transform chính xác
Controller.enabled = false;
transform.position = NetworkedPosition;
Controller.enabled = true;
}
}
if (GetInput(out PlayerInputData data)) if (GetInput(out PlayerInputData data))
{ {
@@ -210,7 +247,10 @@ namespace OnlyScove.Scripts
IsSprintHeld = false; IsSprintHeld = false;
} }
if (!Object.HasInputAuthority && !Runner.IsServer) // Chỉ giả lập cho máy có quyền điều khiển hoặc Server
bool isSimulating = Object.HasInputAuthority || Runner.IsServer;
if (!isSimulating)
{ {
UpdateAnimator(Runner.DeltaTime); UpdateAnimator(Runner.DeltaTime);
return; return;
@@ -225,6 +265,19 @@ namespace OnlyScove.Scripts
currentState?.Tick(Runner.DeltaTime); currentState?.Tick(Runner.DeltaTime);
} }
private void Update()
{
bool isOffline = Runner == null || !Runner.IsRunning;
if (isOffline)
{
FixedUpdateNetwork();
if (!IsFinished && UI.MazeUI.Instance != null)
{
UI.MazeUI.Instance.UpdateTimer(Time.time - startTimeOffline);
}
}
}
private void CheckGround() private void CheckGround()
{ {
IsGrounded = Physics.CheckSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius, GroundMask); IsGrounded = Physics.CheckSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius, GroundMask);
@@ -282,5 +335,62 @@ namespace OnlyScove.Scripts
Gizmos.color = new Color(0, 1, 0, 0.5f); Gizmos.color = new Color(0, 1, 0, 0.5f);
Gizmos.DrawSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius); Gizmos.DrawSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius);
} }
#region Maze Winning Logic
public void CompleteMaze()
{
if (IsFinished) return;
float duration;
if (Runner != null && Runner.IsRunning)
{
duration = ((int)Runner.Tick - StartTick) * Runner.DeltaTime;
Rpc_BroadcastWin(Object.InputAuthority, duration);
}
else
{
duration = Time.time - startTimeOffline;
if (UI.MazeUI.Instance != null)
{
UI.MazeUI.Instance.ShowWinMessage("YOU (Offline)", duration);
}
}
IsFinished = true;
FinishTime = duration;
}
[Rpc(RpcSources.All, RpcTargets.All)]
public void Rpc_BroadcastWin(PlayerRef player, float time)
{
string playerName = $"Player {player.PlayerId}";
if (Runner != null && player == Runner.LocalPlayer) playerName = "YOU";
Debug.Log($"<color=yellow><b>[WINNER]</b></color> {playerName} reached the goal in <b>{time:F2}s</b>!");
if (UI.MazeUI.Instance != null)
{
UI.MazeUI.Instance.ShowWinMessage(playerName, time);
}
}
public override void Render()
{
bool isOffline = Runner == null || !Runner.IsRunning;
bool hasAuthority = Object != null && Object.HasInputAuthority;
if ((isOffline || hasAuthority) && !IsFinished)
{
float currentTimer = isOffline ? (Time.time - startTimeOffline) : (((int)Runner.Tick - StartTick) * Runner.DeltaTime);
if (UI.MazeUI.Instance != null)
{
UI.MazeUI.Instance.UpdateTimer(currentTimer);
}
}
}
#endregion
} }
} }

View File

@@ -0,0 +1,51 @@
using UnityEngine;
using TMPro;
using System.Collections;
namespace OnlyScove.Scripts.UI
{
public class MazeUI : MonoBehaviour
{
public static MazeUI Instance { get; private set; }
[Header("References")]
[SerializeField] private GameObject winPanel;
[SerializeField] private TextMeshProUGUI winMessageText;
[SerializeField] private TextMeshProUGUI timerText;
private void Awake()
{
if (Instance == null) Instance = this;
else Destroy(gameObject);
if (winPanel != null) winPanel.SetActive(false);
}
public void UpdateTimer(float time)
{
if (timerText != null)
timerText.text = $"Time: {time:F2}s";
}
public void ShowWinMessage(string playerName, float time)
{
if (winPanel == null) return;
winPanel.SetActive(true);
if (winMessageText != null)
{
winMessageText.text = $"<color=yellow>{playerName}</color>\nREACHED THE GOAL!\n<size=80%>IN {time:F2} SECONDS</size>";
}
// Tự động ẩn sau 5 giây
StopAllCoroutines();
StartCoroutine(HideWinPanel());
}
private IEnumerator HideWinPanel()
{
yield return new WaitForSeconds(5f);
winPanel.SetActive(false);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 4d7143f5824569245ae215ae06b6cce1

View File

@@ -1,47 +1,75 @@
using OnlyScove.Scripts; using OnlyScove.Scripts;
using UnityEngine; using UnityEngine;
using UnityEngine.UI;
using TMPro; using TMPro;
namespace UI namespace UI
{ {
public class MyUIDisplay : MonoBehaviour public class MyUIDisplay : MonoBehaviour
{
[Header("References")]
public PlayerDebugProvider playerDebugProvider;
[Header("UI Prompt")]
public GameObject interactionPromptContainer;
public UnityEngine.UI.Text interactionPromptText;
private void Start()
{ {
public PlayerDebugProvider playerDebugProvider; //if (playerDebugProvider == null)
//playerDebugProvider = FindFirstObjectByType<PlayerDebugProvider>();
[Header("UI Prompt")] // Luôn ẩn lúc bắt đầu
public GameObject interactionPromptContainer; if (interactionPromptContainer != null)
public TextMeshProUGUI interactionPromptText; interactionPromptContainer.SetActive(false);
private void Start() TryFindPlayer();
}
private void Update()
{
if (playerDebugProvider == null)
{ {
if (playerDebugProvider == null) TryFindPlayer();
playerDebugProvider = FindFirstObjectByType<PlayerDebugProvider>(); if (playerDebugProvider == null) return;
// Luôn ẩn lúc bắt đầu
if (interactionPromptContainer != null)
interactionPromptContainer.SetActive(false);
} }
if (interactionPromptContainer == null) return;
private void Update() IInteractable interactable = playerDebugProvider.GetActiveInteractable();
if (interactable != null)
{ {
if (playerDebugProvider == null || interactionPromptContainer == null) return; // Hiện UI tại vị trí cố định bạn đã đặt trong Canvas
interactionPromptContainer.SetActive(true);
IInteractable interactable = playerDebugProvider.GetActiveInteractable(); if (!interactionPromptContainer.activeSelf)
if (interactable != null)
{ {
// Hiện UI tại vị trí cố định bạn đã đặt trong Canvas
interactionPromptContainer.SetActive(true); interactionPromptContainer.SetActive(true);
}
if (interactionPromptText != null) if (interactionPromptText != null)
{ interactionPromptText.text = interactable.InteractionPrompt;
interactionPromptText.text = interactable.InteractionPrompt; }
} else
} {
else if (interactionPromptContainer.activeSelf)
{
interactionPromptContainer.SetActive(false); interactionPromptContainer.SetActive(false);
}
} }
} }
private void TryFindPlayer()
{
if (PlayerStateMachine.Local != null)
{
playerDebugProvider = PlayerStateMachine.Local.GetComponent<PlayerDebugProvider>();
}
if (playerDebugProvider == null)
{
playerDebugProvider = Object.FindFirstObjectByType<PlayerDebugProvider>();
}
}
}
} }

View File

@@ -132,7 +132,7 @@ Material:
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _BaseColor: {r: 0.07799999, g: 0.07799999, b: 0.07799999, a: 1} - _BaseColor: {r: 0.07799999, g: 0.07799999, b: 0.07799999, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 0.07799996, g: 0.07799996, b: 0.07799996, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

517
README.md
View File

@@ -1,2 +1,517 @@
# HALLUCINATE # 🌑 HALLUCINATE: The Asymmetric Mind-Game
[![Unity 6000.3.10f1](https://img.shields.io/badge/Unity-6000.3.10f1_LTS-black?logo=unity&logoColor=white)](https://unity.com/)
[![Photon Fusion](https://img.shields.io/badge/Networking-Photon_Fusion-blue)](https://www.photonengine.com/fusion)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
> **"Trong bóng tối của sự ảo giác, thị giác là công cụ mạnh mẽ nhất, nhưng sự tin tưởng lại là sai lầm chết người."**
**HALLUCINATE** là một dự án game PvP không đối xứng (Asymmetric PvP) đỉnh cao, nơi người chơi bước vào một cuộc đấu trí căng thẳng trong mê cung bóng tối. Một người nắm giữ **Ánh sáng (Seeker)**, người kia điều khiển **Cạm bẫy (Trapper)**. Đây không chỉ là trò chơi trốn tìm, đây là cuộc chiến về tâm lý và khả năng đọc tình huống.
---
## 📑 Mục lục (Table of Contents)
1. [Tầm nhìn Dự án (Project Vision)](#-tầm-nhìn-dự-án-project-vision)
2. [Cơ chế Trò chơi (Core Mechanics)](#-cơ-chế-trò-chơi-core-mechanics)
3. [Kiến trúc Kỹ thuật (Technical Architecture)](#-kiến-trúc-kỹ-thuật-technical-architecture)
4. [Hệ thống Mê cung (Maze Generation)](#-hệ-thống-mê-cung-maze-generation)
5. [Đồng bộ Mạng (Networking)](#-đồng-bộ-mạng-networking)
6. [Hệ thống Comeback (Comeback System)](#-hệ-thống-comeback-đa-tầng-tiered-adaptive-system)
7. [Lộ trình Phát triển (Roadmap)](#-lộ-trình-phát-triển-roadmap)
8. [Cấu trúc Thư mục (Folder Structure)](#-cấu-trúc-thư-mục-dự-án-project-folder-structure)
9. [Hướng dẫn Cài đặt (Installation)](#-hướng-dẫn-cài-đặt-installation)
---
## 👁️ Tầm nhìn Dự án (Project Vision)
![Game Concept Art](https://scove-vault.duckdns.org/files/api/preview/big/ScoveThing/New%20Picture/modeus_1.jpg?inline=true&key=1775622184946)
Dự án hướng tới việc tạo ra một trải nghiệm **"High-Stakes Hide & Seek"**. Trọng tâm không nằm ở hành động nhanh mà ở sự **kiên nhẫn****tính toán**.
* **Minimalist UI:** Giảm thiểu UI để người chơi tập trung hoàn toàn vào môi trường.
* **Spatial Audio:** Âm thanh là "bản đồ" thứ hai.
* **Dynamic Lighting:** Ánh sáng không chỉ để nhìn, mà là công cụ để lộ diện hoặc ẩn mình.
---
## 🎮 Cơ chế Trò chơi (Core Mechanics)
### 🌓 Sự bất đối xứng (The Asymmetry)
| Chỉ số | Seeker (Người Tìm Đường) | Trapper (Kẻ Đặt Bẫy) |
| :--- | :--- | :--- |
| **Vai trò** | Chủ động di chuyển, tìm lối thoát. | Phòng thủ, đặt bẫy, chặn đường. |
| **Tầm nhìn** | Góc nhìn thứ nhất (FPS), đèn pin giới hạn. | Góc nhìn tổng thể (Top-down) hoặc Camera an ninh. |
| **Tốc độ** | Nhanh (Sprinting: 9.0m/s). | Chậm hơn nhưng có khả năng dịch chuyển. |
| **Công cụ** | Đèn pin, Dash, Parkour. | Bẫy kẹp, Bẫy âm thanh, Khóa cửa. |
### 🔄 Vòng lặp Gameplay & Kiến trúc Hệ thống (Game Loop & System Architecture)
```mermaid
graph TD
%% Định nghĩa Style cho các nhóm
classDef initStyle fill:#e1f5fe,stroke:#01579b,stroke-width:2px,color:#01579b;
classDef seekerStyle fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#e65100;
classDef trapperStyle fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#4a148c;
classDef netStyle fill:#eceff1,stroke:#263238,stroke-dasharray: 5 5,color:#263238;
classDef winStyle fill:#e8f5e9,stroke:#1b5e20,stroke-width:3px,color:#1b5e20;
classDef criticalStyle fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#b71c1c;
%% Phase 1: Initialization
subgraph Initialization ["<b>1. KHỞI TẠO HỆ THỐNG (NET-SYNC)</b>"]
A["🚀 Bắt đầu Trận đấu"] --> B{"🤝 Matchmaking<br/>(Photon Fusion)"}
B --> C["🎭 Phân vai: Seeker vs Trapper"]
C --> D["🧩 Maze Generator<br/>(Prims/Wilsons)"]
D --> E["🏗️ Baking NavMesh & Colliders"]
E --> F["🧍 Character Auto-Setup"]
F --> G["📍 Spawn Players"]
end
class Initialization,A,B,C,D,E,F,G initStyle;
%% Phase 2: Core Loop
subgraph Active_Round ["<b>2. VÒNG LẶP CHIẾN ĐẤU (CORE LOOP)</b>"]
G --> Loop((TICK: FixedUpdateNetwork))
%% Seeker Branch
subgraph Seeker_Logic ["<b>🏃 SEEKER (POV 1st)</b>"]
S1["⌨️ Input: WASD/Space"] --> S2["🏃 State: Move/Dash"]
S2 --> S3{"⚡ Hành động?"}
S3 -- "Sprinting" --> S4["🔊 Noise Up"]
S3 -- "Sneaking" --> S5["🤫 Noise Down"]
S3 -- "Flashlight" --> S6["🔦 Lộ vị trí"]
S4 & S5 & S6 --> S_Check{"🔍 Check Env"}
S_Check -- "Dẫm bẫy" --> S_Trap["⚠️ Bị khống chế"]
end
%% Trapper Branch
subgraph Trapper_Logic ["<b>🕸️ TRAPPER (STRATEGY)</b>"]
T1["🖱️ Mouse Input"] --> T2["🗺️ View: Heatmap/Cams"]
T2 --> T3{"🛠️ Kỹ năng?"}
T3 -- "Đặt bẫy" --> T4["🪤 Sync Trap"]
T3 -- "Scan" --> T5["📡 Ping Seeker"]
T3 -- "Lock" --> T6["🚪 Khóa cửa"]
T4 & T5 & T6 --> T_Check{"👁️ Theo dõi"}
end
%% Networking Layer
subgraph Network_Sync ["<b>🌐 NETWORK SYNC</b>"]
Loop --> NS1["⏩ Client Prediction"]
NS1 --> NS2["🔄 Server Reconciliation"]
NS2 --> NS3["📦 State Sync"]
end
end
class Seeker_Logic,S1,S2,S3,S4,S5,S6,S_Check seekerStyle;
class Trapper_Logic,T1,T2,T3,T4,T5,T6,T_Check trapperStyle;
class Network_Sync,NS1,NS2,NS3,Loop netStyle;
class S_Trap criticalStyle;
%% Phase 3: Results
subgraph Result_Logic ["<b>3. KẾT THÚC & THƯỞNG</b>"]
S_Check -- "Chạm Exit" --> Win_S["🏆 SEEKER THẮNG"]
T_Check -- "Bắt được Seeker" --> Win_T["🏆 TRAPPER THẮNG"]
Loop -- "Timer = 0" --> Win_T
Win_S & Win_T --> Post_Match["📊 Thống kê Rank"]
Post_Match --> Buff{"⚖️ Balance Check"}
Buff -- "Thua cuộc" --> Buff_Apply["💎 Kích hoạt Comeback Buff"]
Buff_Apply --> A
end
class Win_S,Win_T winStyle;
class Result_Logic,Post_Match,Buff,Buff_Apply initStyle;
%% Interactions (Dashed Lines)
S_Trap -.->|Cảnh báo| T_Check
S4 -.->|Sóng âm| T2
T4 -.->|Collision ẩn| S_Check
NS3 --> Loop
```
---
## 🏗️ Kiến trúc Kỹ thuật (Technical Architecture)
### 1. Advanced Player & Camera State Machine
Hệ thống điều khiển nhân vật không chỉ quản lý hành động mà còn điều phối **Camera Dynamics** để tăng cường cảm giác nhập vai và đồng bộ hóa hướng nhìn qua mạng.
```mermaid
stateDiagram-v2
direction TB
state "🌸 GROUND" as Ground {
[*] --> Idle
state Idle {
I_P: 📝 Vel < 0.1m/s
I_C: 🌡️ Breathing (0.5Hz)
}
Idle --> Moving : "Input.mag > 0.1"
state Moving {
M_P: 👟 Speed 2-4m/s
M_C: 🎢 Head Bob (1.2Hz)
}
Moving --> Sneaking : "OnSneak (Hold)"
state Sneaking {
Sn_P: 🤫 Noise -50%
Sn_C: 📉 Lower Height
}
Moving --> Sprinting : "OnSprint (Hold)"
state Sprinting {
Sp_P: ⚡ Speed > 6.5m/s
Sp_C: 🌈 Dynamic FOV
}
Sprinting --> Moving : "Stamina Empty"
Sneaking --> Moving : "Release Sneak"
}
state "☁️ AIRBORNE" as Air {
state Jump {
J_P: 🆙 AddForce Up
}
state Falling {
F_P: 📉 Gravity x 1.5
}
state Landing {
L_P: 📏 Impact Check
}
Jump --> Falling : "Vel.y < 0"
Falling --> Landing : "IsGrounded == true"
}
state "⚡ ACTION" as Utility {
state Dashing {
D_P: 💨 Burst 15m/s
}
state Interacting {
Int_P: 🔒 Root Motion Lock
}
}
state "🌐 NETWORK" as Net {
state "Input Authority" as IA
state "State Authority" as SA
IA --> SA : "Send Input"
SA --> IA : "Reconcile"
}
%% Transitions chính
Ground --> Air : "IsGrounded == false"
Air --> Ground : "OnLand Event"
Ground --> Utility : "OnAbility"
Utility --> Ground : "Complete"
%% Sửa lỗi Note bằng cấu trúc block ✨
note left of Ground
✨ Sync: Velocity
✨ State: MoveState
end note
note right of Net
⚙️ Photon Fusion
⚙️ FixedUpdateNetwork
end note
```
### 2. Environment Scanner & Interaction
Hệ thống quét vật thể (`EnvironmentScanner.cs`) sử dụng **SphereCast****OverlapSphere** để phát hiện các đối tượng `IInteractable` trong phạm vi tương tác, đảm bảo tính chính xác ngay cả trong bóng tối.
---
## 🧩 Hệ thống Mê cung (Maze Generation)
Trái tim của **HALLUCINATE** là hệ thống tạo mê cung đa thuật toán, mang lại sự đa dạng vô hạn.
| Algorithm | Complexity | Description |
| :--- | :--- | :--- |
| **Prims** | O(E log V) | Tạo mê cung "dày", nhiều nhánh ngắn, lý tưởng cho việc đặt bẫy. |
| **Wilsons** | O(N) | Thuật toán ngẫu nhiên hoàn hảo, không có thiên hướng cấu trúc nhất định. |
| **Recursive** | O(N) | Tạo ra các hành lang dài và sâu, tăng áp lực cho Seeker. |
| **Crawler** | O(N) | Tạo ra các không gian mở giống hang động hơn là mê cung truyền thống. |
### Quy trình khởi tạo (Maze Generation Pipeline)
```mermaid
graph TD
%% Định nghĩa Style
classDef lossStyle fill:#ffebee,stroke:#c62828,stroke-width:2px,color:#c62828;
classDef tier1Style fill:#fff8e1,stroke:#fbc02d,stroke-width:2px,color:#f57f17;
classDef tier2Style fill:#fff3e0,stroke:#fb8c00,stroke-width:2px,color:#e65100;
classDef tier3Style fill:#fbe9e7,stroke:#ff5722,stroke-width:2px,color:#bf360c;
classDef systemStyle fill:#f5f5f5,stroke:#424242,stroke-width:2px,color:#424242;
classDef winStyle fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px,color:#1b5e20;
%% Quy trình chính
Start(("💔 <b>PLAYER LOSES ROUND</b>")) --> Streak{{"📊 Check Loss Streak"}}
%% Phân tầng Buff
subgraph Buff_Pools ["<b>🔥 HỆ THỐNG CÂN BẰNG ĐỘNG (COMEBACK POOLS)</b>"]
Streak -- "1 Trận" --> T1
Streak -- "2 Trận" --> T2
Streak -- "3+ Trận" --> T3
T1["🥉 <b>Tier 1: Awakening</b><br/>(Small Boosts)"]
T2["🥈 <b>Tier 2: Evolution</b><br/>(Tactical Advantage)"]
T3["🥇 <b>Tier 3: Manifestation</b><br/>(Game Changer)"]
%% Ví dụ chỉ số (Tooltip-like)
T1 --- T1_Ex["+10% Speed<br/>+15% Stamina Regen"]
T2 --- T2_Ex["Bẫy tàng hình (Trapper)<br/>Giảm 50% tiếng ồn (Seeker)"]
T3 --- T3_Ex["Nhìn xuyên tường 5s<br/>Hồi sinh 1 lần tại chỗ"]
end
%% Giai đoạn áp dụng
T1 & T2 & T3 --> Selection{{"🎲 Selection Mode"}}
Selection -- "Manual" --> P1["Người chơi tự chọn 1 trong 3 Buff"]
Selection -- "Auto" --> P2["Hệ thống chọn ngẫu nhiên"]
P1 & P2 --> Apply["✨ <b>Apply to Next Round Only</b><br/>(Trạng thái: Active)"]
%% Kết quả vòng đấu sau
Apply --> Result{{"🏁 New Round Result?"}}
Result -- "🏆 WIN" --> Reset["♻️ <b>Reset Streak</b><br/>Remove All Buffs"]
Result -- "❌ LOSS" --> Increment["📈 <b>Increase Streak</b><br/>Progress to Next Tier"]
%% Vòng lặp
Reset --> NewGame(("🎮 Fair Match"))
Increment --> Start
%% Gán Style
class Start,Increment lossStyle;
class T1,T1_Ex tier1Style;
class T2,T2_Ex tier2Style;
class T3,T3_Ex tier3Style;
class Selection,P1,P2,Apply systemStyle;
class Result,Reset,NewGame winStyle;
```
---
## 🌐 Đồng bộ Mạng (Networking)
Sử dụng **Photon Fusion (State Sync)** với cơ chế Client-Side Prediction để đảm bảo trải nghiệm không độ trễ.
### Network Data Flow & Synchronization
```mermaid
sequenceDiagram
autonumber
%% Định nghĩa các bên tham gia (Rút gọn để tránh lỗi render)
participant IR as 🖱️ Input
participant CP as 🎀 Local Player
participant NT as 🌐 Fusion Net
participant S as 👑 Server
participant RP as 👥 Proxies
%% --- GIAI ĐOẠN 1 ---
Note over IR, CP: [PHASE 1] Thu thập Input
IR->>CP: OnMove / OnJump / OnSprint
CP->>CP: 📦 Pack NetworkInputData
%% --- GIAI ĐOẠN 2 ---
Note over CP: [PHASE 2] Dự đoán (Prediction)
CP->>CP: 🏃 Run Client-Side Physics
CP->>NT: ✉️ Send Input (Tick N)
%% --- GIAI ĐOẠN 3 ---
Note over NT, S: [PHASE 3] Truyền tin mạng
NT->>S: UDP Packet Delivery
Note right of S: SERVER SIMULATION
S->>S: 📝 Validate & Update State
S-->>NT: 📣 Snapshot (Tick N)
%% --- GIAI ĐOẠN 4 ---
Note over NT, CP: [PHASE 4] Hồi đáp & Đồng bộ
NT-->>CP: State Snapshot
Note over CP: 🔄 RECONCILIATION
CP->>CP: Fix Position if Error > Threshold
%% --- GIAI ĐOẠN 5 ---
Note over NT, RP: [PHASE 5] Proxy Update
NT-->>RP: State Snapshot
Note over RP: 🎞️ INTERPOLATION (Lerp)
%% --- GIAI ĐOẠN 6 ---
Note over CP, RP: [PHASE 6] Hiển thị (Render)
CP->>CP: Update Camera Shake/VFX
RP->>RP: Smooth Mesh Movement
```
---
## ⚖️ Hệ thống Comeback Đa tầng (Tiered Adaptive System)
Để đảm bảo mỗi trận đấu đều kịch tính đến giây cuối cùng, HALLUCINATE áp dụng hệ thống **"Despair Mechanics"**. Người chơi có chuỗi thua càng dài sẽ nhận được quyền năng từ mê cung càng lớn, tạo ra những khoảnh khắc lật kèo kinh điển.
### 📈 Phân tầng Buff theo Chuỗi Thua (Tiered Progression)
| Chuỗi Thua | Phân tầng | Tên gọi | Quyền năng & Cơ chế |
| :--- | :--- | :--- | :--- |
| **1 Trận** | Tier 1 | *Awakening* | Chọn 1 Buff cơ bản (Tăng tốc +15% hoặc Mở rộng tầm nhìn +20%). |
| **2 Trận** | Tier 2 | *Evolution* | Nhận 1 Buff chủ động (Kỹ năng nhấn nút) + 1 Buff bị động (Nâng cấp chỉ số). |
| **3+ Trận** | Tier 3 | *Manifestation* | **Ultimate Skill:** Kỹ năng thay đổi luật chơi trong 30s. Mê cung sẽ hỗ trợ bạn trực tiếp. |
---
### 🏃 Seeker: Ý chí Sinh tồn (Survival Evolution)
Khi Seeker liên tục thất bại, các giác quan của họ sẽ tiến hóa vượt bậc để chống lại bóng tối:
* **Tier 1 - Sixth Sense (Linh cảm):** Seeker bắt đầu nghe thấy tiếng tim đập của chính mình nhanh hơn khi Trapper đang ở gần (bán kính 15m), giúp định vị mà không cần nhìn.
* **Tier 2 - Shadow Step (Bước chân hư vô):** Di chuyển hoàn toàn không gây ra tiếng động (Noise Meter = 0) trong 20 giây đầu của trận đấu. Cho phép Seeker thiết lập vị trí an toàn sớm.
* **Tier 2 - Trap Reflex (Phản xạ tột độ):** Seeker có 50% cơ hội tự động vô hiệu hóa bẫy kẹp đầu tiên dẫm phải. Nếu thành công, Seeker sẽ được tăng 50% tốc độ chạy trong 3s.
* **Tier 3 - Ultimate: Chrono Dash:** Trong 15 giây, Seeker có thể thực hiện Dash không giới hạn (No Cooldown) và trở nên miễn nhiễm với mọi loại khống chế. Lúc này, Seeker là kẻ săn lùng lối thoát.
---
### 👁️ Trapper: Quyền năng Bóng tối (Dark Rituals)
Khi Trapper để xổng mất con mồi, mê cung sẽ hiến tế sự ổn định của nó để ban cho Trapper những quyền năng thao túng cực hạn:
* **Tier 1 - Paranoia Echo (Tiếng vọng ảo giác):** Tự động tạo ra 3 nguồn âm thanh bước chân giả chạy xung quanh Seeker để gây nhiễu loạn khả năng định hướng bằng âm thanh của họ.
* **Tier 2 - Global Blackout (Bóng tối bao trùm):** Kích hoạt khiến đèn pin của Seeker bị nhiễu (Flicker) hoặc tắt hoàn toàn trong 8 giây. Đây là thời điểm vàng để Trapper thu hẹp khoảng cách.
* **Tier 2 - Ghosting (Dịch chuyển không gian):** Trapper nhận khả năng đi xuyên qua các cánh cửa đã bị khóa hoặc các bức tường mỏng (Destructible Walls) trong 15 giây.
* **Tier 3 - Ultimate: Eye of the Abyss:** Hiển thị vị trí thực của Seeker xuyên tường (Wallhack) dưới dạng bóng đen trong 20 giây. Seeker không thể trốn chạy, chỉ có thể cầu nguyện.
---
## 🚀 Lộ trình Phát triển (Roadmap)
- [x] **Phase 1: Foundation**
- [x] Player State Machine (Idle, Move, Run, Jump).
- [x] Maze Generation (Multi-algorithm).
- [x] Photon Fusion Integration.
- [ ] **Phase 2: Gameplay Core**
- [ ] Role Selection (Seeker vs Trapper).
- [ ] Trap Placement System.
- [ ] Sound & Visual Detection (Noise Meter).
---
## 📂 Cấu trúc Thư mục Dự án (Project Folder Structure)
Dự án được tổ chức theo tiêu chuẩn công nghiệp (Standard Industry Practices), tách biệt rõ ràng giữa logic Code, Assets và Configuration.
```text
📦 HALLUCINATE
├── 🌸 Assets/ (Trái tim của trò chơi)
│ ├── 📜 Scripts/ (Phép thuật điều khiển logic)
│ │ ├── 🏷️ Attributes/ # Tùy biến Inspector
│ │ ├── 🎥 Camera Controller/
│ │ ├── 🛠️ Debug/
│ │ ├── 🌐 Fusion/
│ │ │ └── 🚀 BasicSpawner.cs
│ │ ├── 🏗️ GameSetup/
│ │ │ ├── 🌀 Maze/ # Mê cung
│ │ │ │ ├── 🐾 Crawler.cs
│ │ │ │ ├── 🌳 Prims.cs
│ │ │ │ ├── 🧵 Wilsons.cs
│ │ │ │ └── 🗺️ Maze.cs
│ │ │ └── 🧍 CharacterAutoSetup.cs
│ │ ├── 🖱️ Interactables/
│ │ │ ├── 🚪 DoorInteractable.cs
│ │ │ ├── 💡 LampInteractable.cs
│ │ │ └── 💎 BaseInteractable.cs
│ │ ├── 📐 Interface/
│ │ ├── 🏃‍♀️ Player Controller/
│ │ │ ├── 🧠 PlayerStateMachine.cs
│ │ │ ├── ⌨️ InputReader.cs
│ │ │ └── 🎭 States/
│ │ ├── ⚡ Optimization/
│ │ ├── 🖥️ UI/
│ │ └── 🎆 VFX/
│ ├── 🧸 Prefabs/
│ ├── 📖 document/
│ ├── 🎬 Scenes/
│ ├── 🎨 Materials/
│ ├── 👸 Models/
│ ├── 💃 Animation/
│ ├── 🔌 Photon/
│ ├── 🅰️ TextMesh Pro/
│ └── ⚙️ Settings/
├── 🛠️ ProjectSettings/
│ ├── 🏷️ TagManager.asset
│ ├── 🌍 DynamicsManager.asset
│ └── 📡 MultiplayerManager.asset
├── 📦 Packages/
└── 📝 README.md # Creator (。•̀ᴗ-)✧
```
---
## 🤝 Hướng dẫn Cài đặt & Khởi chạy (Installation & Setup)
Để trải nghiệm **HALLUCINATE** một cách mượt mà nhất, vui lòng thực hiện theo các bước chi tiết dưới đây:
### 1. Yêu cầu Hệ thống
* **Unity Editor:** Phiên bản **6000.3.10f1 (Unity 6)** trở lên.
* **Hệ điều hành:** Windows 10/11 hoặc macOS (M1/M2/Intel).
* **Disk Space:** Tối thiểu 5GB trống để chứa Project và Library.
### 2. Tải về & Mở dự án
1. **Clone Repository:**
```bash
git clone https://github.com/OnlyScove/HALLUCINATE.git
```
2. Mở **Unity Hub**, chọn **Add** -> **Add project from disk**.
3. Tìm đến thư mục vừa clone và nhấn **Open**. Chờ Unity Hub tải các Packages cần thiết (có thể mất vài phút).
### 3. Cấu hình Photon Fusion (Bắt buộc)
Trò chơi yêu cầu **AppID** hợp lệ để hoạt động qua mạng:
1. Đăng nhập vào [Photon Engine Dashboard](https://dashboard.photonengine.com/).
2. Tạo một ứng dụng mới với loại App là **Fusion**.
3. Sao chép **App ID** vừa tạo.
4. Trong Unity Editor, đi đến: `Photon` -> `Fusion` -> `Network Project Settings`.
5. Dán App ID vào mục **App Id Fusion** (cho cả Realtime và Fusion).
6. Đảm bảo **Network Mode** được đặt là `Client/Server` (để hỗ trợ State Authority).
### 4. Khởi chạy Trò chơi
1. Mở Scene chính tại: `Assets/Scenes/Main Scene.unity`.
2. Sử dụng **Smart Bootstrapper** (nằm ở thanh Menu trên cùng) để tự động cấu hình Runner.
3. Nhấn nút **Play** trong Unity Editor.
4. Để test Multiplayer, bạn có thể build ra file `.exe` hoặc sử dụng công cụ **ParrelSync** (nếu đã cài) để chạy hai instance cùng lúc.
---
## 💖 Support & Community
<p align="center">
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/stars/OnlyScove/HALLUCINATE?style=for-the-badge&logo=github&color=yellow" alt="Stars">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/forks/OnlyScove/HALLUCINATE?style=for-the-badge&logo=github&color=blue" alt="Forks">
</a>
<a href="https://scove-vault.duckdns.org/scove">
<img src="https://img.shields.io/github/followers/OnlyScove?style=for-the-badge&logo=github&color=green" alt="Follow">
</a>
</p>
<p align="center">
<a href="https://www.buymeacoffee.com/yourname">
<img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Donate-orange?style=for-the-badge&logo=buy-me-a-coffee&logoColor=white" alt="Buy Me A Coffee">
</a>
<a href="https://discord.gg/4xCYJvF4S2">
<img src="https://img.shields.io/badge/Discord-Join%20Community-7289DA?style=for-the-badge&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://ko-fi.com/yourname">
<img src="https://img.shields.io/badge/Ko--fi-Support-red?style=for-the-badge&logo=ko-fi&logoColor=white" alt="Ko-fi">
</a>
</p>
<p align="center">
<img src="https://scove-vault.duckdns.org/files/api/preview/big/ScoveThing/New%20Picture/mod.png?inline=true&key=1775622174908" alt="Visitors">
</p>
---
**© 2026 SCOVANIA STUDIOS.**
*Hallucinate is more than a game, it's a social experiment.*