// Start is called before the first frame update
 void Start()
 {
     CharacterScript1 = Character1.GetComponent <CharacterController1>();
     CharacterScript2 = Character2.GetComponent <CharacterController2>();
     CharacterScript3 = Character3.GetComponent <CharacterController3>();
     CharacterScript4 = Character4.GetComponent <CharacterController4>();
 }
    void Start()
    {
        // var Character = GameObject.Find("Character");
        // var Character2 = GameObject.Find("Character2");
        // var Character3 = GameObject.Find("Character3");
        // var Character4 = GameObject.Find("Character4");

        TouchingObjects  = new List <GameObject>();
        CharacterScript1 = Character1.GetComponent <CharacterController1>();
        CharacterScript2 = Character2.GetComponent <CharacterController2>();
        CharacterScript3 = Character3.GetComponent <CharacterController3>();
        CharacterScript4 = Character4.GetComponent <CharacterController4>();
        respawns         = GameObject.FindGameObjectsWithTag("RespawnPoint");
    }
Exemple #3
0
    void Start()
    {
        ColliderBalloon = Balloon.GetComponent <ColliderBalloon>();
        EndGame.GetComponent <Text>().enabled = false;
        CharacterScript1 = Character1.GetComponent <CharacterController1>();
        CharacterScript2 = Character2.GetComponent <CharacterController2>();
        CharacterScript3 = Character3.GetComponent <CharacterController3>();
        CharacterScript4 = Character4.GetComponent <CharacterController4>();

        CharacterScript1.movespeed = 0;
        CharacterScript2.movespeed = 0;
        CharacterScript3.movespeed = 0;
        CharacterScript4.movespeed = 0;
        CharacterScript1.canShoot  = false;
        CharacterScript2.canShoot  = false;
        CharacterScript3.canShoot  = false;
        CharacterScript4.canShoot  = false;



        if (MenuStart.J2Ready == true)
        {
            J2Score.gameObject.SetActive(true);
        }
        else
        {
            J2Score.gameObject.SetActive(false);
        }
        if (MenuStart.J3Ready == true)
        {
            J3Score.gameObject.SetActive(true);
        }
        else
        {
            J3Score.gameObject.SetActive(false);
        }
        if (MenuStart.J4Ready == true)
        {
            J4Score.gameObject.SetActive(true);
        }
        else
        {
            J4Score.gameObject.SetActive(false);
        }
    }