|
|
- 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;
- }
- }
|