Example #1
0
    void Start()
    {
        instance = this;
        StartCoroutine(SpawnBonusLoop());

        playerLogos[0].material.mainTexture = TeamSelector.GetSelection(0).GetLogo();
        playerLogos[1].material.mainTexture = TeamSelector.GetSelection(1).GetLogo();
    }
Example #2
0
 private void UpdateLogos()
 {
     teamLogosUI[0].texture = TeamSelector.GetSelection(0).GetLogo();
     teamLogosUI[1].texture = TeamSelector.GetSelection(1).GetLogo();
     playerLogos[0].material.mainTexture = TeamSelector.GetSelection(0).GetLogo();
     playerLogos[1].material.mainTexture = TeamSelector.GetSelection(1).GetLogo();
     teamNames[0].text = TeamSelector.GetSelection(0).GetName();
     teamNames[1].text = TeamSelector.GetSelection(1).GetName();
 }
Example #3
0
    private void endGame()
    {
        gameEnd = true;
        int      winningTeam = Bscore >= goalsToWin ? 0 : 1;
        TextMesh winText     = GameObject.Find("Win Text").GetComponent <TextMesh>();

        winText.GetComponent <MeshRenderer>().enabled = true;
        winText.text = "C'est\n" + TeamSelector.GetSelection(winningTeam).GetName() + "\nle plu for";
    }
Example #4
0
    // Start is called before the first frame update
    void Start()
    {
        int idPlayer = Random.Range(0, 2);

        transform.GetChild(0).Find("Logo").GetComponent <MeshRenderer>().material.mainTexture = TeamSelector.GetSelection(idPlayer).GetLogo();
        transform.GetChild(0).Find("Spectator").GetComponent <MeshRenderer>().material        = colors[idPlayer];
    }
Example #5
0
    private void Start()
    {
        body       = GetComponent <Rigidbody>();
        startPos   = transform.position;
        startAngle = transform.eulerAngles.y;

        horizontalAxis = "Horizontal" + playerID;
        verticalAxis   = "Vertical" + playerID;
        dashButton     = "Dash" + playerID;

        transform.GetChild(0).Find("Logo").GetComponent <MeshRenderer>().material.mainTexture = TeamSelector.GetSelection(playerID - 1).GetLogo();
    }