コード例 #1
0
    void CreateParticule()
    {
        for (int i = 0; i < 360 / _particleByAngle; ++i)
        {
            GameObject lightParticule = Instantiate(_lightParticule);

            SetParticule(lightParticule, _particleByAngle + _particleByAngle * i + _offsetDegre);
        }

        if (tag == "Player")
        {
            SoundManagerEvent.Emit(7);
        }
        else
        {
            SoundManagerEvent.Emit(8);
        }
    }
コード例 #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player" || other.gameObject.tag == "Player2")
        {
            ParticleEmit p2 = other.gameObject.GetComponent <ParticleEmit>();
            _currontColor = p2.GetColor() + _colorBase;
            _fusion       = true;

            if (tag == "Player")
            {
                SoundManagerEvent.Emit(9);
            }

            if (gaMana.CurrentState == GameManager.GameStates.MainMenu)
            {
                gaMana.ShowCredit(true);
            }
        }
    }
コード例 #3
0
    void CheckGameState()
    {
        if (currentLevelNumber == 0)
        {
            currentState = GameStates.Intro;
        }
        else if (currentLevelNumber == 1)
        {
            currentState = GameStates.MainMenu;
        }
        else if (currentLevelNumber == 5)
        {
            currentState = GameStates.EndGame;
        }
        else
        {
            currentState = GameStates.InGame;
        }

        SoundManagerEvent.Emit(currentLevelNumber);
    }
コード例 #4
0
    // Update is called once per frame

    void Update()
    {
        if (gaMana.CurrentState != GameManager.GameStates.Pause || _activeInPause)
        {
            InputDetection();
            m_MovementAxis         = new Vector3(m_XInput, -m_YInput, 0.0f);
            m_ParticleMovementAxis = new Vector3(m_RXInput, -m_RYInput, 0.0f);

            _time += Time.deltaTime;
            if (_time >= _impulseByTime && m_PlayerId == 1)
            {
                float dist = Vector2.Distance(transform.position, _otherPlayer.transform.position);

                SoundManagerEvent.Instance.Volume(0, 1 - dist / 14);
                SoundManagerEvent.Emit(6);
                _time = 0f;
            }
        }
        else
        {
            m_MovementAxis         = new Vector3(0f, 0f, 0.0f);
            m_ParticleMovementAxis = new Vector3(0, 0, 0.0f);
        }
    }