Update
This commit is contained in:
13
.idea/.idea.HALLUCINATE/.idea/workspace.xml
generated
13
.idea/.idea.HALLUCINATE/.idea/workspace.xml
generated
@@ -6,11 +6,12 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/CuaDangPrototype[Don'tMove]/Seagram tfb SDF.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/CuaDangPrototype[Don'tMove]/Seagram tfb SDF.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scove/DEMO FUSION.unity" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scove/DEMO FUSION.unity.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scove/UIScaleTest.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scove/UIScaleTest.unity" 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" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/HUDController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/HUDController.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/UIManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/UIManager.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UI/Documents/Settings.uxml" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UI/Documents/Settings.uxml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UI/Styles/Global.uss" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UI/Styles/Global.uss" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -27,6 +28,7 @@
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Attributes/Health.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Interactables/BaseInteractable.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Interactables/HealthInteractable.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/UI/LobbyController.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="McpProjectServerCommands">
|
||||
<commands />
|
||||
@@ -137,7 +139,8 @@
|
||||
<workItem from="1776780627914" duration="11380000" />
|
||||
<workItem from="1776848005294" duration="47000" />
|
||||
<workItem from="1776910642766" duration="2290000" />
|
||||
<workItem from="1776940053256" duration="7779000" />
|
||||
<workItem from="1776940053256" duration="13616000" />
|
||||
<workItem from="1777113431258" duration="2380000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
8
Assets/Resources/Localization.meta
Normal file
8
Assets/Resources/Localization.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 115b7971291d64d42bf41732f4d2fcb6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/Resources/Localization/en.json
Normal file
15
Assets/Resources/Localization/en.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"menu_create": "CREATE ROOM",
|
||||
"menu_join": "JOIN ROOM",
|
||||
"menu_settings": "SETTINGS",
|
||||
"menu_exit": "EXIT",
|
||||
"settings_title": "SETTINGS",
|
||||
"settings_general": "GENERAL",
|
||||
"settings_graphics": "GRAPHICS",
|
||||
"settings_audio": "AUDIO",
|
||||
"settings_controls": "CONTROLS",
|
||||
"settings_back": "BACK",
|
||||
"label_fov": "Field of View",
|
||||
"label_sensitivity": "Sensitivity",
|
||||
"label_language": "Language"
|
||||
}
|
||||
7
Assets/Resources/Localization/en.json.meta
Normal file
7
Assets/Resources/Localization/en.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d949fd6576700b54eb12847a360f99cd
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/Resources/Localization/vi.json
Normal file
15
Assets/Resources/Localization/vi.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"menu_create": "TẠO PHÒNG",
|
||||
"menu_join": "VÀO PHÒNG",
|
||||
"menu_settings": "CÀI ĐẶT",
|
||||
"menu_exit": "THOÁT",
|
||||
"settings_title": "CÀI ĐẶT",
|
||||
"settings_general": "CHUNG",
|
||||
"settings_graphics": "ĐỒ HỌA",
|
||||
"settings_audio": "ÂM THANH",
|
||||
"settings_controls": "ĐIỀU KHIỂN",
|
||||
"settings_back": "QUAY LẠI",
|
||||
"label_fov": "Tầm nhìn (FOV)",
|
||||
"label_sensitivity": "Độ nhạy chuột",
|
||||
"label_language": "Ngôn ngữ"
|
||||
}
|
||||
7
Assets/Resources/Localization/vi.json.meta
Normal file
7
Assets/Resources/Localization/vi.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f5574ecd78b063488d5a0a2609bf48a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -256,6 +256,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 666657093}
|
||||
- component: {fileID: 666657092}
|
||||
- component: {fileID: 666657094}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Profile
|
||||
m_TagString: Untagged
|
||||
@@ -301,6 +302,18 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &666657094
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 666657091}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fdea16b110511ef45889ed832b63560b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.ProfileController
|
||||
--- !u!1 &1136953558
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -311,6 +324,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1136953560}
|
||||
- component: {fileID: 1136953559}
|
||||
- component: {fileID: 1136953561}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_HUD
|
||||
m_TagString: Untagged
|
||||
@@ -356,6 +370,19 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1136953561
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1136953558}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e79b70607af6eeb458c8eb6605e39b56, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.HUDController
|
||||
hudDocument: {fileID: 1136953559}
|
||||
--- !u!1 &1183887568
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -382,26 +409,36 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 1183887568}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3f728362556756d45bddb65280fdab1d, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: bcb7b8ed439bb4546b0648c627c2ce5d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.UIManager
|
||||
screens:
|
||||
- screenName: Doc_MainMenu
|
||||
document: {fileID: 2003742651}
|
||||
isActive: 0
|
||||
isOverlay: 0
|
||||
customCursor: {fileID: 0}
|
||||
- screenName: Doc_Lobby
|
||||
document: {fileID: 1471116802}
|
||||
isActive: 0
|
||||
isOverlay: 0
|
||||
customCursor: {fileID: 0}
|
||||
- screenName: Doc_HUD
|
||||
document: {fileID: 1136953559}
|
||||
isActive: 0
|
||||
isOverlay: 0
|
||||
customCursor: {fileID: 0}
|
||||
- screenName: Doc_Settings
|
||||
document: {fileID: 1582124357}
|
||||
isActive: 0
|
||||
isOverlay: 0
|
||||
customCursor: {fileID: 0}
|
||||
- screenName: Doc_Profile
|
||||
document: {fileID: 666657092}
|
||||
isActive: 0
|
||||
globalOpacity: 1
|
||||
isActive: 1
|
||||
isOverlay: 0
|
||||
customCursor: {fileID: 0}
|
||||
defaultCursor: {fileID: 0}
|
||||
--- !u!4 &1183887570
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -432,6 +469,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1471116803}
|
||||
- component: {fileID: 1471116802}
|
||||
- component: {fileID: 1471116804}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Lobby
|
||||
m_TagString: Untagged
|
||||
@@ -477,6 +515,18 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1471116804
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1471116801}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9c37c552a9c18a242bcc8860a0a5212f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.LobbyController
|
||||
--- !u!1 &1582124356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -487,6 +537,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1582124358}
|
||||
- component: {fileID: 1582124357}
|
||||
- component: {fileID: 1582124359}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Settings
|
||||
m_TagString: Untagged
|
||||
@@ -532,6 +583,18 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1582124359
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1582124356}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5534bcf4869df944883c6fd2a17a6a5a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.SettingsController
|
||||
--- !u!1 &1848374378
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -679,6 +742,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 2003742650}
|
||||
- component: {fileID: 2003742651}
|
||||
- component: {fileID: 2003742652}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_MainMenu
|
||||
m_TagString: Untagged
|
||||
@@ -724,6 +788,18 @@ MonoBehaviour:
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!114 &2003742652
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2003742649}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 691980524acfc544f9660cfc35ce3616, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.MainMenuController
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -47,36 +47,15 @@ namespace OnlyScove.Scripts
|
||||
[field: SerializeField] public LayerMask InteractionMask { get; private 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 float NetworkedSpeed { get; set; }
|
||||
[Networked] public Vector3 NetworkedPosition { get; set; }
|
||||
|
||||
[Header("Player Stats")]
|
||||
[Networked, OnChangedRender(nameof(OnHealthChangedRender))]
|
||||
public float Health { get; set; } = 100f;
|
||||
[Networked, OnChangedRender(nameof(OnHealthChangedRender))] public float Health { get; set; } = 100f;
|
||||
[Networked, OnChangedRender(nameof(OnStaminaChangedRender))] public float Stamina { get; set; } = 100f;
|
||||
[Networked, OnChangedRender(nameof(OnNoiseLevelChangedRender))] public float NoiseLevel { get; set; } = 0f;
|
||||
|
||||
[Networked, OnChangedRender(nameof(OnStaminaChangedRender))]
|
||||
public float Stamina { get; set; } = 100f;
|
||||
|
||||
[Networked, OnChangedRender(nameof(OnNoiseLevelChangedRender))]
|
||||
public float NoiseLevel { get; set; } = 0f;
|
||||
|
||||
// Sự kiện để UI lắng nghe
|
||||
public event System.Action<float> OnHealthChanged;
|
||||
public event System.Action<float> OnStaminaChanged;
|
||||
public event System.Action<float> OnNoiseLevelChanged;
|
||||
@@ -87,19 +66,26 @@ namespace OnlyScove.Scripts
|
||||
public float VelocityY { get; set; }
|
||||
public bool IsGrounded { get; private set; }
|
||||
public bool WasGrounded { get; private set; }
|
||||
|
||||
private List<IInteractable> interactablesNearby = new List<IInteractable>();
|
||||
private int currentInteractableIndex = 0;
|
||||
|
||||
public string CurrentStateName => currentState != null ? currentState.GetType().Name : "None";
|
||||
|
||||
public static PlayerStateMachine Local { get; private set; }
|
||||
|
||||
public Quaternion CameraRotation
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Runner != null && Runner.IsRunning && Object != null) return NetworkedCameraRotation;
|
||||
return Cam != null ? Cam.PlanarRotation : transform.rotation;
|
||||
}
|
||||
}
|
||||
|
||||
private PlayerBaseState currentState;
|
||||
private bool hasControl = true;
|
||||
private bool hasSpeedParam;
|
||||
private bool hasVelocityXParam;
|
||||
private bool hasVelocityZParam;
|
||||
private List<IInteractable> interactablesNearby = new List<IInteractable>();
|
||||
private int currentInteractableIndex = 0;
|
||||
private float localAnimatorSpeed;
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
@@ -125,41 +111,30 @@ namespace OnlyScove.Scripts
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (Runner == null || !Runner.IsRunning)
|
||||
{
|
||||
InitializePlayer();
|
||||
}
|
||||
if (Runner == null || !Runner.IsRunning) InitializePlayer();
|
||||
}
|
||||
|
||||
public override void Spawned()
|
||||
{
|
||||
InitializePlayer();
|
||||
|
||||
if (Object != null && !Object.HasInputAuthority && Runner.IsClient)
|
||||
{
|
||||
if (Controller != null) Controller.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Callbacks từ attribute OnChangedRender
|
||||
void OnHealthChangedRender() => OnHealthChanged?.Invoke(Health);
|
||||
void OnStaminaChangedRender() => OnStaminaChanged?.Invoke(Stamina);
|
||||
void OnNoiseLevelChangedRender() => OnNoiseLevelChanged?.Invoke(NoiseLevel);
|
||||
|
||||
private void InitializePlayer()
|
||||
{
|
||||
if (currentState == null)
|
||||
{
|
||||
SwitchState(new PlayerIdleState(this));
|
||||
}
|
||||
if (currentState == null) SwitchState(new PlayerIdleState(this));
|
||||
|
||||
bool isOffline = Runner == null || !Runner.IsRunning;
|
||||
bool hasAuthority = Object != null && Object.HasInputAuthority;
|
||||
|
||||
if (isOffline || hasAuthority)
|
||||
if (isOffline || (Object != null && Object.HasInputAuthority))
|
||||
{
|
||||
Local = this;
|
||||
|
||||
CameraController cameraController = GameObject.FindAnyObjectByType<CameraController>();
|
||||
if (cameraController != null)
|
||||
{
|
||||
@@ -167,26 +142,17 @@ namespace OnlyScove.Scripts
|
||||
Cam.followTarget = transform;
|
||||
Cam.inputReader = Input;
|
||||
}
|
||||
|
||||
Input.OnNextInteractEvent += OnNextInteract;
|
||||
Input.OnPreviousInteractEvent += OnPreviousInteract;
|
||||
|
||||
if (Controller != null) Controller.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private float localAnimatorSpeed;
|
||||
|
||||
public void Rotate(Vector3 moveDirection, float deltaTime)
|
||||
{
|
||||
if (moveDirection == Vector3.zero) return;
|
||||
|
||||
Quaternion targetRot = Quaternion.LookRotation(moveDirection);
|
||||
transform.rotation = Quaternion.RotateTowards(
|
||||
transform.rotation,
|
||||
targetRot,
|
||||
RotationSpeed * deltaTime
|
||||
);
|
||||
transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRot, RotationSpeed * deltaTime);
|
||||
}
|
||||
|
||||
public void Move(Vector3 velocity, float animatorSpeed, float deltaTime)
|
||||
@@ -197,40 +163,23 @@ namespace OnlyScove.Scripts
|
||||
if (Controller != null && Controller.enabled)
|
||||
{
|
||||
Controller.Move(velocity * deltaTime);
|
||||
if (Object != null && Runner != null && Runner.IsRunning)
|
||||
{
|
||||
NetworkedPosition = transform.position;
|
||||
}
|
||||
if (Object != null && Runner != null && Runner.IsRunning) NetworkedPosition = transform.position;
|
||||
}
|
||||
|
||||
localAnimatorSpeed = animatorSpeed;
|
||||
|
||||
if (Object != null && Object.HasStateAuthority)
|
||||
{
|
||||
NetworkedSpeed = animatorSpeed;
|
||||
NetworkedMoveInput = MoveInput;
|
||||
}
|
||||
|
||||
UpdateAnimator(deltaTime);
|
||||
}
|
||||
|
||||
private void UpdateAnimator(float deltaTime)
|
||||
{
|
||||
if (Anim == null) return;
|
||||
|
||||
float speedValue;
|
||||
Vector2 inputVector;
|
||||
|
||||
if (Runner == null || !Runner.IsRunning || Object.HasInputAuthority)
|
||||
{
|
||||
speedValue = localAnimatorSpeed;
|
||||
inputVector = MoveInput;
|
||||
}
|
||||
else
|
||||
{
|
||||
speedValue = NetworkedSpeed;
|
||||
inputVector = NetworkedMoveInput;
|
||||
}
|
||||
float speedValue = (Runner == null || !Runner.IsRunning || Object.HasInputAuthority) ? localAnimatorSpeed : NetworkedSpeed;
|
||||
Vector2 inputVector = (Runner == null || !Runner.IsRunning || Object.HasInputAuthority) ? MoveInput : NetworkedMoveInput;
|
||||
|
||||
if (hasSpeedParam) Anim.SetFloat(speedHash, speedValue, AnimationDamping, deltaTime);
|
||||
if (hasVelocityXParam) Anim.SetFloat(velocityXHash, inputVector.x * speedValue, AnimationDamping, deltaTime);
|
||||
@@ -242,14 +191,11 @@ namespace OnlyScove.Scripts
|
||||
bool isRunning = Runner != null && Runner.IsRunning;
|
||||
if (Object == null && isRunning) return;
|
||||
|
||||
if (isRunning && NetworkedPosition != Vector3.zero)
|
||||
if (isRunning && NetworkedPosition != Vector3.zero && !Object.HasInputAuthority)
|
||||
{
|
||||
if (Controller != null && !Object.HasInputAuthority)
|
||||
{
|
||||
Controller.enabled = false;
|
||||
transform.position = NetworkedPosition;
|
||||
Controller.enabled = true;
|
||||
}
|
||||
Controller.enabled = false;
|
||||
transform.position = NetworkedPosition;
|
||||
Controller.enabled = true;
|
||||
}
|
||||
|
||||
if (GetInput(out PlayerInputData data))
|
||||
@@ -269,52 +215,35 @@ namespace OnlyScove.Scripts
|
||||
IsSprintHeld = false;
|
||||
}
|
||||
|
||||
bool isSimulating = !isRunning || Object.HasInputAuthority || Runner.IsServer;
|
||||
|
||||
if (!isSimulating)
|
||||
if (!isRunning || Object.HasInputAuthority || Runner.IsServer)
|
||||
{
|
||||
if (hasControl)
|
||||
{
|
||||
WasGrounded = IsGrounded;
|
||||
CheckGround();
|
||||
UpdateInteractablesList();
|
||||
currentState?.Tick(isRunning ? Runner.DeltaTime : Time.fixedDeltaTime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateAnimator(Runner.DeltaTime);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hasControl) return;
|
||||
|
||||
WasGrounded = IsGrounded;
|
||||
CheckGround();
|
||||
UpdateInteractablesList();
|
||||
|
||||
float dt = isRunning ? Runner.DeltaTime : Time.fixedDeltaTime;
|
||||
currentState?.Tick(dt);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Runner == null || !Runner.IsRunning)
|
||||
{
|
||||
FixedUpdateNetwork();
|
||||
}
|
||||
if (Runner == null || !Runner.IsRunning) FixedUpdateNetwork();
|
||||
}
|
||||
|
||||
private void CheckGround()
|
||||
{
|
||||
IsGrounded = Physics.CheckSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius, GroundMask);
|
||||
}
|
||||
private void CheckGround() => IsGrounded = Physics.CheckSphere(transform.TransformPoint(GroundCheckOffset), GroundCheckRadius, GroundMask);
|
||||
|
||||
private void UpdateInteractablesList()
|
||||
{
|
||||
interactablesNearby.Clear();
|
||||
IInteractable target = Scanner.ScanForInteractable(InteractionRange, InteractionMask);
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
interactablesNearby.Add(target);
|
||||
OnInteractableTargetChanged?.Invoke(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnInteractableTargetChanged?.Invoke(null);
|
||||
}
|
||||
|
||||
if (target != null) interactablesNearby.Add(target);
|
||||
OnInteractableTargetChanged?.Invoke(target);
|
||||
currentInteractableIndex = 0;
|
||||
}
|
||||
|
||||
@@ -328,22 +257,13 @@ namespace OnlyScove.Scripts
|
||||
private void OnPreviousInteract()
|
||||
{
|
||||
if (interactablesNearby.Count <= 1) return;
|
||||
currentInteractableIndex--;
|
||||
if (currentInteractableIndex < 0) currentInteractableIndex = interactablesNearby.Count - 1;
|
||||
currentInteractableIndex = (currentInteractableIndex - 1 + interactablesNearby.Count) % interactablesNearby.Count;
|
||||
OnInteractableTargetChanged?.Invoke(GetInteractable());
|
||||
}
|
||||
|
||||
public IInteractable GetInteractable()
|
||||
{
|
||||
if (interactablesNearby.Count == 0) return null;
|
||||
return interactablesNearby[currentInteractableIndex];
|
||||
}
|
||||
public IInteractable GetInteractable() => interactablesNearby.Count == 0 ? null : interactablesNearby[currentInteractableIndex];
|
||||
|
||||
public void SetGroundCheck(float radius, Vector3 offset)
|
||||
{
|
||||
GroundCheckRadius = radius;
|
||||
GroundCheckOffset = offset;
|
||||
}
|
||||
public void SetGroundCheck(float radius, Vector3 offset) { GroundCheckRadius = radius; GroundCheckOffset = offset; }
|
||||
|
||||
public void SwitchState(PlayerBaseState newState)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace UI
|
||||
|
||||
var root = hudDocument.rootVisualElement;
|
||||
|
||||
// Tìm các thành phần UI theo Name (Bạn cần đặt tên này trong UXML)
|
||||
_healthFill = root.Q<VisualElement>("health-fill");
|
||||
_staminaFill = root.Q<VisualElement>("stamina-fill");
|
||||
_healthText = root.Q<Label>("health-text");
|
||||
|
||||
50
Assets/Scripts/UI/LobbyController.cs
Normal file
50
Assets/Scripts/UI/LobbyController.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class LobbyController : MonoBehaviour
|
||||
{
|
||||
private UIDocument _doc;
|
||||
private Button _btnLeave;
|
||||
private Button _btnStart;
|
||||
private ScrollView _playerList;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_doc = GetComponent<UIDocument>();
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// BINDING: Tìm element theo tên (Name) đã đặt trong UXML
|
||||
_btnLeave = root.Q<Button>("btn-leave");
|
||||
_btnStart = root.Q<Button>("btn-start");
|
||||
_playerList = root.Q<ScrollView>("player-list");
|
||||
|
||||
// ĐĂNG KÝ SỰ KIỆN:
|
||||
if (_btnLeave != null)
|
||||
_btnLeave.clicked += OnLeaveClicked;
|
||||
|
||||
if (_btnStart != null)
|
||||
_btnStart.clicked += OnStartClicked;
|
||||
}
|
||||
|
||||
private void OnLeaveClicked()
|
||||
{
|
||||
Debug.Log("User clicked LEAVE room!");
|
||||
UIManager.Instance.ShowScreen("MainMenu");
|
||||
}
|
||||
|
||||
private void OnStartClicked()
|
||||
{
|
||||
Debug.Log("Host clicked START GAME!");
|
||||
UIManager.Instance.ShowScreen("HUD"); // Chuyển vào HUD khi game bắt đầu
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
// Hủy đăng ký để tránh memory leak
|
||||
if (_btnLeave != null) _btnLeave.clicked -= OnLeaveClicked;
|
||||
if (_btnStart != null) _btnStart.clicked -= OnStartClicked;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/LobbyController.cs.meta
Normal file
2
Assets/Scripts/UI/LobbyController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c37c552a9c18a242bcc8860a0a5212f
|
||||
69
Assets/Scripts/UI/LocalizationManager.cs
Normal file
69
Assets/Scripts/UI/LocalizationManager.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class LocalizationManager : MonoBehaviour
|
||||
{
|
||||
public static LocalizationManager Instance { get; private set; }
|
||||
|
||||
private Dictionary<string, string> _localizedText;
|
||||
private string _currentLanguage = "en";
|
||||
|
||||
public event Action OnLanguageChanged;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
LoadLanguage(_currentLanguage);
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadLanguage(string langCode)
|
||||
{
|
||||
TextAsset targetFile = Resources.Load<TextAsset>($"Localization/{langCode}");
|
||||
if (targetFile != null)
|
||||
{
|
||||
// Simple JSON parsing (For production, consider using a proper JSON library like Newtonsoft)
|
||||
string json = targetFile.text;
|
||||
_localizedText = ParseJson(json);
|
||||
_currentLanguage = langCode;
|
||||
OnLanguageChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public string Get(string key)
|
||||
{
|
||||
if (_localizedText != null && _localizedText.ContainsKey(key))
|
||||
return _localizedText[key];
|
||||
return $"[{key}]";
|
||||
}
|
||||
|
||||
private Dictionary<string, string> ParseJson(string json)
|
||||
{
|
||||
// Dummy parser for demonstration, replace with JsonUtility if using wrapper class
|
||||
// or Newtonsoft for direct dictionary parsing
|
||||
var dict = new Dictionary<string, string>();
|
||||
string[] lines = json.Split(new[] { ',', '{', '}', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var line in lines)
|
||||
{
|
||||
string[] parts = line.Split(':');
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
string key = parts[0].Trim(' ', '"');
|
||||
string val = parts[1].Trim(' ', '"');
|
||||
dict[key] = val;
|
||||
}
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/LocalizationManager.cs.meta
Normal file
2
Assets/Scripts/UI/LocalizationManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c17a3f09ee49ff48a0e3e2b45080257
|
||||
23
Assets/Scripts/UI/MainMenuController.cs
Normal file
23
Assets/Scripts/UI/MainMenuController.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class MainMenuController : MonoBehaviour
|
||||
{
|
||||
private UIDocument _doc;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_doc = GetComponent<UIDocument>();
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// Nối dây các nút bấm
|
||||
root.Q<Button>("btn-create")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ShowScreen("Lobby"));
|
||||
root.Q<Button>("btn-join")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ShowScreen("Lobby"));
|
||||
root.Q<Button>("btn-settings")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ToggleSettings());
|
||||
root.Q<Button>("btn-profile")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ShowScreen("Profile"));
|
||||
root.Q<Button>("btn-exit")?.RegisterCallback<ClickEvent>(ev => Application.Quit());
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/MainMenuController.cs.meta
Normal file
2
Assets/Scripts/UI/MainMenuController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 691980524acfc544f9660cfc35ce3616
|
||||
14
Assets/Scripts/UI/ProfileController.cs
Normal file
14
Assets/Scripts/UI/ProfileController.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class ProfileController : MonoBehaviour
|
||||
{
|
||||
private void OnEnable()
|
||||
{
|
||||
var root = GetComponent<UIDocument>().rootVisualElement;
|
||||
root.Q<Button>("btn-close")?.RegisterCallback<ClickEvent>(ev => UIManager.Instance.ShowScreen("MainMenu"));
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/ProfileController.cs.meta
Normal file
2
Assets/Scripts/UI/ProfileController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdea16b110511ef45889ed832b63560b
|
||||
110
Assets/Scripts/UI/SettingsController.cs
Normal file
110
Assets/Scripts/UI/SettingsController.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using OnlyScove.Scripts;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class SettingsController : MonoBehaviour
|
||||
{
|
||||
private UIDocument _doc;
|
||||
private CameraController _cameraController;
|
||||
|
||||
// Tabs Content
|
||||
private VisualElement _contentGeneral, _contentGraphics, _contentAudio;
|
||||
private Button _tabGeneral, _tabGraphics, _tabAudio, _tabControls;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_doc = GetComponent<UIDocument>();
|
||||
_cameraController = Object.FindFirstObjectByType<CameraController>();
|
||||
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// Query Tabs
|
||||
_tabGeneral = root.Q<Button>("tab-general");
|
||||
_tabGraphics = root.Q<Button>("tab-graphics");
|
||||
_tabAudio = root.Q<Button>("tab-audio");
|
||||
_tabControls = root.Q<Button>("tab-controls");
|
||||
|
||||
// Query Content
|
||||
_contentGeneral = root.Q<VisualElement>("content-general");
|
||||
_contentGraphics = root.Q<VisualElement>("content-graphics");
|
||||
_contentAudio = root.Q<VisualElement>("content-audio");
|
||||
|
||||
// Events
|
||||
_tabGeneral.clicked += () => SwitchTab(_contentGeneral, _tabGeneral);
|
||||
_tabGraphics.clicked += () => SwitchTab(_contentGraphics, _tabGraphics);
|
||||
_tabAudio.clicked += () => SwitchTab(_contentAudio, _tabAudio);
|
||||
|
||||
root.Q<Button>("btn-back").clicked += () => UIManager.Instance.ToggleSettings();
|
||||
|
||||
// Camera Binding (FOV)
|
||||
var fovSlider = root.Q<Slider>("setting-fov");
|
||||
if (fovSlider != null)
|
||||
{
|
||||
fovSlider.RegisterValueChangedCallback(evt => {
|
||||
// Cần expose hoặc tạo hàm SetFOV trong CameraController
|
||||
Debug.Log($"Setting FOV to: {evt.newValue}");
|
||||
});
|
||||
}
|
||||
|
||||
// Language Binding
|
||||
var langDropdown = root.Q<DropdownField>("setting-language");
|
||||
if (langDropdown != null)
|
||||
{
|
||||
langDropdown.RegisterValueChangedCallback(evt => {
|
||||
string code = evt.newValue == "English" ? "en" : "vi";
|
||||
LocalizationManager.Instance.LoadLanguage(code);
|
||||
});
|
||||
}
|
||||
|
||||
// Lắng nghe sự kiện đổi ngôn ngữ để cập nhật Text
|
||||
if (LocalizationManager.Instance != null)
|
||||
{
|
||||
LocalizationManager.Instance.OnLanguageChanged += UpdateTexts;
|
||||
UpdateTexts();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[SettingsController] LocalizationManager Instance not found in scene!");
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchTab(VisualElement targetContent, Button targetTab)
|
||||
{
|
||||
if (targetContent == null || targetTab == null) return;
|
||||
|
||||
// Ẩn tất cả (Thêm null check)
|
||||
if (_contentGeneral != null) _contentGeneral.style.display = DisplayStyle.None;
|
||||
if (_contentGraphics != null) _contentGraphics.style.display = DisplayStyle.None;
|
||||
if (_contentAudio != null) _contentAudio.style.display = DisplayStyle.None;
|
||||
|
||||
if (_tabGeneral != null) _tabGeneral.RemoveFromClassList("active-tab");
|
||||
if (_tabGraphics != null) _tabGraphics.RemoveFromClassList("active-tab");
|
||||
if (_tabAudio != null) _tabAudio.RemoveFromClassList("active-tab");
|
||||
|
||||
// Hiện cái được chọn
|
||||
targetContent.style.display = DisplayStyle.Flex;
|
||||
targetTab.AddToClassList("active-tab");
|
||||
}
|
||||
|
||||
private void UpdateTexts()
|
||||
{
|
||||
if (LocalizationManager.Instance == null) return;
|
||||
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// Dùng null-conditional operator (?.) để cực kỳ an toàn
|
||||
var titleLabel = root.Q<Label>("title");
|
||||
if (titleLabel != null) titleLabel.text = LocalizationManager.Instance.Get("settings_title");
|
||||
|
||||
if (_tabGeneral != null) _tabGeneral.text = LocalizationManager.Instance.Get("settings_general");
|
||||
if (_tabGraphics != null) _tabGraphics.text = LocalizationManager.Instance.Get("settings_graphics");
|
||||
if (_tabAudio != null) _tabAudio.text = LocalizationManager.Instance.Get("settings_audio");
|
||||
if (_tabControls != null) _tabControls.text = LocalizationManager.Instance.Get("settings_controls");
|
||||
|
||||
var btnBack = root.Q<Button>("btn-back");
|
||||
if (btnBack != null) btnBack.text = LocalizationManager.Instance.Get("settings_back");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/SettingsController.cs.meta
Normal file
2
Assets/Scripts/UI/SettingsController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5534bcf4869df944883c6fd2a17a6a5a
|
||||
@@ -1,92 +1,144 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
[ExecuteAlways]
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
public static UIManager Instance { get; private set; }
|
||||
|
||||
[System.Serializable]
|
||||
public class ScreenData
|
||||
{
|
||||
public string screenName;
|
||||
public UIDocument document;
|
||||
public bool isActive;
|
||||
public bool isActive; // Thêm lại để tương thích với Editor gốc
|
||||
public bool isOverlay;
|
||||
public Texture2D customCursor;
|
||||
}
|
||||
|
||||
[Header("Screens Management")]
|
||||
public List<ScreenData> screens = new List<ScreenData>();
|
||||
|
||||
[Header("Live Preview (Editor Only)")]
|
||||
[Range(0, 1)] public float globalOpacity = 1f;
|
||||
[Header("Default Settings")]
|
||||
public Texture2D defaultCursor;
|
||||
|
||||
private VisualElement _currentScreenRoot;
|
||||
private string _currentScreenName;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
SyncScreens(); // Đồng bộ trạng thái ban đầu
|
||||
|
||||
foreach (var screen in screens)
|
||||
{
|
||||
if (screen.document != null && screen.screenName == "Settings")
|
||||
screen.document.sortingOrder = 999;
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
ShowScreen("MainMenu");
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
// Tự động cập nhật giao diện ngay khi thay đổi thông số trong Inspector (không cần Play)
|
||||
SyncScreens();
|
||||
// Chạy trong Editor để cập nhật UI ngay lập tức khi check vào ô isActive
|
||||
if (!Application.isPlaying) SyncScreens();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
private void Update()
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
SetupEvents();
|
||||
ToggleSettings();
|
||||
}
|
||||
SyncScreens();
|
||||
}
|
||||
|
||||
public void SyncScreens()
|
||||
{
|
||||
foreach (var screen in screens)
|
||||
{
|
||||
if (screen.document == null) continue;
|
||||
|
||||
var root = screen.document.rootVisualElement;
|
||||
if (root == null) continue;
|
||||
|
||||
// Bật tắt display dựa trên biến isActive
|
||||
root.style.display = screen.isActive ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
root.style.opacity = globalOpacity;
|
||||
if (screen != null && screen.document != null && screen.document.rootVisualElement != null)
|
||||
{
|
||||
screen.document.rootVisualElement.style.display = screen.isActive ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hàm tiện ích để bật duy nhất 1 màn hình từ Code hoặc Button
|
||||
public void ShowOnly(string name)
|
||||
{
|
||||
foreach (var screen in screens)
|
||||
ShowScreen(name);
|
||||
}
|
||||
|
||||
public void ShowScreen(string name)
|
||||
{
|
||||
if (_currentScreenName == name) return;
|
||||
StartCoroutine(TransitionRoutine(name));
|
||||
}
|
||||
|
||||
private IEnumerator TransitionRoutine(string nextScreenName)
|
||||
{
|
||||
// Tắt các màn hình khác
|
||||
foreach (var s in screens)
|
||||
{
|
||||
screen.isActive = (screen.screenName == name);
|
||||
if (s.screenName != nextScreenName && !s.isOverlay && s.isActive)
|
||||
{
|
||||
var root = s.document.rootVisualElement.Q<VisualElement>();
|
||||
root.AddToClassList("hidden");
|
||||
s.isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
SyncScreens();
|
||||
}
|
||||
|
||||
private void SetupEvents()
|
||||
{
|
||||
// Logic đăng ký event thông minh ở đây (tương tự như trước nhưng linh hoạt hơn)
|
||||
var mainMenu = GetDocument("MainMenu");
|
||||
if (mainMenu != null)
|
||||
// Bật màn hình mới
|
||||
var nextData = screens.Find(s => s.screenName == nextScreenName);
|
||||
if (nextData != null && nextData.document != null)
|
||||
{
|
||||
mainMenu.rootVisualElement.Q<Button>("btn-settings")?.RegisterCallback<ClickEvent>(e => ShowOnly("Settings"));
|
||||
mainMenu.rootVisualElement.Q<Button>("btn-create")?.RegisterCallback<ClickEvent>(e => ShowOnly("Lobby"));
|
||||
nextData.isActive = true;
|
||||
_currentScreenRoot = nextData.document.rootVisualElement.Q<VisualElement>();
|
||||
_currentScreenName = nextScreenName;
|
||||
|
||||
_currentScreenRoot.style.display = DisplayStyle.Flex;
|
||||
_currentScreenRoot.AddToClassList("hidden");
|
||||
|
||||
yield return null;
|
||||
_currentScreenRoot.RemoveFromClassList("hidden");
|
||||
|
||||
ApplyCursor(nextData.customCursor != null ? nextData.customCursor : defaultCursor);
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleSettings()
|
||||
{
|
||||
var settingsData = screens.Find(s => s.screenName == "Settings");
|
||||
if (settingsData == null) return;
|
||||
|
||||
settingsData.isActive = !settingsData.isActive;
|
||||
settingsData.document.rootVisualElement.style.display = settingsData.isActive ? DisplayStyle.Flex : DisplayStyle.None;
|
||||
|
||||
var settings = GetDocument("Settings");
|
||||
settings?.rootVisualElement.Q<Button>("btn-back")?.RegisterCallback<ClickEvent>(e => ShowOnly("MainMenu"));
|
||||
if (settingsData.isActive)
|
||||
{
|
||||
UnityEngine.Cursor.visible = true;
|
||||
UnityEngine.Cursor.lockState = CursorLockMode.None;
|
||||
ApplyCursor(settingsData.customCursor != null ? settingsData.customCursor : defaultCursor);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnityEngine.Cursor.visible = false;
|
||||
UnityEngine.Cursor.lockState = CursorLockMode.Locked;
|
||||
}
|
||||
}
|
||||
|
||||
public UIDocument GetDocument(string name)
|
||||
private void ApplyCursor(Texture2D texture)
|
||||
{
|
||||
return screens.Find(s => s.screenName == name)?.document;
|
||||
}
|
||||
|
||||
// Thêm hàm để Update Text/Image nhanh từ Inspector hoặc Script khác
|
||||
public void SetElementText(string screenName, string elementName, string newText)
|
||||
{
|
||||
var doc = GetDocument(screenName);
|
||||
var label = doc?.rootVisualElement.Q<Label>(elementName);
|
||||
if (label != null) label.text = newText;
|
||||
UnityEngine.Cursor.SetCursor(texture, Vector2.zero, CursorMode.Auto);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,42 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
|
||||
<Style src="project:/Assets/UI/Styles/Global.uss" />
|
||||
<ui:VisualElement class="screen-root">
|
||||
<ui:VisualElement class="panel">
|
||||
<ui:Label text="SETTINGS" class="header-text" />
|
||||
<ui:VisualElement class="screen-root" name="settings-root">
|
||||
<ui:VisualElement class="panel" style="width: 800px; height: 600px;">
|
||||
<ui:Label text="SETTINGS" name="title" class="header-text" />
|
||||
|
||||
<ui:ScrollView style="height: 400px; margin-bottom: 20px;">
|
||||
<ui:Label text="Audio" style="-unity-font-style: bold; margin-top: 10px;" />
|
||||
<ui:Slider label="Master Volume" value="80" low-value="0" high-value="100" />
|
||||
<ui:Slider label="Music Volume" value="50" low-value="0" high-value="100" />
|
||||
<!-- TABS ROW -->
|
||||
<ui:VisualElement class="tab-container">
|
||||
<ui:Button text="GENERAL" name="tab-general" class="tab-button active-tab" />
|
||||
<ui:Button text="GRAPHICS" name="tab-graphics" class="tab-button" />
|
||||
<ui:Button text="AUDIO" name="tab-audio" class="tab-button" />
|
||||
<ui:Button text="CONTROLS" name="tab-controls" class="tab-button" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<ui:Label text="Gameplay" style="-unity-font-style: bold; margin-top: 20px;" />
|
||||
<ui:Slider label="Mouse Sensitivity" value="2.5" low-value="0.1" high-value="10" />
|
||||
<ui:Toggle label="Invert Y-Axis" />
|
||||
|
||||
<ui:Label text="Graphics" style="-unity-font-style: bold; margin-top: 20px;" />
|
||||
<ui:DropdownField label="Quality" index="2" choices="Low,Medium,High,Ultra" />
|
||||
<!-- CONTENT AREA -->
|
||||
<ui:ScrollView class="tab-content">
|
||||
<!-- Tab: General (Camera Settings) -->
|
||||
<ui:VisualElement name="content-general">
|
||||
<ui:Label text="Camera Settings" style="-unity-font-style: bold; margin-bottom: 10px;" />
|
||||
<ui:Slider label="Field of View (FOV)" name="setting-fov" value="60" low-value="40" high-value="120" />
|
||||
<ui:Slider label="Sensitivity" name="setting-sensitivity" value="5" low-value="0.1" high-value="20" />
|
||||
<ui:DropdownField label="Language" name="setting-language" index="0" choices="English,Tiếng Việt" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<!-- Tab: Graphics (Dummy) -->
|
||||
<ui:VisualElement name="content-graphics" style="display: none;">
|
||||
<ui:DropdownField label="Quality" index="2" choices="Low,Medium,High,Ultra" />
|
||||
<ui:Toggle label="Fullscreen" value="true" />
|
||||
<ui:Toggle label="V-Sync" value="true" />
|
||||
</ui:VisualElement>
|
||||
|
||||
<!-- Tab: Audio (Dummy) -->
|
||||
<ui:VisualElement name="content-audio" style="display: none;">
|
||||
<ui:Slider label="Master Volume" value="80" low-value="0" high-value="100" />
|
||||
<ui:Slider label="Music Volume" value="50" low-value="0" high-value="100" />
|
||||
</ui:VisualElement>
|
||||
</ui:ScrollView>
|
||||
|
||||
<ui:Button text="BACK" name="btn-back" class="button-primary" />
|
||||
<ui:Button text="BACK" name="btn-back" class="button-primary" style="align-self: flex-end; margin-top: 20px;" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
padding: 40px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
/* Smooth Transition */
|
||||
transition-property: opacity, scale;
|
||||
transition-duration: 0.3s;
|
||||
transition-timing-function: ease-in-out;
|
||||
opacity: 1;
|
||||
scale: 1;
|
||||
}
|
||||
|
||||
.screen-root.hidden {
|
||||
opacity: 0;
|
||||
scale: 0.95;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel {
|
||||
@@ -16,6 +29,34 @@
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
/* Tabs Settings Style */
|
||||
.tab-container {
|
||||
flex-direction: row;
|
||||
margin-bottom: 20px;
|
||||
border-bottom-width: 2px;
|
||||
border-bottom-color: #333;
|
||||
}
|
||||
|
||||
.tab-button {
|
||||
flex-grow: 1;
|
||||
background-color: rgba(60, 60, 60, 0.5);
|
||||
border-radius: 5px 5px 0 0;
|
||||
padding: 10px;
|
||||
color: #888;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.tab-button.active-tab {
|
||||
background-color: #3B5998;
|
||||
color: white;
|
||||
-unity-font-style: bold;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
flex-grow: 1;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
.header-text {
|
||||
font-size: 48px;
|
||||
@@ -23,6 +64,8 @@
|
||||
-unity-font-style: bold;
|
||||
margin-bottom: 30px;
|
||||
-unity-text-align: middle-center;
|
||||
/* Để dùng font của bạn, hãy uncomment dòng dưới và thay đổi path */
|
||||
/* -unity-font-definition: url("project:/Assets/Fonts/YourFont_SDF.asset"); */
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
@@ -44,13 +87,3 @@
|
||||
.button-primary:active {
|
||||
background-color: #2D4373;
|
||||
}
|
||||
|
||||
.button-danger {
|
||||
background-color: #A93226;
|
||||
}
|
||||
|
||||
/* Inputs */
|
||||
.input-field {
|
||||
margin-bottom: 15px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
721
Assets/_Recovery/0 (4).unity
Normal file
721
Assets/_Recovery/0 (4).unity
Normal file
@@ -0,0 +1,721 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 2
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &626355268
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 626355270}
|
||||
- component: {fileID: 626355269}
|
||||
- component: {fileID: 626355271}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &626355269
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 626355268}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 12
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize2D: {x: 0.5, y: 0.5}
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ForceVisible: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
m_LightUnit: 1
|
||||
m_LuxAtDistance: 1
|
||||
m_EnableSpotReflector: 1
|
||||
--- !u!4 &626355270
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 626355268}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!114 &626355271
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 626355268}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_CustomShadowLayers: 0
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
m_SoftShadowQuality: 0
|
||||
m_RenderingLayersMask:
|
||||
serializedVersion: 0
|
||||
m_Bits: 1
|
||||
m_ShadowRenderingLayersMask:
|
||||
serializedVersion: 0
|
||||
m_Bits: 1
|
||||
m_Version: 4
|
||||
m_LightLayerMask: 1
|
||||
m_ShadowLayerMask: 1
|
||||
m_RenderingLayers: 1
|
||||
m_ShadowRenderingLayers: 1
|
||||
--- !u!1 &666657091
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 666657093}
|
||||
- component: {fileID: 666657092}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Profile
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &666657092
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 666657091}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 11400000, guid: 04bb65da4fe76fc4a9926df48b2ba88b, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: 4b61efb7dda830a43ad6b05998e85a6d, type: 3}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!4 &666657093
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 666657091}
|
||||
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: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1136953558
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1136953560}
|
||||
- component: {fileID: 1136953559}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_HUD
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1136953559
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1136953558}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 11400000, guid: 04bb65da4fe76fc4a9926df48b2ba88b, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: b8da157d472223d4889a01228b36ef8b, type: 3}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!4 &1136953560
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1136953558}
|
||||
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: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1183887568
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1183887570}
|
||||
- component: {fileID: 1183887569}
|
||||
m_Layer: 0
|
||||
m_Name: UIManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1183887569
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1183887568}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3f728362556756d45bddb65280fdab1d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::UI.UIManager
|
||||
mainMenuDoc: {fileID: 2003742651}
|
||||
lobbyDoc: {fileID: 1471116802}
|
||||
hudDoc: {fileID: 1136953559}
|
||||
settingsDoc: {fileID: 1582124357}
|
||||
profileDoc: {fileID: 666657092}
|
||||
--- !u!4 &1183887570
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1183887568}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -16135.612, y: -11645.337, z: 92.19762}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2003742650}
|
||||
- {fileID: 1471116803}
|
||||
- {fileID: 1136953560}
|
||||
- {fileID: 1582124358}
|
||||
- {fileID: 666657093}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1471116801
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1471116803}
|
||||
- component: {fileID: 1471116802}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Lobby
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1471116802
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1471116801}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 11400000, guid: 04bb65da4fe76fc4a9926df48b2ba88b, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: 971b07b6bc60233469ca493b8f558225, type: 3}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!4 &1471116803
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1471116801}
|
||||
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: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1582124356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1582124358}
|
||||
- component: {fileID: 1582124357}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_Settings
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1582124357
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1582124356}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 11400000, guid: 04bb65da4fe76fc4a9926df48b2ba88b, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: b35e62e5dcc1bfb42bf0d3f630fc356d, type: 3}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!4 &1582124358
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1582124356}
|
||||
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: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1848374378
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1848374381}
|
||||
- component: {fileID: 1848374380}
|
||||
- component: {fileID: 1848374379}
|
||||
- component: {fileID: 1848374382}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1848374379
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1848374378}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1848374380
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1848374378}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1848374381
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1848374378}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1848374382
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1848374378}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
m_Version: 2
|
||||
--- !u!1 &2003742649
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2003742650}
|
||||
- component: {fileID: 2003742651}
|
||||
m_Layer: 0
|
||||
m_Name: Doc_MainMenu
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2003742650
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2003742649}
|
||||
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: 1183887570}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2003742651
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2003742649}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.dll::UnityEngine.UIElements.UIDocument
|
||||
m_PanelSettings: {fileID: 11400000, guid: 04bb65da4fe76fc4a9926df48b2ba88b, type: 2}
|
||||
m_ParentUI: {fileID: 0}
|
||||
sourceAsset: {fileID: 9197481963319205126, guid: b8da157d472223d4889a01228b36ef8b, type: 3}
|
||||
m_SortingOrder: 0
|
||||
m_Position: 0
|
||||
m_WorldSpaceSizeMode: 1
|
||||
m_WorldSpaceWidth: 1920
|
||||
m_WorldSpaceHeight: 1080
|
||||
m_PivotReferenceSize: 0
|
||||
m_Pivot: 0
|
||||
m_WorldSpaceCollider: {fileID: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1848374381}
|
||||
- {fileID: 626355270}
|
||||
- {fileID: 1183887570}
|
||||
7
Assets/_Recovery/0 (4).unity.meta
Normal file
7
Assets/_Recovery/0 (4).unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c0512ce96d8f5446b77ef7b8d613348
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user