コード例 #1
0
    //phase 1 setup - called on start
    void PhaseOneSetup()
    {
        FreezePlayerInput.freezePlayerInput = false;
        AudioManager.Instance.PhaseOne();

        m_dragon.SetActive(false);
        m_gatesOpening.SetActive(false);
        m_isInPhaseOne = true;
        foreach (PlayerData player in m_players)
        {
            //Accesses the Valkyrie/Viking switch in all players and does the switch to viking
            var mySwitchScript = player.gameObject.GetComponent <VikingValkyrieSwitch>();
            if (mySwitchScript != null && mySwitchScript.m_startViking == true)
            {
                mySwitchScript.SwitchToViking();
            }
        }
        //respawns the bouncing ball in phase 1 if we want
        if (!m_bouncingBall.m_isAlive)
        {
            m_bouncingBall.Respawn();
            Debug.Log("Bouncing ball respawn triggered");
        }
    }