47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System;
|
|
using BlueWater.Interfaces;
|
|
using BlueWater.Npcs.Crews;
|
|
using BlueWater.Npcs.Crews.Server;
|
|
|
|
namespace BlueWater.Tycoons
|
|
{
|
|
public class BartenderTable : ServingTable
|
|
{
|
|
public override void Interaction()
|
|
{
|
|
// 테이블의 칵테일을 가져가는 경우
|
|
if (CurrentPickupItem != null)
|
|
{
|
|
CurrentTycoonPlayer.TycoonPickupHandler.PickupItem(CurrentPickupItem);
|
|
CurrentTycoonPlayer.InteractionCanvas.BalloonUi.SetItemImage(CurrentPickupItem);
|
|
CocktailGlassImage.enabled = false;
|
|
InteractionCanvas.BalloonUi.DiscardItem();
|
|
CurrentPickupItem = null;
|
|
OrderedCustomer = null;
|
|
}
|
|
}
|
|
|
|
public override bool CanInteraction()
|
|
{
|
|
return CurrentPickupItem != null && !CurrentTycoonPlayer.TycoonPickupHandler.IsPickedUpCocktail();
|
|
}
|
|
|
|
public override bool CanInteractionCrew(Crew crew = null)
|
|
{
|
|
var servingCrew = (ServerCrew)crew;
|
|
if (!servingCrew)
|
|
{
|
|
throw new Exception("상호작용 오브젝트 오류");
|
|
}
|
|
|
|
return servingCrew.CurrentActionType == ActionType.TakeCocktail && CurrentPickupItem != null && OrderedCustomer;
|
|
}
|
|
|
|
public void CompleteMakingCocktail(IPickup cocktailData)
|
|
{
|
|
CurrentPickupItem = cocktailData;
|
|
CocktailGlassImage.enabled = true;
|
|
InteractionCanvas.BalloonUi.SetItemImage(CurrentPickupItem);
|
|
}
|
|
}
|
|
} |