Esempio n. 1
0
 public void StartQuestionnaire(Caracteristics caracteristics)
 {
     foreach (GameObject planet in planets)
     {
         planet.SetActive(false);
     }
     PlanetName.text = caracteristics.GetPlanet();
     PlanetIndex     = caracteristics.GetIndex();
     planets[PlanetIndex - 1].SetActive(true);
     this.planetCaracteristics = caracteristics;
     StartQuestion(caracteristics.GetNextQuestion());
 }
Esempio n. 2
0
        public Trip Load(VOYAGE data)
        {
            Id          = data.ID;
            Driver      = new User().Load(data.ID_UTILISATEUR_CONDUCTEUR);
            Car         = new Car().Load(data.ID_VEHICULE);
            TypeBagage  = TypeBagage.GetEnum <TypeBagage>(data.ID_VEHICULE);
            NbPassagers = data.NOMBRE_DE_PASSAGER;
            IsValid     = data.EST_VALIDE;
            IsFinish    = data.EST_TERMINE;
            DefaultCost = data.COUT_AU_KM;
            RoundTrip   = data.RETOUR_PRIS_EN_CHARGE;
            Duration    = data.TEMPS_PREVU;
            DateStart   = data.HEURE_DEPART;
            Recurrence  = data.RECURENCE ?? false;
            Comment     = data.COMMENTAIRE;

            var dataSteps = Container.Manager.EtapeOperation.GetByTrip(Id);

            foreach (var item in dataSteps)
            {
                Steps.Add(new Step().Load(item));
            }

            var dataCara = Container.Manager.VoyageCaracteristiqueOperation.GetByTrip(Id);

            foreach (var item in dataCara)
            {
                Caracteristics.Add(new Caracteristic().Load(item));
            }

            var dataPass = Container.Manager.VoyagePassagerOperation.GetByTrip(Id);

            foreach (var item in dataPass)
            {
                Passagers.Add(new Passager().Load(item));
            }

            return(this);
        }
 public void LeavePlanet()
 {
     visitedPlanet = null;
 }
 public void SetPlanet(Caracteristics planet)
 {
     visitedPlanet = planet;
 }