コード例 #1
0
    IEnumerator firstSetOpen()
    {
        triggerDoorsLevelFive.TriggerVoiceOver(2);
        yield return(new WaitForSeconds(1.5f));

        doorGears.Play("doorOpenFirstSet");
        playedOnce = true;
        //Debug.Log("first");
    }
コード例 #2
0
    public void OnTriggerEnter()
    {
        float playerDistance = Vector3.Distance(gameObject.transform.position, player.transform.position);

        if (playerDistance < manualDistance)
        {
            if (levelNumber == 1)
            {
                managerLevelOne.TriggerVoiceOver(voiceOverType);
            }
            if (levelNumber == 5)
            {
                managerLevelFive.TriggerVoiceOver(voiceOverType);
            }

            Destroy(this);
        }
    }