Global Game Jam 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
717 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Variables;
public class CharacterReset : MonoBehaviour, IResettable
{
[SerializeField, Header("References")]
Reference<bool> m_isPlayerDead;
private Vector3 m_startPosition;
private Quaternion m_startRotation;
public void OnLevelLoad()
{
m_startPosition = transform.position;
m_startRotation = transform.rotation;
}
public void OnResetEnd()
{
}
public IEnumerator OnResetStart(float time)
{
transform.position = m_startPosition;
transform.rotation = m_startRotation;
m_isPlayerDead.Value = false;
yield break;
}
}