Exemplo n.º 1
0
        /// <summary>
        /// Filtrer les fichiers SW
        /// </summary>
        /// <param name="TypeDesFichiersFiltres"></param>
        public void FiltreSW(TypeFichier_e TypeDesFichiersFiltres, Boolean FiltreDistinct = true)
        {
            String TxtFiltre;

            List <String> Filtre = new List <string>();

            if (FiltreDistinct)
            {
                foreach (TypeFichier_e T in Enum.GetValues(typeof(TypeFichier_e)))
                {
                    if (TypeDesFichiersFiltres.HasFlag(T))
                    {
                        Filtre.Add(CONSTANTES.InfoFichier(T, InfoFichier_e.cNom) + " (*" + CONSTANTES.InfoFichier(T) + "|*" + CONSTANTES.InfoFichier(T));
                    }
                }

                TxtFiltre = String.Join("|", Filtre);
            }
            else
            {
                foreach (TypeFichier_e T in Enum.GetValues(typeof(TypeFichier_e)))
                {
                    if (TypeDesFichiersFiltres.HasFlag(T))
                    {
                        Filtre.Add("*" + CONSTANTES.InfoFichier(T));
                    }
                }

                TxtFiltre = "Fichier SolidWorks (" + String.Join(", ", Filtre) + ")" + "|" + String.Join("; ", Filtre);
            }

            _Dialogue.Filter = TxtFiltre;
        }
Exemplo n.º 2
0
    void Start()
    {
        Genes = new float[] { (float)maxLife, height, speed, viewRange, beauty, (float)gestationDelay };
        //Récupération des constantes de jeu
        constante  = GameObject.Find("CONSTANTES");
        constantes = constante.GetComponent <CONSTANTES>();

        //Préparation des données locales
        Vector3 scale = new Vector3(height, height, height);

        transform.localScale = scale;
        rb.mass   = height * height * height;
        sinceTick = (int)(Random.Range(0, constantes.tickSpeed));
    }
Exemplo n.º 3
0
 void Start()
 {
     constante  = GameObject.Find("CONSTANTES");
     constantes = constante.GetComponent <CONSTANTES>();
     foodAmount = constantes.foodAmountUnit;
 }