Esempio n. 1
0
    private void Awake()
    {
        if (CV == null)
        {
            CV = this;
        }
        else if (CV != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject); // Persist between levels
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("START");
        isGameOver      = false;
        CV              = GameObject.FindGameObjectWithTag("UI").GetComponent <StartCanvasBehavior>();
        HUD             = GameObject.FindGameObjectWithTag("UI_HUD").GetComponent <HUDCanvasBehavior>();
        staffIsUnlocked = false;
        guestIsUnlocked = false;

        initUI();

        // Init player progress through levels
        curHostLevel  = 1;
        curStaffLevel = 1;
        curGuestLevel = 1;
    }