예제 #1
0
    /* Player picks up the key */
    private void OnTriggerEnter(Collider coll)
    {
        //coll = GetComponent<Collider> ();

        if (coll.gameObject == player)
        {
            playClip = true;

            if (clock == null && GetComponent <Timer> () != null)
            {
                clock = GetComponent <Timer> ();
            }

            currentLevel = SceneManager.GetActiveScene().name;
            //attempts = handler.getAttempts ();
            timeToComplete = (int)clock.getTotalSeconds();

            string path = currentLevel + ".Attempts.KeysCollected.Time";

            UpdateProgress.ProgressUpdate(path, attempts, timeToComplete);
            GetPlayerData.GetData(attempts, timeToComplete, 1);

            // DoBeep();
            diamond.SetActive(false);
            print("Key has been picked up 1");
            level2.displayPopUp();
        }
    }
    /* Player picks up the key */
    private void OnTriggerEnter(Collider coll)
    {
        //coll = GetComponent<Collider> ();

        if (coll.gameObject == player)
        {
            DoBeep();
            diamond.SetActive(false);
            print("Key has been picked up 1");
            level2.displayPopUp();
        }
    }