Exemplo n.º 1
0
    public GameObject spawnFlower(float x, float y, float z)
    {
        string objFleur = _espece.ToString() + _couleur.ToString();

        objToSpawn = Instantiate(Resources.Load(objFleur)) as GameObject;
        objToSpawn.transform.position = new Vector3(x, y, z);
        SetSize();
        Renderer rend = objToSpawn.GetComponent <Renderer>();

        if (string.Compare(_const, "none") != 0)
        {
            objToSpawn.GetComponent <TextMesh>().text = _const;
        }
        else
        {
            objToSpawn.GetComponent <TextMesh>().text = "";
        }
        return(objToSpawn);
    }
Exemplo n.º 2
0
 override public string ToString()
 {
     if (nom == null || couleur == null)
     {
         return("nom couleur");
     }
     else
     {
         return(nom.ToString() + " de " + couleur.ToString());
     }
 }
Exemplo n.º 3
0
        public override string ToString()
        {
            string stringReturn = "";

            foreach (Coordonnees s in Coordonnees)
            {
                stringReturn = stringReturn + " " + s.ToString();
            }

            return(base.ToString() + " Couleur: " + Couleur.ToString() + " Epaisseur: " + Epaisseur + " Coordonees: " + stringReturn);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Méthode Update_PacGoms
        /// pendant 10 secondes.
        /// Emploi la méthode Is_PacMan_Invincible qui renvoi un booléan si PACMAN est invincible
        /// </summary>
        /// <param name="gametime"></param>
        /// <param name="_PAC_POS_INIT"></param>
        /// <param name="level_table2D"></param>
        public void UpdateSuperGoms(int x, int y, Vector2 _PAC_POS, Node[,] _level_table2D)
        {
            //Animation des SuperGom
            Anime_SuperGom(_Color.ToString());

            //Test si la SuperGom est mangée
            _level_table2D[x, y].IsEaten = Test_SuperGom_Eaten(x, y, _PAC_POS, _level_table2D);

            //Test si PacMan est invincible
            Count_Invincible(x, y, _level_table2D);
        }
Exemplo n.º 5
0
        public string[] ToArrayString(bool hideInformation = true)
        {
            string[] data = new string[4];

            data[0] = nom;
            data[1] = couleur.ToString();
            data[2] = value.ToString();
            data[3] = cible.ToString();
            //data[4] = desc;

            return(data);
        }
Exemplo n.º 6
0
        /* ********************************** FIN TEST ROBOT 1 ****************************** */

        /// <summary>
        /// Fin de la liste des composants
        /// </summary>

        public Robot(composants.IHM.Parametrization parametrization, composants.IHM.C_IHM IHM)
        {
            this.IHM = IHM;

            Debug.Print("Querying type...");
            this.typeRobot = parametrization.GetTypeRobot();
            Debug.Print("Got type : " + typeRobot.ToString());

            Debug.Print("Querying mode operatoire...");
            this.modeOperatoire = parametrization.GetModeOperatoire();
            Debug.Print("Got mode : " + modeOperatoire.ToString());

            Debug.Print("Querying couleur...");
            this.couleurEquipe = parametrization.GetCouleurEquipe();
            Debug.Print("Got couleur : " + Couleur.ToString());
            //ecranTactile = new DisplayTE35(14, 13, 12, 10); // L'écran tactile est présent sur chaque robot

            parametrization.startMethod += this.Start;

            robot = this;

            loadComponents();

            new Thread(() =>
            {
                while (true)
                {
                    Thread.Sleep(this.BASE_ROULANTE.REFRESH_RATE_KANGAROO);
                    this.BASE_ROULANTE.kangaroo.CheckMovingStatus();
                }
            }).Start();

            /*
             * if (this.TypeRobot == TypeRobot.PETIT_ROBOT)
             * {
             *  new Thread(() =>
             *  {
             *      while (true)
             *      {
             *          //Thread.Sleep(PR_ULTRASON.REFRESH_RATE);
             *          PR_ULTRASON.detectObstacle(null);
             *      }
             *  }).Start();
             * }*/


            /*Debug.Print("Starting ROBOT !!!");
             * parametrization.startMethod();*/
        }
Exemplo n.º 7
0
    public void ModifierTextes(Couleur couleur, TypeTerrain type, Int16 nbMaisons)
    {
        m_infoJoueur.DisplayedString = "Joueur " + couleur.ToString();
        m_infoJoueur.Color           = RecupererCouleur(couleur);

        m_infoTerrain.DisplayedString = "Terrain " + type.ToString();
        m_infoTerrain.Color           = RecupererCouleur(couleur);

        m_infoMaison.DisplayedString = "Maison x" + nbMaisons.ToString();
        m_infoMaison.Color           = RecupererCouleur(couleur);

        if (couleur == Couleur.NOIR)
        {
            m_boite.FillColor = new Color(0, 0, 0, 0);
        }
        else
        {
            m_boite.FillColor = new Color(0, 0, 0, 200);
        }
    }
Exemplo n.º 8
0
 public override string ToString()
 {
     return(valeur.ToString() + couleur.ToString());
 }
 //Choisi aleatoirement une couleur cible et l affiche
 private void SetCibleAleatoire()
 {
     couleurCible  = GenereCouleurAlea();
     hudTexte.text = "Objectif : \n Ramener une fiole " + couleurCible.ToString();
 }
 private void SetCible(Couleur couleur)
 {
     couleurCible  = couleur;
     hudTexte.text = "Objectif : \n Ramener une fiole " + couleurCible.ToString();
 }