revival/game/Assets/Scripts/Death & Respawn/RespawnManager.cs

27 lines
575 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RespawnManager : MonoBehaviour
{
private Vector3 respawnPoint;
// Set respawn point in Respawn Manager.
public void SetRespawnPoint(Vector3 _respawnPoint)
{
respawnPoint = _respawnPoint;
}
// Return the respawn point.
public Vector3 GetRespawnPoint()
{
return respawnPoint;
}
// Show current respawn point in log. This can be deleted at later stage.
private void Update()
{
Debug.Log(respawnPoint);
}
}