28 lines
580 B
C#
28 lines
580 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace BITFALL.Scenes
|
|
{
|
|
public class PlayerSpawnPoint : MonoBehaviour
|
|
{
|
|
private Transform Transform;
|
|
private void Start()
|
|
{
|
|
Transform = transform;
|
|
PlayerSpawnPointService._spawnPoints.Add(this);
|
|
destroyCancellationToken.Register(Dispose);
|
|
}
|
|
private void Dispose()
|
|
{
|
|
PlayerSpawnPointService._spawnPoints.Remove(this);
|
|
}
|
|
public Matrix4x4 GetSpawnPoint()
|
|
{
|
|
return Matrix4x4.TRS(transform.position, Transform.rotation, Transform.localScale);
|
|
}
|
|
}
|
|
}
|
|
|