예제 #1
0
    void OnTriggerEnter(Collider other)
    {
        if (State != E_State.E_WAITING_FOR_START || other != Player.Instance.Agent.CharacterController)
        {
            return;
        }

        MyGameZone.SetInProgress();

        MyGameZone.EnableAllActiveInteraction(false);

        if (SpawnRounds != null && SpawnRounds.Length > 0)
        {
            StartCoroutine(SpawnEnemiesInRounds());
        }
        else
        {
            StartCoroutine(SpawnEnemies());
        }

        if (LockIn != null)
        {
            LockIn.Lock();
        }
        if (LockOut != null)
        {
            LockOut.Lock();
        }

        if (SoundDataManager.Instance.IsSwitchingMusic())
        {
            Mission.Instance.SetNewMusic(SoundDataManager.Instance.ActionMusic, SoundDataManager.Instance.ActionMusicVolume, SoundDataManager.Instance.ActionMusicFadeOutTime, SoundDataManager.Instance.ActionMusicFadeInTime);
        }
    }
예제 #2
0
    void OnTriggerEnter(Collider other)
    {
        if (State != E_State.WaitStart || other.CompareTag("Player") == false)
        {
            return;
        }

        MyGameZone.SetInProgress();

        MyGameZone.EnableAllActiveInteraction(false);

        if (SpawnRounds != null && SpawnRounds.Length > 0)
        {
            //开始范围出怪
            StartCoroutine(SpawnEnemysInRounds());
        }
        else
        {
            //没有出怪配置,直接在出怪点进行刷怪
            StartCoroutine(SpawnEnemys());
        }

        if (LockIn != null)
        {
            LockIn.Lock();
        }
        if (LockOut != null)
        {
            LockOut.Lock();
        }

//		BoxCollider box = GetComponent<BoxCollider> ();
//		box.enabled = false;
    }