private void Start() { switch (m_CurrentTeam) { case e_Team.TeamOne: m_TeamMembers = m_Controller.PlayerTeam(0); m_CurrentTeamID = 0; break; case e_Team.TeamTwo: m_TeamMembers = m_Controller.PlayerTeam(1); m_CurrentTeamID = 1; break; default: m_TeamMembers = m_Controller.PlayerTeam(0); break; } BindButtons(m_ReversedControlls); //Bind buttons for powerup usage. InputManager.Instance.BindButton("CombiDrive_PowerUpUsage_" + m_TeamMembers[0], m_TeamMembers[0], ControllerButtonCode.RightShoulder, ButtonState.Pressed); InputManager.Instance.BindButton("CombiDrive_PowerUpUsage_" + m_TeamMembers[1], m_TeamMembers[1], ControllerButtonCode.RightShoulder, ButtonState.Pressed); }
private void Start() { switch (m_CurrentTeam) { case e_Team.TeamOne: m_TeamMembers = m_Controller.PlayerTeam(0); break; case e_Team.TeamTwo: m_TeamMembers = m_Controller.PlayerTeam(1); break; default: m_TeamMembers = m_Controller.PlayerTeam(0); break; } BindButtons(false); }
void Start() { instance = GlobalGameManager.Instance; switch (m_CurrentTeam) { case e_Team.TeamOne: m_TeamMembers = m_Controller.PlayerTeam(0); break; case e_Team.TeamTwo: m_TeamMembers = m_Controller.PlayerTeam(1); break; default: m_TeamMembers = m_Controller.PlayerTeam(0); break; } //Set Colours player1 and number. m_Player1.GetComponent <Renderer>().material.SetColor("_EmissionColor", (Color)instance.GetPlayerColor(m_TeamMembers[0])); m_Player1.GetComponent <Renderer>().material.SetColor("_Color", (Color)instance.GetPlayerColor(m_TeamMembers[0])); m_FlagPlayer1.GetComponent <Renderer>().material.SetColor("_EmissionColor", (Color)instance.GetPlayerColor(m_TeamMembers[0])); m_FlagPlayer1.GetComponent <Renderer>().material.SetColor("_Color", (Color)instance.GetPlayerColor(m_TeamMembers[0])); m_NumberPlayer1.GetComponent <Text>().text = (1 + m_TeamMembers[0]).ToString(); //Set colours player2 and number. m_Player2.GetComponent <Renderer>().material.SetColor("_EmissionColor", (Color)instance.GetPlayerColor(m_TeamMembers[1])); m_Player2.GetComponent <Renderer>().material.SetColor("_Color", (Color)instance.GetPlayerColor(m_TeamMembers[1])); m_FlagPlayer2.GetComponent <Renderer>().material.SetColor("_EmissionColor", (Color)instance.GetPlayerColor(m_TeamMembers[1])); m_FlagPlayer2.GetComponent <Renderer>().material.SetColor("_Color", (Color)instance.GetPlayerColor(m_TeamMembers[1])); m_NumberPlayer2.GetComponent <Text>().text = (1 + m_TeamMembers[1]).ToString(); }