mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 20:52:10 +01:00
Added Round and Respawnsystem
This commit is contained in:
34
Assets/Scripts/GameManager/Spawnpoint.cs
Normal file
34
Assets/Scripts/GameManager/Spawnpoint.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Spawnpoint : MonoBehaviour
|
||||
{
|
||||
[SerializeField] public int teamID = 0;
|
||||
[SerializeField] public bool available = true;
|
||||
[SerializeField] public bool blocked = false;
|
||||
public Vector3 position;
|
||||
private void Awake()
|
||||
{
|
||||
position = this.transform.position;
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
IEnumerator disableEnum(float time)
|
||||
{
|
||||
available = false;
|
||||
yield return new WaitForSeconds(time);
|
||||
available = true;
|
||||
}
|
||||
public void disableForSeconds(float time)
|
||||
{
|
||||
StartCoroutine(disableEnum(time));
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user