2021-02-15 14:14:42 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class RespawnManager : MonoBehaviour
|
|
|
|
{
|
|
|
|
private Vector3 respawnPoint;
|
|
|
|
|
2021-02-15 17:23:29 +01:00
|
|
|
// Set respawn point in Respawn Manager.
|
|
|
|
public void SetRespawnPoint(Vector3 _respawnPoint)
|
2021-02-15 14:14:42 +01:00
|
|
|
{
|
|
|
|
respawnPoint = _respawnPoint;
|
|
|
|
}
|
|
|
|
|
2021-02-15 17:23:29 +01:00
|
|
|
// Return the respawn point.
|
|
|
|
public Vector3 GetRespawnPoint()
|
2021-02-15 14:14:42 +01:00
|
|
|
{
|
|
|
|
return respawnPoint;
|
|
|
|
}
|
|
|
|
|
2021-02-15 17:23:29 +01:00
|
|
|
// Show current respawn point in log. This can be deleted at later stage.
|
2021-02-15 14:14:42 +01:00
|
|
|
private void Update()
|
|
|
|
{
|
2021-02-26 18:08:41 +01:00
|
|
|
Debug.Log("Respawn point is: " + respawnPoint);
|
2021-02-15 14:14:42 +01:00
|
|
|
}
|
|
|
|
}
|