Exemple #1
0
    void Awake()
    {
        if (instance != null)
        {
            Debug.LogError("Can't instanciate twice a singleton");
        }

        instance = this;

        previousStayTime = -1;
    }
        /// <summary>
        /// Constructeur de l'Animorphe
        /// </summary>
        public Animorphe()
        {
            Tete teteChoisie = new Tete();
            Corps corpsChoisi = new Corps(teteChoisie);
            Pattes pattesChoisies = new Pattes(teteChoisie, corpsChoisi);

            this.Tete = teteChoisie.NomAnimal;
            this.SyllabeNomTete = teteChoisie.ParticuleNom;

            this.Corps = corpsChoisi.NomAnimal;
            this.SyllabeNomCorps = corpsChoisi.ParticuleNom;

            this.Pattes = pattesChoisies.NomAnimal;
            this.SyllabeNomPattes = pattesChoisies.ParticuleNom;

            this.Nom = this.SyllabeNomTete + this.SyllabeNomCorps + this.SyllabeNomPattes;
        }