34 lines
883 B
C#
34 lines
883 B
C#
using BlueWater.Uis;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater.Tycoons
|
|
{
|
|
public class PowerSwitch : InteractionFurniture
|
|
{
|
|
[SerializeField, Required]
|
|
private Transform _visualLook;
|
|
|
|
public override void Interaction()
|
|
{
|
|
EventManager.InvokeTycoonGameStarted();
|
|
}
|
|
|
|
public override bool CanInteraction()
|
|
{
|
|
return !IsOpened && TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.CanOpen();
|
|
}
|
|
|
|
protected override void OpenTycoonSwitch()
|
|
{
|
|
base.OpenTycoonSwitch();
|
|
_visualLook.localScale = new Vector3(-1f, 1f, 1f);
|
|
}
|
|
|
|
protected override void ClosedTycoonSwitch()
|
|
{
|
|
base.ClosedTycoonSwitch();
|
|
_visualLook.localScale = new Vector3(1f, 1f, 1f);
|
|
}
|
|
}
|
|
} |