Пример #1
0
    void Start()
    {
        Cube_Rotations Rotations = GameObject.FindGameObjectWithTag("Player").GetComponent <Cube_Rotations> ();

        bool CanLarg = Rotations.Rotation_Largeur;
        bool CanHaut = Rotations.Rotation_Hauteur;
        bool CanLong = Rotations.Rotation_Longueur;

        if (CanLarg)
        {
            Largeur.color = Color.blue;
        }
        if (CanHaut)
        {
            Hauteur.color = Color.yellow;
        }
        if (CanLong)
        {
            Longueur.color = Color.red;
        }

        if (!CanLarg && !CanHaut && !CanLong)
        {
            this.gameObject.SetActive(false);
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     //Je dis où est ma source audio
     sonrotation = GetComponents <AudioSource> ();
     //Je dis où est le perso
     Perso = GameObject.FindGameObjectWithTag("Player").GetComponent <Cube_Rotations> ();
 }
Пример #3
0
 // Use this for initialization
 protected void Start()
 {
     //Je cache le curseur
     Cursor.visible = false;
     //Je récupère le gameobject du dieu
     God = GameObject.FindGameObjectWithTag("God");
     //J'initialise ma prochaine case
     nextcase = transform.position;
     //Je déclare d'où je récupère les infos et méthodes sur les kubs
     Kubinfos = GetComponent <Cube_Rotations> ();
     //Je récupère la hauteur du cube
     hauteur = Mathf.RoundToInt(GetComponent <Cube_Rotations> ().GetCubeSize().y);
 }