타이쿤 맵 재수정 및 퇴장 대사 추가 및 수정

This commit is contained in:
Nam Tae Gun 2024-07-21 03:55:30 +09:00
parent a7f7dbd09a
commit 90a7fb1e49
8 changed files with 1876 additions and 1772 deletions

View File

@ -50,8 +50,14 @@ namespace BlueWater.BehaviorTrees.Actions
if (_customer.HappyPoint <= 0) if (_customer.HappyPoint <= 0)
{ {
_foodBalloonUi.CancelOrder(); _foodBalloonUi.CancelOrder();
DialogueLua.SetVariable("HappyPoint", _customer.HappyPoint); var barkName = _customer.HappyPoint switch
_customer.Bark("PayMoney", BarkOrder.FirstValid); {
>= 3 => "SatisfactoryEvaluation",
>= 2 => "MediocreEvaluation",
>= 1 => "MediocreEvaluation",
_ => "UnsatisfactoryEvaluation"
};
_customer.Bark(barkName, BarkOrder.FirstValid);
} }
return TaskStatus.Failure; return TaskStatus.Failure;
} }

View File

@ -53,8 +53,14 @@ namespace BlueWater.BehaviorTrees.Actions
if (_customer.HappyPoint <= 0) if (_customer.HappyPoint <= 0)
{ {
_foodBalloonUi.CancelOrder(); _foodBalloonUi.CancelOrder();
DialogueLua.SetVariable("HappyPoint", _customer.HappyPoint); var barkName = _customer.HappyPoint switch
_customer.Bark("PayMoney", BarkOrder.FirstValid); {
>= 3 => "SatisfactoryEvaluation",
>= 2 => "MediocreEvaluation",
>= 1 => "MediocreEvaluation",
_ => "UnsatisfactoryEvaluation"
};
_customer.Bark(barkName, BarkOrder.FirstValid);
} }
return TaskStatus.Failure; return TaskStatus.Failure;
} }

View File

@ -56,32 +56,40 @@ namespace BlueWater.BehaviorTrees.Actions
return TaskStatus.Running; return TaskStatus.Running;
} }
private async void HandlePayMoneyInteraction() private void HandlePayMoneyInteraction()
{ {
var tycoonPlayer = GameManager.Instance.CurrentTycoonPlayer; var tycoonPlayer = GameManager.Instance.CurrentTycoonPlayer;
var foodPrice = _customer.ItemData.Price; var foodPrice = _customer.ItemData.Price;
var tip = _customer.HappyPoint switch var tip = 0f;
string barkName;
switch (_customer.HappyPoint)
{ {
>= 3 => 2f, case >= 3:
2 => 1.5f, tip = 2f;
1 => 1.1f, barkName = "SatisfactoryEvaluation";
_ => 1f break;
}; case >= 2:
tip = 1.5f;
barkName = "MediocreEvaluation";
break;
case >= 1:
tip = 1.1f;
barkName = "MediocreEvaluation";
break;
default:
tip = 1f;
barkName = "UnsatisfactoryEvaluation";
break;
}
var finalPrice = (int)(foodPrice * tip); var finalPrice = (int)(foodPrice * tip);
tycoonPlayer.GetMoney(finalPrice); tycoonPlayer.GetMoney(finalPrice);
_customer.PayMoney(finalPrice); _customer.PayMoney(finalPrice);
_foodBalloonUi.HideUi(); _foodBalloonUi.HideUi();
_customer.OnInteraction -= HandlePayMoneyInteraction; _customer.OnInteraction -= HandlePayMoneyInteraction;
_customer.Bark(barkName, BarkOrder.FirstValid);
await Awaitable.WaitForSecondsAsync(1f);
_customer.UnregisterPlayerInteraction(); _customer.UnregisterPlayerInteraction();
_foodBalloonUi.CancelOrder(); _foodBalloonUi.CancelOrder();
// TODO : 대화 안나옴
DialogueLua.SetVariable("HappyPoint", _customer.HappyPoint);
_customer.Bark("PayMoney", BarkOrder.FirstValid);
_isPaidMoney = true; _isPaidMoney = true;
} }
} }

View File

@ -5572,7 +5572,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -2.129 value: 4.3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@ -6130,7 +6130,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -1.822 value: 4.607
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@ -7334,7 +7334,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -1.728 value: 4.7009997
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3} - target: {fileID: 1061695247072719575, guid: 28c8f2cd9a2817345b5d1fe15e1bebd3, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w

View File

@ -48,8 +48,8 @@ MonoBehaviour:
Money Success Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BlueWater.BehaviorTrees.Actions.PayMoney","NodeData":{"Offset":"(-5.000045,150)","Comment":"\ub3c8\uc744 Money Success Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BlueWater.BehaviorTrees.Actions.PayMoney","NodeData":{"Offset":"(-5.000045,150)","Comment":"\ub3c8\uc744
\uc9c0\ubd88\ud55c\ub2e4"},"ID":33,"Name":"Pay Money","Instant":true}]},{"Type":"BehaviorDesigner.Runtime.Tasks.Sequence","NodeData":{"Offset":"(295,150.277832)"},"ID":34,"Name":"Pay \uc9c0\ubd88\ud55c\ub2e4"},"ID":33,"Name":"Pay Money","Instant":true}]},{"Type":"BehaviorDesigner.Runtime.Tasks.Sequence","NodeData":{"Offset":"(295,150.277832)"},"ID":34,"Name":"Pay
Money Failure Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BlueWater.BehaviorTrees.Actions.Move","NodeData":{"Offset":"(-95.90906,150.277771)","Comment":"\uc785\uad6c\ub85c Money Failure Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BlueWater.BehaviorTrees.Actions.Move","NodeData":{"Offset":"(-95.90906,150.277771)","Comment":"\uc785\uad6c\ub85c
\ub418\ub3cc\uc544\uac04\ub2e4"},"ID":35,"Name":"Move","Instant":true,"Boolean<UseMovePosition>k__BackingField":true,"SharedVector3<MovePosition>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedVector3","Name":null,"Vector3mValue":"(3.5,0,-16.5)"},"SharedCollider<Target>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedCollider","Name":null}},{"Type":"BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject.Destroy","NodeData":{"Offset":"(74.09094,150.277771)"},"ID":36,"Name":"Destroy","Instant":true,"SharedGameObjecttargetGameObject":{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},"Singletime":0}]}]}]},{"Type":"BehaviorDesigner.Runtime.Tasks.Sequence","NodeData":{"Offset":"(1599.93726,154.760559)","Comment":"\ud1f4\uc7a5\ud55c\ub2e4"},"ID":37,"Name":"Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BlueWater.BehaviorTrees.Actions.Move","NodeData":{"Offset":"(-89.1889648,135.67572)","Comment":"\uc785\uad6c\ub85c \ub418\ub3cc\uc544\uac04\ub2e4"},"ID":35,"Name":"Move","Instant":true,"Boolean<UseMovePosition>k__BackingField":true,"SharedVector3<MovePosition>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedVector3","Name":null,"Vector3mValue":"(3.5,0,-16.5)"},"SharedCollider<Target>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedCollider","Name":null}},{"Type":"BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject.Destroy","NodeData":{"Offset":"(74.09094,150.277771)"},"ID":36,"Name":"Destroy","Instant":true,"SharedGameObjecttargetGameObject":{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},"Singletime":0}]}]}]},{"Type":"BehaviorDesigner.Runtime.Tasks.Sequence","NodeData":{"Offset":"(1599.93726,154.760559)","Comment":"\ud1f4\uc7a5\ud55c\ub2e4"},"ID":37,"Name":"Sequence","Instant":true,"AbortTypeabortType":"None","Children":[{"Type":"BehaviorDesigner.Runtime.Tasks.Wait","NodeData":{"Offset":"(-145.702881,148.345764)"},"ID":38,"Name":"Wait","Instant":true,"SharedFloatwaitTime":{"Type":"BehaviorDesigner.Runtime.SharedFloat","Name":null,"SinglemValue":1},"SharedBoolrandomWait":{"Type":"BehaviorDesigner.Runtime.SharedBool","Name":null,"BooleanmValue":false},"SharedFloatrandomWaitMin":{"Type":"BehaviorDesigner.Runtime.SharedFloat","Name":null,"SinglemValue":1},"SharedFloatrandomWaitMax":{"Type":"BehaviorDesigner.Runtime.SharedFloat","Name":null,"SinglemValue":1}},{"Type":"BlueWater.BehaviorTrees.Actions.Move","NodeData":{"Offset":"(2.761672,146.545288)","Comment":"\uc785\uad6c\ub85c
\ub418\ub3cc\uc544\uac04\ub2e4"},"ID":38,"Name":"Move","Instant":true,"Boolean<UseMovePosition>k__BackingField":true,"SharedVector3<MovePosition>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedVector3","Name":null,"Vector3mValue":"(3.5,0,-16.5)"},"SharedCollider<Target>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedCollider","Name":null}},{"Type":"BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject.Destroy","NodeData":{"Offset":"(80.8110352,135.67572)"},"ID":39,"Name":"Destroy","Instant":true,"SharedGameObjecttargetGameObject":{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},"Singletime":0}]}]},"Variables":[{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},{"Type":"BehaviorDesigner.Runtime.SharedInt","Name":"HappyPoint","IsShared":true,"Int32mValue":0}]}' \ub418\ub3cc\uc544\uac04\ub2e4"},"ID":39,"Name":"Move","Instant":true,"Boolean<UseMovePosition>k__BackingField":true,"SharedVector3<MovePosition>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedVector3","Name":null,"Vector3mValue":"(3.5,0,-16.5)"},"SharedCollider<Target>k__BackingField":{"Type":"BehaviorDesigner.Runtime.SharedCollider","Name":null}},{"Type":"BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject.Destroy","NodeData":{"Offset":"(172.761688,146.545288)"},"ID":40,"Name":"Destroy","Instant":true,"SharedGameObjecttargetGameObject":{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},"Singletime":0}]}]},"Variables":[{"Type":"BehaviorDesigner.Runtime.SharedGameObject","Name":"MyObj","IsShared":true},{"Type":"BehaviorDesigner.Runtime.SharedInt","Name":"HappyPoint","IsShared":true,"Int32mValue":0}]}'
fieldSerializationData: fieldSerializationData:
typeName: [] typeName: []
fieldNameHash: fieldNameHash:

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5c62b839e6953f14fa0f909d5d673b27 guid: 9269b5fa2f423d74d9aca1bc0dec95ee
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 11400000 mainObjectFileID: 11400000

File diff suppressed because it is too large Load Diff