Exemplo n.º 1
0
    // Start is called before the first frame update
    // Acts as a initialzing method.
    void Start()
    {
        var temp = GameObject.FindGameObjectWithTag("DayController");

        if (temp != null)
        {
            dayController = temp.GetComponent <DayController>();
            dayController.Subscribe(this);
            dayCycle = dayController.GetDayCycle();
            //Sets initial state
            SetSpawnState();
        }
        spawnPoints = FindObjectOfType <MoveSpots>();
    }
Exemplo n.º 2
0
    public void Start()
    {
        GameObject temp = GameObject.FindGameObjectWithTag("DayController");

        if (temp != null)
        {
            dayController = temp.GetComponent <DayController>();
        }
        else
        {
            Debug.Log("Can't Find DayController");
        }

        if (dayController != null)
        {
            dayController.Subscribe(this);
            dayCycle = dayController.GetDayCycle();
            UpdateIndicator();
        }
        else
        {
            Debug.Log("DayController not referenced.");
        }
    }