0.3.1.0 업데이트

This commit is contained in:
NTG_Lenovo 2024-10-10 14:44:37 +09:00
parent 18f78706d0
commit 37612b8dbe
15 changed files with 61 additions and 113 deletions

View File

@ -19,8 +19,6 @@ namespace BlueWater.BehaviorTrees.Actions
public override TaskStatus OnUpdate() public override TaskStatus OnUpdate()
{ {
_customer.SetTableSeatPositionAndDirection(); _customer.SetTableSeatPositionAndDirection();
_customer.CurrentTableSeat.OccupySeat();
_customer.CurrentTableSeat.UnreserveSeat();
return TaskStatus.Success; return TaskStatus.Success;
} }
} }

View File

@ -258,6 +258,8 @@ namespace BlueWater.Npcs.Customers
public void SetTableSeatPositionAndDirection() public void SetTableSeatPositionAndDirection()
{ {
transform.position = CurrentTableSeat.SeatTransform.position; transform.position = CurrentTableSeat.SeatTransform.position;
CurrentTableSeat.OccupySeat();
CurrentTableSeat.UnreserveSeat();
SetCurrentDirection(CurrentTableSeat.TableDirection); SetCurrentDirection(CurrentTableSeat.TableDirection);
} }
@ -368,8 +370,9 @@ namespace BlueWater.Npcs.Customers
CurrentTableSeat.CleanTable(); CurrentTableSeat.CleanTable();
} }
var gold = CurrentLevelData.Gold * TycoonManager.Instance.TycoonStatus.GoldMultiplier;
PayMoneyParticle.Play(); PayMoneyParticle.Play();
PayMoneyUi.PayMoney(CurrentLevelData.Gold); PayMoneyUi.PayMoney((int)gold);
TycoonManager.Instance.TycoonStatus.CurrentExp += CurrentLevelData.Exp; TycoonManager.Instance.TycoonStatus.CurrentExp += CurrentLevelData.Exp;
TycoonManager.Instance.TycoonStatus.CurrentGold += CurrentLevelData.Gold; TycoonManager.Instance.TycoonStatus.CurrentGold += CurrentLevelData.Gold;
} }

View File

@ -62,9 +62,10 @@ namespace BlueWater.Players
// Methods // Methods
public void SetMaxHealthPoint(int changedHealthPoint) public void SetMaxHealthPoint(int changedHealthPoint)
{ {
var previousMaxHealthPoint = MaxHealthPoint;
var newChangedHealthPoint = Mathf.Clamp(changedHealthPoint, 0, 10); var newChangedHealthPoint = Mathf.Clamp(changedHealthPoint, 0, 10);
MaxHealthPoint = newChangedHealthPoint; MaxHealthPoint = newChangedHealthPoint;
EventManager.OnMaxHealthChanged?.Invoke(newChangedHealthPoint); EventManager.OnMaxHealthChanged?.Invoke(previousMaxHealthPoint, newChangedHealthPoint);
} }
public void SetCurrentHealthPoint(int changedHealthPoint) public void SetCurrentHealthPoint(int changedHealthPoint)

View File

@ -14,7 +14,7 @@ namespace BlueWater
public static Action<float, float, Color?, float> FadeInOut; public static Action<float, float, Color?, float> FadeInOut;
// Player // Player
public static Action<int> OnMaxHealthChanged; public static Action<int, int> OnMaxHealthChanged;
public static Action<int> OnHealthChanged; public static Action<int> OnHealthChanged;
public static Action OnDead; public static Action OnDead;

View File

@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: StageData m_Name: StageData
m_EditorClassIdentifier: m_EditorClassIdentifier:
<WaitTimeInStarted>k__BackingField: 5 <WaitTimeInStarted>k__BackingField: 5
<VomitingPercent>k__BackingField: 100 <VomitingPercent>k__BackingField: 10
<VomitingWaitTime>k__BackingField: 30 <VomitingWaitTime>k__BackingField: 30
<DirtyTablePercent>k__BackingField: 20 <DirtyTablePercent>k__BackingField: 20
<DirtyTableWaitTime>k__BackingField: 30 <DirtyTableWaitTime>k__BackingField: 30

View File

@ -486,12 +486,10 @@ namespace BlueWater
_completeCocktailImage.enabled = true; _completeCocktailImage.enabled = true;
_completeText.enabled = true; _completeText.enabled = true;
// 1. 플레이어 음료 들기
EventManager.OnCocktailCompleted?.Invoke(matchingCocktail);
yield return new WaitForSeconds(1f); yield return new WaitForSeconds(1f);
HidePanel(); HidePanel();
EventManager.OnCocktailCompleted?.Invoke(matchingCocktail);
} }
/// <summary> /// <summary>

View File

@ -120,11 +120,8 @@ namespace BlueWater.Tycoons
get => _currentGold; get => _currentGold;
set set
{ {
var previousGold = _currentGold; _currentGold = value;
var addedGold = (int)((value - previousGold) * _goldMultiplier); EventManager.OnChangeGold?.Invoke(value);
var newGold = previousGold + addedGold;
EventManager.OnChangeGold?.Invoke(newGold);
_currentGold = newGold;
} }
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using BlueWater.Tycoons;
using Sirenix.OdinInspector; using Sirenix.OdinInspector;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@ -70,10 +71,12 @@ namespace BlueWater.Uis
} }
} }
public void SetMaxHealthPoint(int changedMaxHealthPoint) public void SetMaxHealthPoint(int previousMaxHealthPoint, int changedMaxHealthPoint)
{ {
_maxHeartCount = changedMaxHealthPoint; var addedMaxHealthPoint = changedMaxHealthPoint - previousMaxHealthPoint;
_maxHeartCount = Mathf.CeilToInt(changedMaxHealthPoint * 0.5f);
InitializeHealthPoint(); InitializeHealthPoint();
TycoonManager.Instance.TycoonStatus.CurrentPlayerHealth += addedMaxHealthPoint * 2;
} }
public void SetCurrentHealthPoint(int changedHealthPoint) public void SetCurrentHealthPoint(int changedHealthPoint)

View File

@ -167,11 +167,6 @@ namespace BlueWater.Uis
public bool IsWaitTimeOver() => _isOrdered && _isWaitTimeOver; public bool IsWaitTimeOver() => _isOrdered && _isWaitTimeOver;
public bool IsFoodReceive() => _isItemReceived; public bool IsFoodReceive() => _isItemReceived;
public void CancelOrder()
{
_tableSeat.VacateSeat();
}
public void ReceiveItem(IPickup pickupItem) public void ReceiveItem(IPickup pickupItem)
{ {
_tween.Kill(); _tween.Kill();

View File

@ -50,6 +50,7 @@ namespace BlueWater
_maxDistance = Vector3.Distance(_rect.anchoredPosition, billInfoPosition0); _maxDistance = Vector3.Distance(_rect.anchoredPosition, billInfoPosition0);
_slider.value = 1f; _slider.value = 1f;
_orderImage.sprite = customer.OrderedCocktailData.Sprite; _orderImage.sprite = customer.OrderedCocktailData.Sprite;
_tableNumberText.text = customer.CurrentTableSeat.TableNumber.ToString();
var sliderSequence = DOTween.Sequence(); var sliderSequence = DOTween.Sequence();
sliderSequence.Append(_slider.DOValue(0f, customer.CurrentLevelData.HurryTime) sliderSequence.Append(_slider.DOValue(0f, customer.CurrentLevelData.HurryTime)
@ -78,6 +79,7 @@ namespace BlueWater
CurrentBillInfo = billInfo; CurrentBillInfo = billInfo;
CurrentBillInfo.IsEmpty = false; CurrentBillInfo.IsEmpty = false;
CurrentBillInfo.IsMoving = true;
var distance = Vector3.Distance(_rect.anchoredPosition, CurrentBillInfo.Position); var distance = Vector3.Distance(_rect.anchoredPosition, CurrentBillInfo.Position);
var moveTime = Mathf.Lerp(0.2f, 1f, distance / _maxDistance); var moveTime = Mathf.Lerp(0.2f, 1f, distance / _maxDistance);
@ -95,6 +97,7 @@ namespace BlueWater
private void OnArrivedTarget() private void OnArrivedTarget()
{ {
CurrentBillInfo.IsMoving = false;
var randomZ = Random.Range(-15f, 15f); var randomZ = Random.Range(-15f, 15f);
var arrivedSequence = DOTween.Sequence(); var arrivedSequence = DOTween.Sequence();

View File

@ -9,6 +9,9 @@ namespace BlueWater
[field: SerializeField] [field: SerializeField]
public bool IsEmpty = true; public bool IsEmpty = true;
[field: SerializeField]
public bool IsMoving;
[field: SerializeField] [field: SerializeField]
public Vector3 Position { get; private set; } public Vector3 Position { get; private set; }
} }

View File

@ -1,3 +1,4 @@
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using BlueWater.Npcs.Customers; using BlueWater.Npcs.Customers;
using Sirenix.OdinInspector; using Sirenix.OdinInspector;
@ -26,6 +27,7 @@ namespace BlueWater
private Dictionary<Customer, Bill> _customerBillDictionary = new(); private Dictionary<Customer, Bill> _customerBillDictionary = new();
private bool _isMovedChain; private bool _isMovedChain;
private bool _isActivating;
private const string Move = "Move"; private const string Move = "Move";
@ -51,7 +53,7 @@ namespace BlueWater
private void OrderResult(Customer customer, bool isSucceed) private void OrderResult(Customer customer, bool isSucceed)
{ {
if (_customerBillDictionary.TryGetValue(customer, out Bill bill)) if (_customerBillDictionary.TryGetValue(customer, out var bill))
{ {
bill.OrderResult(isSucceed, UpdateBillInfo); bill.OrderResult(isSucceed, UpdateBillInfo);
_customerBillDictionary.Remove(customer); _customerBillDictionary.Remove(customer);
@ -76,7 +78,8 @@ namespace BlueWater
} }
} }
} }
Invoke(nameof(StopChainAnimation), 1f);
StopChainAnimation();
} }
private void PlayChainAnimation() private void PlayChainAnimation()
@ -87,10 +90,35 @@ namespace BlueWater
private void StopChainAnimation() private void StopChainAnimation()
{ {
if (!_isMovedChain) return; if (!_isMovedChain || _isActivating) return;
StartCoroutine(nameof(StopChainAnimationCoroutine));
}
private IEnumerator StopChainAnimationCoroutine()
{
_isActivating = true;
while (true)
{
var isMoving = false;
foreach (var element in _billInfos)
{
if (!element.IsMoving) continue;
isMoving = true;
}
if (!isMoving)
{
break;
}
yield return null;
}
_chain.AnimationState.ClearTrack(0); _chain.AnimationState.ClearTrack(0);
_isMovedChain = false; _isMovedChain = false;
_isActivating = false;
} }
} }
} }

View File

@ -2218,18 +2218,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -5 value: -5
@ -4204,18 +4192,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 2.5 value: 2.5
@ -5074,18 +5050,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 5 value: 5
@ -5622,18 +5586,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 2.5 value: 2.5
@ -5700,18 +5652,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -2.5 value: -2.5
@ -5922,18 +5862,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
@ -7010,18 +6938,6 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 1582116343231843844} m_TransformParent: {fileID: 1582116343231843844}
m_Modifications: m_Modifications:
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.x
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.y
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalScale.z
value: 0.9
objectReference: {fileID: 0}
- target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3} - target: {fileID: 809828747251277026, guid: 8d99c5b5242b8da41ba9b1410a70cd1d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -2.5 value: -2.5

View File

@ -61,6 +61,7 @@ MonoBehaviour:
<SeatTransform>k__BackingField: {fileID: 3939857914763977653} <SeatTransform>k__BackingField: {fileID: 3939857914763977653}
<Food>k__BackingField: {fileID: 8752266548893034047} <Food>k__BackingField: {fileID: 8752266548893034047}
TableDirection: {x: -1, y: 0, z: 0} TableDirection: {x: -1, y: 0, z: 0}
TableNumber: 0
_foodImage: {fileID: 21300000, guid: 514247b5965aef447b13b5da95f3281a, type: 3} _foodImage: {fileID: 21300000, guid: 514247b5965aef447b13b5da95f3281a, type: 3}
_dirtyImage: {fileID: 21300000, guid: cda1d961a563b6143a024170ed6f0f44, type: 3} _dirtyImage: {fileID: 21300000, guid: cda1d961a563b6143a024170ed6f0f44, type: 3}
--- !u!1 &1352874222752200122 --- !u!1 &1352874222752200122
@ -300,6 +301,7 @@ MonoBehaviour:
<SeatTransform>k__BackingField: {fileID: 1356178426752869258} <SeatTransform>k__BackingField: {fileID: 1356178426752869258}
<Food>k__BackingField: {fileID: 4724775134085759924} <Food>k__BackingField: {fileID: 4724775134085759924}
TableDirection: {x: 1, y: 0, z: 0} TableDirection: {x: 1, y: 0, z: 0}
TableNumber: 0
_foodImage: {fileID: 21300000, guid: 514247b5965aef447b13b5da95f3281a, type: 3} _foodImage: {fileID: 21300000, guid: 514247b5965aef447b13b5da95f3281a, type: 3}
_dirtyImage: {fileID: 21300000, guid: cda1d961a563b6143a024170ed6f0f44, type: 3} _dirtyImage: {fileID: 21300000, guid: cda1d961a563b6143a024170ed6f0f44, type: 3}
--- !u!1 &6493535781353555306 --- !u!1 &6493535781353555306
@ -690,15 +692,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3} - target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 3 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3} - target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 3 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3} - target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 3 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3} - target: {fileID: 7986070582027999988, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -790,6 +792,7 @@ MonoBehaviour:
_tableSeats: _tableSeats:
- {fileID: 6383913593085221228} - {fileID: 6383913593085221228}
- {fileID: 6277647266874368514} - {fileID: 6277647266874368514}
_tableNumber: 0
--- !u!210 &3389074959205472123 --- !u!210 &3389074959205472123
SortingGroup: SortingGroup:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 0.3.0.6 bundleVersion: 0.3.1.0
preloadedAssets: preloadedAssets:
- {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3} - {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
metroInputSource: 0 metroInputSource: 0