Scriptum/Assets/Scripts/SceneManager/Teleports/Gateway.cs
KrolMel 2e648df55e Fixed player position
Added automatic player appearance, fixed teleports
2022-10-01 15:39:24 +02:00

36 lines
797 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.SceneManagement;
[Serializable]
public class Gateway
{
[SerializeField]
public int id;
[SerializeField]
public string currentMapName;
[SerializeField]
public Vector3 coords;
[SerializeField]
public string nextMapName; //name of the next map
[SerializeField]
public Vector3 respawnCoords; // coords on the next map
public Gateway(int _id, Vector3 _coords, string _nextMapName, Vector3 _respawnCoords)
{
id = _id;
currentMapName = SceneManager.GetActiveScene().name;
coords = _coords;
respawnCoords = _respawnCoords;
nextMapName = _nextMapName;
}
}