コード例 #1
0
    void RandomLaserActivation()
    {
        arenaEventManager.PlayRandomEventSound();

        int rngNumber = Random.Range(0, 3);

        if (DataManager.instance.isMulti)
        {
            rngNumber = rngNumberNet;
        }
        //Debug.Log(rngNumber);

        for (int i = 0; i <= rngNumber; i++)
        {
            int rngLaser = Random.Range(0, 6);
            if (DataManager.instance.isMulti)
            {
                rngLaser = rngLaserNet[i];
            }
            laser[rngLaser].isStarting = true;
        }
    }
コード例 #2
0
    void Update()
    {
        if (GameManager.instance.gameInitialized)
        {
            if (indexPlayer < DataManager.instance.currentNbrPlayer)
            {
                playerPos = DataManager.instance.player[indexPlayer].transform.position;
            }

            if (isStarting)
            {
                SoundManager.instance.PlaySound(65, 0.2f, AudioType.SFX);
                arenaEventManager.PlayRandomEventSound();
                StartCoroutine(StartLaser(beamGenerator.delay, beamGenerator.duration));
                //StartCoroutine(IncreaseLaser());
                isStarting = false;
            }

            //RaycastManager();
            PositionUpdate();
        }
    }