0.3.2.14 업데이트
This commit is contained in:
parent
723c2598ac
commit
1dcd03e018
@ -5778,6 +5778,20 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1360757596}
|
m_Father: {fileID: 1360757596}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &480314625
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/Point
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 52083aa7-62f5-41d7-b37e-4db100ef2cda
|
||||||
--- !u!1 &510358306
|
--- !u!1 &510358306
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -6026,6 +6040,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 510483949}
|
m_GameObject: {fileID: 510483949}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &512160919
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/TrackedDeviceOrientation
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 7f4f45c6-67b1-47bf-9a74-fea6f6b5fde1
|
||||||
--- !u!1001 &515003792
|
--- !u!1001 &515003792
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -6628,6 +6656,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 547484572}
|
m_GameObject: {fileID: 547484572}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &561341741
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/ScrollWheel
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 30ef3965-cc51-452e-8df9-6a3567a53f4d
|
||||||
--- !u!1001 &566176540
|
--- !u!1001 &566176540
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -11414,6 +11456,20 @@ MonoBehaviour:
|
|||||||
m_Spacing: {x: 10, y: 10}
|
m_Spacing: {x: 10, y: 10}
|
||||||
m_Constraint: 0
|
m_Constraint: 0
|
||||||
m_ConstraintCount: 2
|
m_ConstraintCount: 2
|
||||||
|
--- !u!114 &992297820
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/TrackedDevicePosition
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 49ed4722-bfe5-47b7-b724-008d9ca57edc
|
||||||
--- !u!1 &1006730364
|
--- !u!1 &1006730364
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -12060,6 +12116,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1058006973}
|
m_GameObject: {fileID: 1058006973}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1063900526
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/Navigate
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 66824a18-0819-44a4-92c2-6395511e3d0d
|
||||||
--- !u!1 &1070845212
|
--- !u!1 &1070845212
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -18806,6 +18876,20 @@ MonoBehaviour:
|
|||||||
m_FlexibleWidth: -1
|
m_FlexibleWidth: -1
|
||||||
m_FlexibleHeight: -1
|
m_FlexibleHeight: -1
|
||||||
m_LayoutPriority: 1
|
m_LayoutPriority: 1
|
||||||
|
--- !u!114 &1543616885
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/RightClick
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 4849bf4c-7b3b-43c4-8bbf-7178f536fb94
|
||||||
--- !u!1 &1543999676
|
--- !u!1 &1543999676
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -19611,17 +19695,17 @@ MonoBehaviour:
|
|||||||
m_MoveRepeatDelay: 0.5
|
m_MoveRepeatDelay: 0.5
|
||||||
m_MoveRepeatRate: 0.1
|
m_MoveRepeatRate: 0.1
|
||||||
m_XRTrackingOrigin: {fileID: 0}
|
m_XRTrackingOrigin: {fileID: 0}
|
||||||
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_ActionsAsset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_PointAction: {fileID: 480314625}
|
||||||
m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_MoveAction: {fileID: 1063900526}
|
||||||
m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_SubmitAction: {fileID: 1861358548}
|
||||||
m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_CancelAction: {fileID: -1967631576421560919, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_LeftClickAction: {fileID: 1688493664}
|
||||||
m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_MiddleClickAction: {fileID: 1972034606}
|
||||||
m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_RightClickAction: {fileID: 1543616885}
|
||||||
m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_ScrollWheelAction: {fileID: 561341741}
|
||||||
m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_TrackedDevicePositionAction: {fileID: 992297820}
|
||||||
m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
m_TrackedDeviceOrientationAction: {fileID: 512160919}
|
||||||
m_DeselectOnBackgroundClick: 1
|
m_DeselectOnBackgroundClick: 1
|
||||||
m_PointerBehavior: 0
|
m_PointerBehavior: 0
|
||||||
m_CursorLockBehavior: 0
|
m_CursorLockBehavior: 0
|
||||||
@ -21021,6 +21105,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1676572567}
|
m_GameObject: {fileID: 1676572567}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1688493664
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/Click
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 42e6067b-0d00-4787-92d8-ddf60510de83
|
||||||
--- !u!1 &1688541096
|
--- !u!1 &1688541096
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -24382,6 +24480,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1858836598}
|
m_GameObject: {fileID: 1858836598}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1861358548
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/Submit
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: 93ed1c14-2900-4d30-91fb-a9f2353a9540
|
||||||
--- !u!1 &1862417069
|
--- !u!1 &1862417069
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -25791,6 +25903,20 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1966407669}
|
m_GameObject: {fileID: 1966407669}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1972034606
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fc1515ab76e54f068e2f2207940fab32, type: 3}
|
||||||
|
m_Name: UI/MiddleClick
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Asset: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||||
|
m_ActionId: b99f7e4b-30f0-4936-9e55-c383951d6f58
|
||||||
--- !u!1 &1978509263
|
--- !u!1 &1978509263
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -29267,6 +29393,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalRotation.z
|
propertyPath: m_LocalRotation.z
|
||||||
value: 0.32760355
|
value: 0.32760355
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6054159730444663926, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3}
|
||||||
|
propertyPath: m_UIInputModule
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1619849091}
|
||||||
- target: {fileID: 6110939913361161778, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3}
|
- target: {fileID: 6110939913361161778, guid: 9ce588004bafc1e4e9617fdaa2d77c8d, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -0.01015869
|
value: -0.01015869
|
||||||
|
@ -144,7 +144,7 @@ namespace BlueWater.Players.Combat
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
CombatUiManager.Instance.CombatItemInventoryUi.Open(CombatUiManager.Instance.PopupUiList);
|
CombatUiManager.Instance.CombatItemInventoryUi.Open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ namespace BlueWater.Players.Combat
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
CombatUiManager.Instance.CombatMenuPopupUi.Open(CombatUiManager.Instance.PopupUiList);
|
CombatUiManager.Instance.CombatMenuPopupUi.Open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ namespace BlueWater.Players.Combat
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
CombatUiManager.Instance.DevelopMenuPopupUi.Open(CombatUiManager.Instance.PopupUiList);
|
CombatUiManager.Instance.DevelopMenuPopupUi.Open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ namespace BlueWater.Players.Combat
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
CombatUiManager.Instance.CloseLastPopup();
|
PopupUiController.CloseLastPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace BlueWater.Players.Combat
|
|||||||
|
|
||||||
yield return new WaitForSeconds(1f);
|
yield return new WaitForSeconds(1f);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
CombatUiManager.Instance.GameOverPopupUi.Open(CombatUiManager.Instance.PopupUiList);
|
CombatUiManager.Instance.GameOverPopupUi.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ActivateInvincibility() => PlayerHealthPoint.ActivateInvincibility();
|
public void ActivateInvincibility() => PlayerHealthPoint.ActivateInvincibility();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using BlueWater.Interfaces;
|
using BlueWater.Interfaces;
|
||||||
using BlueWater.Tycoons;
|
using BlueWater.Tycoons;
|
||||||
@ -37,7 +38,7 @@ namespace BlueWater.Players.Tycoons
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
Initialize();
|
StartCoroutine(nameof(Initialize));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
@ -71,11 +72,14 @@ namespace BlueWater.Players.Tycoons
|
|||||||
_playerInput = GetComponent<PlayerInput>();
|
_playerInput = GetComponent<PlayerInput>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Initialize()
|
private IEnumerator Initialize()
|
||||||
{
|
{
|
||||||
_playerInput.enabled = true;
|
|
||||||
PlayerInputKeyManager.Instance.SetCurrentPlayerInput(_playerInput);
|
PlayerInputKeyManager.Instance.SetCurrentPlayerInput(_playerInput);
|
||||||
|
yield return new WaitUntil(() => _playerInput.IsInitialized());
|
||||||
|
|
||||||
|
PlayerInputKeyManager.Instance.DisableAllActionMaps();
|
||||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||||
|
EventManager.InvokeInitializedPlayerInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -116,7 +120,7 @@ namespace BlueWater.Players.Tycoons
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
TycoonUiManager.Instance.ManualBook.Open(TycoonUiManager.Instance.PopupUiList);
|
TycoonUiManager.Instance.ManualBook.Open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +129,7 @@ namespace BlueWater.Players.Tycoons
|
|||||||
{
|
{
|
||||||
if (context.performed)
|
if (context.performed)
|
||||||
{
|
{
|
||||||
TycoonUiManager.Instance.CloseLastPopup();
|
PopupUiController.CloseLastPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ using BlueWater.Npcs.Crews.Bartender;
|
|||||||
using BlueWater.Npcs.Crews.Cleaner;
|
using BlueWater.Npcs.Crews.Cleaner;
|
||||||
using BlueWater.Npcs.Crews.Server;
|
using BlueWater.Npcs.Crews.Server;
|
||||||
using BlueWater.Npcs.Customers;
|
using BlueWater.Npcs.Customers;
|
||||||
using BlueWater.Tycoons;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace BlueWater
|
namespace BlueWater
|
||||||
@ -14,6 +13,12 @@ namespace BlueWater
|
|||||||
// Global events
|
// Global events
|
||||||
#region Global events
|
#region Global events
|
||||||
|
|
||||||
|
public static Action OnInitializedPlayerInput;
|
||||||
|
public static void InvokeInitializedPlayerInput()
|
||||||
|
{
|
||||||
|
OnInitializedPlayerInput?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
// Ui
|
// Ui
|
||||||
public static Action<float, float, Color?, float> OnFadeInOut;
|
public static Action<float, float, Color?, float> OnFadeInOut;
|
||||||
public static void InvokeFadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
public static void InvokeFadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
||||||
|
@ -620,7 +620,7 @@
|
|||||||
"path": "<Keyboard>/e",
|
"path": "<Keyboard>/e",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"groups": "",
|
"groups": ";Keyboard&Mouse",
|
||||||
"action": "Interaction",
|
"action": "Interaction",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
@ -631,7 +631,7 @@
|
|||||||
"path": "<Keyboard>/f1",
|
"path": "<Keyboard>/f1",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"groups": "",
|
"groups": ";Keyboard&Mouse",
|
||||||
"action": "DevelopKey01",
|
"action": "DevelopKey01",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
@ -1055,54 +1055,6 @@
|
|||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Bar",
|
|
||||||
"id": "63082564-263a-4430-8f7a-13c3cd4e93e7",
|
|
||||||
"actions": [
|
|
||||||
{
|
|
||||||
"name": "Pour",
|
|
||||||
"type": "Button",
|
|
||||||
"id": "b02d861a-39ed-4c5e-abd0-7ce3c2a44707",
|
|
||||||
"expectedControlType": "",
|
|
||||||
"processors": "",
|
|
||||||
"interactions": "Press",
|
|
||||||
"initialStateCheck": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "EscapeBar",
|
|
||||||
"type": "Button",
|
|
||||||
"id": "4752dd64-7a31-42ae-bfc9-45a01927bd07",
|
|
||||||
"expectedControlType": "",
|
|
||||||
"processors": "",
|
|
||||||
"interactions": "",
|
|
||||||
"initialStateCheck": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bindings": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"id": "01fa3267-e5c0-48c1-8194-592530fbca87",
|
|
||||||
"path": "<Keyboard>/space",
|
|
||||||
"interactions": "",
|
|
||||||
"processors": "",
|
|
||||||
"groups": "",
|
|
||||||
"action": "Pour",
|
|
||||||
"isComposite": false,
|
|
||||||
"isPartOfComposite": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"id": "646d58bf-d879-47c1-99c9-c534c83eb9f4",
|
|
||||||
"path": "<Keyboard>/escape",
|
|
||||||
"interactions": "",
|
|
||||||
"processors": "",
|
|
||||||
"groups": "",
|
|
||||||
"action": "EscapeBar",
|
|
||||||
"isComposite": false,
|
|
||||||
"isPartOfComposite": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"controlSchemes": [
|
"controlSchemes": [
|
||||||
|
14
Assets/02.Scripts/PlayerInputExtensions.cs
Normal file
14
Assets/02.Scripts/PlayerInputExtensions.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using UnityEngine.InputSystem;
|
||||||
|
|
||||||
|
namespace BlueWater
|
||||||
|
{
|
||||||
|
// PlayerInput 확장
|
||||||
|
public static class PlayerInputExtensions
|
||||||
|
{
|
||||||
|
public static bool IsInitialized(this PlayerInput playerInput)
|
||||||
|
{
|
||||||
|
// currentActionMap이 할당되면 초기화 완료로 간주
|
||||||
|
return playerInput.currentActionMap != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
Assets/02.Scripts/PlayerInputExtensions.cs.meta
Normal file
2
Assets/02.Scripts/PlayerInputExtensions.cs.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cfdd20a7e0c8ae649b5c4a6ca553133c
|
@ -7,7 +7,7 @@ namespace BlueWater.Tycoons
|
|||||||
public override void Interaction()
|
public override void Interaction()
|
||||||
{
|
{
|
||||||
var tycoonUiManager = TycoonUiManager.Instance;
|
var tycoonUiManager = TycoonUiManager.Instance;
|
||||||
tycoonUiManager.TycoonManagementUi.Open(tycoonUiManager.PopupUiList);
|
tycoonUiManager.TycoonManagementUi.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool CanInteraction()
|
public override bool CanInteraction()
|
||||||
|
@ -23,19 +23,20 @@ namespace BlueWater.Tycoons
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
EventManager.OnTycoonGameOvered += GameOver;
|
|
||||||
|
|
||||||
_tycoonManager = TycoonManager.Instance;
|
_tycoonManager = TycoonManager.Instance;
|
||||||
|
|
||||||
_dailyCustomerVisitInfos = new List<CustomerVisitInfo>();
|
_dailyCustomerVisitInfos = new List<CustomerVisitInfo>();
|
||||||
|
|
||||||
StartStage();
|
EventManager.OnInitializedPlayerInput += StartStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
EventManager.OnInitializedPlayerInput -= StartStage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartStage()
|
private void StartStage()
|
||||||
{
|
{
|
||||||
EventManager.OnTycoonGameOvered -= GameOver;
|
|
||||||
|
|
||||||
_dailyCustomerVisitInfos.Clear();
|
_dailyCustomerVisitInfos.Clear();
|
||||||
Utils.StartUniqueCoroutine(this, ref _startStageCoroutineInstance, StartStageCoroutine());
|
Utils.StartUniqueCoroutine(this, ref _startStageCoroutineInstance, StartStageCoroutine());
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@ -17,9 +16,9 @@ namespace BlueWater.Uis
|
|||||||
_moveNextStageButton = transform.Find("ClearPanel/Popup Base - Concave/Bottom/Background/Border/MoveNextStageButton").GetComponent<Button>();
|
_moveNextStageButton = transform.Find("ClearPanel/Popup Base - Concave/Bottom/Background/Border/MoveNextStageButton").GetComponent<Button>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
VisualFeedbackManager.Instance.SetBaseTimeScale(1f);
|
VisualFeedbackManager.Instance.SetBaseTimeScale(1f);
|
||||||
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
||||||
_moveNextStageButton.interactable = (int)DataManager.Instance.CurrentSaveStage < Enum.GetValues(typeof(SaveStage)).Length - 1;
|
_moveNextStageButton.interactable = (int)DataManager.Instance.CurrentSaveStage < Enum.GetValues(typeof(SaveStage)).Length - 1;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using BlueWater.Items;
|
|
||||||
using BlueWater.Maps;
|
using BlueWater.Maps;
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
@ -51,8 +50,6 @@ namespace BlueWater.Uis
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Image _fadeImage;
|
private Image _fadeImage;
|
||||||
|
|
||||||
public List<PopupUi> PopupUiList { get; private set; }
|
|
||||||
|
|
||||||
protected override void OnAwake()
|
protected override void OnAwake()
|
||||||
{
|
{
|
||||||
InitializeComponents();
|
InitializeComponents();
|
||||||
@ -60,8 +57,6 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
PopupUi.OnPopupUiOpenEvent += RegisterPopup;
|
|
||||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
|
||||||
EventManager.OnFadeInOut += FadeInOut;
|
EventManager.OnFadeInOut += FadeInOut;
|
||||||
|
|
||||||
Invoke(nameof(StartTutorial), 0.1f);
|
Invoke(nameof(StartTutorial), 0.1f);
|
||||||
@ -76,8 +71,6 @@ namespace BlueWater.Uis
|
|||||||
{
|
{
|
||||||
if (Quitting) return;
|
if (Quitting) return;
|
||||||
|
|
||||||
PopupUi.OnPopupUiOpenEvent -= RegisterPopup;
|
|
||||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
|
||||||
EventManager.OnFadeInOut -= FadeInOut;
|
EventManager.OnFadeInOut -= FadeInOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,43 +90,6 @@ namespace BlueWater.Uis
|
|||||||
CombatTutorialUi = MainCanvas.transform.Find("CombatTutorialUi").GetComponent<CombatTutorialUi>();
|
CombatTutorialUi = MainCanvas.transform.Find("CombatTutorialUi").GetComponent<CombatTutorialUi>();
|
||||||
DevelopMenuPopupUi = MainCanvas.transform.Find("DevelopMenuPopupUi").GetComponent<MenuPopupUi>();
|
DevelopMenuPopupUi = MainCanvas.transform.Find("DevelopMenuPopupUi").GetComponent<MenuPopupUi>();
|
||||||
_fadeImage = MainCanvas.transform.Find("FadeImage").GetComponent<Image>();
|
_fadeImage = MainCanvas.transform.Find("FadeImage").GetComponent<Image>();
|
||||||
|
|
||||||
PopupUiList = new List<PopupUi>(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RegisterPopup(PopupUi popup)
|
|
||||||
{
|
|
||||||
if (!PopupUiList.Contains(popup))
|
|
||||||
{
|
|
||||||
PopupUiList.Add(popup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UnregisterPopup(PopupUi popup)
|
|
||||||
{
|
|
||||||
if (PopupUiList.Contains(popup))
|
|
||||||
{
|
|
||||||
PopupUiList.Remove(popup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CloseLastPopup()
|
|
||||||
{
|
|
||||||
if (PopupUiList.Count <= 0) return;
|
|
||||||
|
|
||||||
PopupUiList[^1].Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CloseAllPopup()
|
|
||||||
{
|
|
||||||
var tempList = new List<PopupUi>(PopupUiList);
|
|
||||||
|
|
||||||
foreach (var popup in tempList)
|
|
||||||
{
|
|
||||||
popup.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
PopupUiList.Clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
public void FadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
||||||
@ -160,19 +116,19 @@ namespace BlueWater.Uis
|
|||||||
public void HardResetAllMaps()
|
public void HardResetAllMaps()
|
||||||
{
|
{
|
||||||
MapManager.Instance.HardResetAllMaps();
|
MapManager.Instance.HardResetAllMaps();
|
||||||
CloseAllPopup();
|
PopupUiController.CloseAllPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RestartCurrentStage()
|
public void RestartCurrentStage()
|
||||||
{
|
{
|
||||||
MapManager.Instance.RestartCurrentMap();
|
MapManager.Instance.RestartCurrentMap();
|
||||||
CloseAllPopup();
|
PopupUiController.CloseAllPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveSelectStage(int stage)
|
public void MoveSelectStage(int stage)
|
||||||
{
|
{
|
||||||
MapManager.Instance.MoveSelectStage(stage);
|
MapManager.Instance.MoveSelectStage(stage);
|
||||||
CloseAllPopup();
|
PopupUiController.CloseAllPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveTitleScene()
|
public void MoveTitleScene()
|
||||||
|
@ -55,7 +55,7 @@ namespace BlueWater.Uis
|
|||||||
_countText.text = _currentCount.ToString();
|
_countText.text = _currentCount.ToString();
|
||||||
|
|
||||||
_countSelectUi.SetActive(true);
|
_countSelectUi.SetActive(true);
|
||||||
Open(CombatUiManager.Instance.PopupUiList);
|
Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DiscardAllMessage(List<ItemSlotUi> selectedSlotList)
|
public void DiscardAllMessage(List<ItemSlotUi> selectedSlotList)
|
||||||
@ -65,7 +65,7 @@ namespace BlueWater.Uis
|
|||||||
_contentText.text = "선택한 물품을 모두 버리시겠습니까?";
|
_contentText.text = "선택한 물품을 모두 버리시겠습니까?";
|
||||||
|
|
||||||
_countSelectUi.SetActive(false);
|
_countSelectUi.SetActive(false);
|
||||||
Open(CombatUiManager.Instance.PopupUiList);
|
Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CountDownButton()
|
public void CountDownButton()
|
||||||
|
@ -4,9 +4,9 @@ namespace BlueWater.Uis
|
|||||||
{
|
{
|
||||||
public class GameOverPopupUi : PopupUi
|
public class GameOverPopupUi : PopupUi
|
||||||
{
|
{
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
||||||
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace BlueWater.Uis
|
namespace BlueWater.Uis
|
||||||
{
|
{
|
||||||
public class MenuPopupUi : SwitchActionPopupUi
|
public class MenuPopupUi : SwitchActionPopupUi
|
||||||
{
|
{
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,29 +1,25 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace BlueWater.Uis
|
namespace BlueWater.Uis
|
||||||
{
|
{
|
||||||
public class PopupUi : MonoBehaviour
|
public class PopupUi : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static event Action<PopupUi> OnPopupUiOpenEvent;
|
public bool IsOpened { get; protected set; }
|
||||||
public static event Action<PopupUi> OnPopupUiCloseEvent;
|
|
||||||
|
|
||||||
protected List<PopupUi> PopupUiList;
|
public virtual void Open()
|
||||||
|
|
||||||
public virtual void Open(List<PopupUi> popupUiList)
|
|
||||||
{
|
{
|
||||||
PopupUiList = popupUiList;
|
|
||||||
// 화면의 가장 앞으로 가져오기
|
// 화면의 가장 앞으로 가져오기
|
||||||
transform.SetAsLastSibling();
|
transform.SetAsLastSibling();
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
OnPopupUiOpenEvent?.Invoke(this);
|
PopupUiController.RegisterPopup(this);
|
||||||
|
IsOpened = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Close()
|
public virtual void Close()
|
||||||
{
|
{
|
||||||
gameObject.SetActive(false);
|
gameObject.SetActive(false);
|
||||||
OnPopupUiCloseEvent?.Invoke(this);
|
PopupUiController.UnregisterPopup(this);
|
||||||
|
IsOpened = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
50
Assets/02.Scripts/Ui/PopupUiController.cs
Normal file
50
Assets/02.Scripts/Ui/PopupUiController.cs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using BlueWater.Uis;
|
||||||
|
|
||||||
|
namespace BlueWater
|
||||||
|
{
|
||||||
|
public static class PopupUiController
|
||||||
|
{
|
||||||
|
public static List<PopupUi> PopupUis { get; private set; } = new();
|
||||||
|
|
||||||
|
// Popup 등록
|
||||||
|
public static void RegisterPopup(PopupUi popup)
|
||||||
|
{
|
||||||
|
if (!PopupUis.Contains(popup))
|
||||||
|
{
|
||||||
|
PopupUis.Add(popup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Popup 해제
|
||||||
|
public static void UnregisterPopup(PopupUi popup)
|
||||||
|
{
|
||||||
|
if (PopupUis.Contains(popup))
|
||||||
|
{
|
||||||
|
PopupUis.Remove(popup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 마지막 Popup 닫기
|
||||||
|
public static void CloseLastPopup()
|
||||||
|
{
|
||||||
|
if (PopupUis.Count <= 0) return;
|
||||||
|
|
||||||
|
PopupUis[^1].Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모든 Popup 닫기
|
||||||
|
public static void CloseAllPopup()
|
||||||
|
{
|
||||||
|
foreach (var element in PopupUis)
|
||||||
|
{
|
||||||
|
if (!element.IsOpened) continue;
|
||||||
|
|
||||||
|
element.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Popup 목록이 비어 있는지 확인
|
||||||
|
public static bool IsPopupListEmpty() => PopupUis.Count == 0;
|
||||||
|
}
|
||||||
|
}
|
2
Assets/02.Scripts/Ui/PopupUiController.cs.meta
Normal file
2
Assets/02.Scripts/Ui/PopupUiController.cs.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea2b34c9f4db83a409013e9bf6bcb82a
|
@ -11,9 +11,9 @@ namespace BlueWater.Uis
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
protected InputActionMaps SwitchMapsClosed;
|
protected InputActionMaps SwitchMapsClosed;
|
||||||
|
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
|
|
||||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ namespace BlueWater.Uis
|
|||||||
{
|
{
|
||||||
base.Close();
|
base.Close();
|
||||||
|
|
||||||
if (PopupUiList.Count > 0) return;
|
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||||
|
|
||||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class Manual : SwitchActionPopupUi
|
public class Manual : SwitchActionPopupUi
|
||||||
{
|
{
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Close()
|
public override void Close()
|
||||||
|
@ -146,9 +146,9 @@ public class ManualBook : SwitchActionPopupUi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using BlueWater.Tycoons;
|
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -38,10 +36,10 @@ namespace BlueWater.Uis
|
|||||||
_closeTween.Kill();
|
_closeTween.Kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Open(List<PopupUi> popupUiList)
|
public override void Open()
|
||||||
{
|
{
|
||||||
_rectTransform.anchoredPosition = new Vector2(-960f, 0f);
|
_rectTransform.anchoredPosition = new Vector2(-960f, 0f);
|
||||||
base.Open(popupUiList);
|
base.Open();
|
||||||
_openTween = _rectTransform.DOAnchorPosX(960f, 0.5f).SetAutoKill(false);
|
_openTween = _rectTransform.DOAnchorPosX(960f, 0.5f).SetAutoKill(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using BlueWater.Tycoons;
|
|
||||||
using DG.Tweening;
|
using DG.Tweening;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -36,10 +35,6 @@ namespace BlueWater.Uis
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Image _fadeImage;
|
private Image _fadeImage;
|
||||||
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
public List<PopupUi> PopupUiList { get; private set; }
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// Unity events
|
// Unity events
|
||||||
@ -52,8 +47,6 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
PopupUi.OnPopupUiOpenEvent += RegisterPopup;
|
|
||||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
|
||||||
EventManager.OnTycoonGameStarted += TycoonOpenEvent;
|
EventManager.OnTycoonGameStarted += TycoonOpenEvent;
|
||||||
EventManager.OnTycoonGameOvered += TycoonClosedEvent;
|
EventManager.OnTycoonGameOvered += TycoonClosedEvent;
|
||||||
EventManager.OnFadeInOut += FadeInOut;
|
EventManager.OnFadeInOut += FadeInOut;
|
||||||
@ -63,8 +56,6 @@ namespace BlueWater.Uis
|
|||||||
{
|
{
|
||||||
if (Quitting) return;
|
if (Quitting) return;
|
||||||
|
|
||||||
PopupUi.OnPopupUiOpenEvent -= RegisterPopup;
|
|
||||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
|
||||||
EventManager.OnTycoonGameStarted -= TycoonOpenEvent;
|
EventManager.OnTycoonGameStarted -= TycoonOpenEvent;
|
||||||
EventManager.OnTycoonGameOvered -= TycoonClosedEvent;
|
EventManager.OnTycoonGameOvered -= TycoonClosedEvent;
|
||||||
EventManager.OnFadeInOut -= FadeInOut;
|
EventManager.OnFadeInOut -= FadeInOut;
|
||||||
@ -86,7 +77,6 @@ namespace BlueWater.Uis
|
|||||||
//BrewingUi = GetComponentInChildren<BrewingUi>(true);
|
//BrewingUi = GetComponentInChildren<BrewingUi>(true);
|
||||||
ManualBook = GetComponentInChildren<ManualBook>(true);
|
ManualBook = GetComponentInChildren<ManualBook>(true);
|
||||||
_fadeImage = MainCanvas.transform.Find("FadeImage").GetComponent<Image>();
|
_fadeImage = MainCanvas.transform.Find("FadeImage").GetComponent<Image>();
|
||||||
PopupUiList = new List<PopupUi>(8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -94,43 +84,6 @@ namespace BlueWater.Uis
|
|||||||
// Methods
|
// Methods
|
||||||
#region Methods
|
#region Methods
|
||||||
|
|
||||||
private void RegisterPopup(PopupUi popup)
|
|
||||||
{
|
|
||||||
if (!PopupUiList.Contains(popup))
|
|
||||||
{
|
|
||||||
PopupUiList.Add(popup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UnregisterPopup(PopupUi popup)
|
|
||||||
{
|
|
||||||
if (PopupUiList.Contains(popup))
|
|
||||||
{
|
|
||||||
PopupUiList.Remove(popup);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CloseLastPopup()
|
|
||||||
{
|
|
||||||
if (PopupUiList.Count <= 0) return;
|
|
||||||
|
|
||||||
PopupUiList[^1].Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CloseAllPopup()
|
|
||||||
{
|
|
||||||
var tempList = new List<PopupUi>(PopupUiList);
|
|
||||||
|
|
||||||
foreach (var popup in tempList)
|
|
||||||
{
|
|
||||||
popup.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
PopupUiList.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsPopupListEmpty() => PopupUiList.Count == 0;
|
|
||||||
|
|
||||||
private void TycoonOpenEvent()
|
private void TycoonOpenEvent()
|
||||||
{
|
{
|
||||||
TycoonStageUi.TycoonOpenUi();
|
TycoonStageUi.TycoonOpenUi();
|
||||||
|
@ -594,8 +594,8 @@ MonoBehaviour:
|
|||||||
<PlayerInput>k__BackingField: {fileID: 6054159730444663926}
|
<PlayerInput>k__BackingField: {fileID: 6054159730444663926}
|
||||||
<VisualLook>k__BackingField: {fileID: 6509241874729291456}
|
<VisualLook>k__BackingField: {fileID: 6509241874729291456}
|
||||||
<SkeletonAnimation>k__BackingField: {fileID: 7125556968546628472}
|
<SkeletonAnimation>k__BackingField: {fileID: 7125556968546628472}
|
||||||
<InteractionCanvas>k__BackingField: {fileID: 0}
|
<InteractionCanvas>k__BackingField: {fileID: 56698895639349130}
|
||||||
<SpineController>k__BackingField: {fileID: 0}
|
<SpineController>k__BackingField: {fileID: 6662554121718997272}
|
||||||
<PlayerHealthPoint>k__BackingField: {fileID: 3359549505901716120}
|
<PlayerHealthPoint>k__BackingField: {fileID: 3359549505901716120}
|
||||||
<TycoonInput>k__BackingField: {fileID: 1674052485383758547}
|
<TycoonInput>k__BackingField: {fileID: 1674052485383758547}
|
||||||
<TycoonMovement>k__BackingField: {fileID: 4836489897218844789}
|
<TycoonMovement>k__BackingField: {fileID: 4836489897218844789}
|
||||||
@ -748,6 +748,17 @@ PrefabInstance:
|
|||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: a6a0d1675321b7a43b4132ca15cf7ca0, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: a6a0d1675321b7a43b4132ca15cf7ca0, type: 3}
|
||||||
|
--- !u!114 &56698895639349130 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8043919875794167790, guid: a6a0d1675321b7a43b4132ca15cf7ca0, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 8027897071964512356}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9ebe6250da0dfa044937230037499988, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!224 &3452808590865560956 stripped
|
--- !u!224 &3452808590865560956 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 4648285208244819224, guid: a6a0d1675321b7a43b4132ca15cf7ca0, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4648285208244819224, guid: a6a0d1675321b7a43b4132ca15cf7ca0, type: 3}
|
||||||
|
Loading…
Reference in New Issue
Block a user