This commit is contained in:
mdecrai
2023-06-20 21:00:33 +02:00
parent ec4cda81e9
commit 772ebc64f0
130 changed files with 54030 additions and 0 deletions

30
Assets/Scripts/Clock.cs Normal file
View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Clock : MonoBehaviour
{
// Array ref to player managers
public GameManager gameManager { private get; set; }
public float DayTime = 10.0f;
// Start is called before the first frame update
void Start()
{
// callUpdateGame will be called once each n seconds
InvokeRepeating("callUpdateGame", 0.0f, DayTime);
}
// Update is called once per frame
void Update(){}
// calls update game
private void callUpdateGame()
{
if (gameManager != null)
{
gameManager.updateGame();
}
}
}