All Map + things
This commit is contained in:
parent
769264c79b
commit
ee2a5fdf08
93 changed files with 5374 additions and 27 deletions
31
Assets/Scripts/Singletons/GameManager.cs
Normal file
31
Assets/Scripts/Singletons/GameManager.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameManager : MonoBehaviourSingletonPersistent<GameManager>
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
// Delete, use only for Debug
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
StartFightForAll();
|
||||
}
|
||||
}
|
||||
|
||||
public void StartFightForAll()
|
||||
{
|
||||
AbstractUnit[] units = FindObjectsByType<AbstractUnit>(FindObjectsSortMode.None);
|
||||
foreach (var unit in units)
|
||||
{
|
||||
unit.StartFight();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue