void CleanFloodsReward(WebData data)
    {
        GameObject cleanerObj = SpawnController.instance.SpawnCleaner();
        Cleaner    cleaner    = cleanerObj.GetComponent <Cleaner>();

        if (!cleaner.AssignJob())
        {
            UIController.instance.AddNews(data.sender, " wants to clean some of the floods, but there was none left.");
            Destroy(cleanerObj);
        }

        cleaner.gameObject.SetActive(true);
        UIController.instance.AddNews(data.sender, " is going to clean up some of the floods.");
    }
Esempio n. 2
0
    void TimeController_OnMonthPassed()
    {
        if (!hasStarted)
        {
            return;
        }

        GameObject cleanerObj = SpawnController.instance.SpawnCleaner();
        Cleaner    cleaner    = cleanerObj.GetComponent <Cleaner>();

        if (!cleaner.AssignJob())
        {
            Destroy(cleanerObj);
        }
        else
        {
            cleaner.gameObject.SetActive(true);
            UIController.instance.AddNews(cleaner.name, " is going to clean up some of the floods.");
        }
    }