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();
        }
    }
}
