23 lines
505 B
C#
23 lines
505 B
C#
using System;
|
|
|
|
public class Bed : BaseInteractableObject
|
|
{
|
|
private Player _player;
|
|
|
|
public override void Interact(Player player)
|
|
{
|
|
_player = player;
|
|
_player.SetPlayerAnimation(AnimationStates.Sitting, OnAnimationFinished);
|
|
}
|
|
|
|
private void OnAnimationFinished()
|
|
{
|
|
TimeManager.Instance.FastForward(TimeSpan.FromHours(8), OnFastForwardEnd);
|
|
}
|
|
|
|
private void OnFastForwardEnd()
|
|
{
|
|
_player.SetPlayerAnimation(AnimationStates.Standing);
|
|
}
|
|
}
|