Files
SimUL/Assets/Scripts/InteractableObjects/Bed.cs
T
2023-03-08 13:40:01 +02:00

21 lines
478 B
C#

using System;
using UnityEngine;
public class Bed : BaseInteractableObject
{
private Player _player;
public override void Interact(Player player)
{
_player=player;
Debug.Log("Sitting");
player.SetPlayerAnimation(AnimationStates.Sitting);
TimeManager.Instance.FastForward(TimeSpan.FromHours(8), OnFastForwardEnd);
}
private void OnFastForwardEnd()
{
_player.SetPlayerAnimation(AnimationStates.Standing);
}
}