Esempio n. 1
0
 public void Impregnate(GenesData fatherGenesData)
 {
     //SALE EL LOGO DE FOLLANDO///
     ////////////////////////////
     pregnancy = gameObject.AddComponent <Pregnant>();
     pregnancy.StartPregnancy(fatherGenesData);
 }
    public Conditions(Creature own)
    {
        Own  = own;
        list = new List <ACondition>();
        Age age = new Age(Own);

        list.Add(age);
        Energy energy = new Energy(Own);

        list.Add(energy);
        Hunger hunger = new Hunger(Own);

        list.Add(hunger);
        Health health = new Health(Own);

        list.Add(health);
        Pregnant pregnant = new Pregnant(Own);

        list.Add(pregnant);
        //bars
        RectTransform[] arr = Own.GetComponentsInChildren <RectTransform>();
        foreach (var item in arr)
        {
            switch (item.name)
            {
            case "Health":
                health.Bar = item;
                break;

            case "Energy":
                energy.Bar = item;
                break;

            case "Hunger":
                hunger.Bar = item;
                break;

            case "Age":
                age.Bar = item;
                break;

            case "Pregnant":
                pregnant.Bar = item;
                break;
            }
        }
    }
Esempio n. 3
0
        public JsonResult SaveRisk(
                int Id,
                Vaccin? Vaccin,
                bool? HDisease,
                bool? Diabetes,
                bool? Neuro,
                bool? Asthma,
                bool? Pulmonary,
                bool? Liver,
                bool? Renal,
                bool? Immunsupp,
                bool? ParaCerebral, 
                bool? Indigena, 
                bool? TrabSalud, 
                bool? Desnutricion, 
                bool? Prematuridad,
                bool? BajoPesoNacer,
                bool? AusLacMat,
                Pregnant? Pregnant,
                bool? Pperium,
                Trimester? Trimester,
                int? PregnantWeek,
                bool? Smoking,
                bool? Alcohol,
                bool? DownSyn,
                Obesity? Obesity,
                string OtherRisk,
                int? VacInfluenza,
                DateTime? VacInfluenzaDateFirst,
                DateTime? VacInfluenzaDateSecond,
                int? VacBcg,
                DateTime? VacBcgDate,
                int? VacBcgDosis,
                int? VacNeumococo,
                DateTime? VacNeumococoDate,
                int? VacNeumococoDosis,
                int? VacTosFerina,
                DateTime? VacTosFerinaDate,
                int? VacTosFerinaDosis,
                int? VacHaemophilus,
                DateTime? VacHaemophilusDate,
                int? VaccinFuente,
                int? AntiViral,
                DateTime? AntiViralDate,
                DateTime? AntiViralDateEnd,
                int? AntiViralType,
                int? OseltaDose,
                string AntiViralDose,
                int? RiskFactors
            )
        {
            FluCase flucase;

            flucase = db.FluCases.Find(Id);
            if (flucase == null)
            {
                flucase = new FluCase();
                db.Entry(flucase).State = EntityState.Added;
            }
            else
            {
                db.Entry(flucase).State = EntityState.Modified;
            }
            flucase.Vaccin = Vaccin;
            flucase.HDisease = HDisease;
            flucase.Diabetes = Diabetes;
            flucase.Neuro = Neuro;
            flucase.Asthma = Asthma;
            flucase.Pulmonary = Pulmonary;
            flucase.Liver = Liver;
            flucase.Renal = Renal;
            flucase.Immunsupp = Immunsupp;

            flucase.ParaCerebral = ParaCerebral;
            flucase.Indigena = Indigena;
            flucase.TrabSalud = TrabSalud;
            flucase.Desnutricion = Desnutricion;
            flucase.Prematuridad = Prematuridad;
            flucase.BajoPesoNacer = BajoPesoNacer;
            flucase.AusLacMat = AusLacMat;

            flucase.Pregnant = Pregnant;
            flucase.Pperium = Pperium;
            flucase.Trimester = Trimester;
            flucase.PregnantWeek = PregnantWeek;
            flucase.Smoking = Smoking;
            flucase.Alcohol = Alcohol;
            flucase.DownSyn = DownSyn;
            flucase.Obesity = Obesity;
            flucase.OtherRisk = OtherRisk;
            flucase.InsertDate = DateTime.Now;
            //flucase.UserID = User.Identity.Name;

            //flucase.VacInfluenza = (VacInfluenza.ToString() == null) ? VacInfluenza : (VaccineOptions)Enum.Parse(typeof(VaccineOptions), VacInfluenza.ToString());
            flucase.VacInfluenza = VacInfluenza;
            flucase.VacInfluenzaDateFirst = VacInfluenzaDateFirst;
            flucase.VacInfluenzaDateSecond = VacInfluenzaDateSecond;
            if (VacBcg != null) flucase.VacBcg = (VaccineOptions)Enum.Parse(typeof(VaccineOptions), VacBcg.ToString());
            flucase.VacBcgDate = VacBcgDate;
            flucase.VacBcgDosis = VacBcgDosis;
            if (VacNeumococo != null) flucase.VacNeumococo = (VaccineOptions)Enum.Parse(typeof(VaccineOptions), VacNeumococo.ToString());
            flucase.VacNeumococoDate = VacNeumococoDate;
            flucase.VacNeumococoDosis = VacNeumococoDosis;
            if (VacTosFerina != null) flucase.VacTosFerina = (VaccineOptions)Enum.Parse(typeof(VaccineOptions), VacTosFerina.ToString());
            flucase.VacTosFerinaDate = VacTosFerinaDate;
            flucase.VacTosFerinaDosis = VacTosFerinaDosis;
            if (VacHaemophilus != null) flucase.VacHaemophilus = (VaccineOptions)Enum.Parse(typeof(VaccineOptions), VacHaemophilus.ToString());
            flucase.VacHaemophilusDate = VacHaemophilusDate;
            flucase.VaccinFuente = VaccinFuente;
            if (AntiViral != null)  flucase.AntiViral = (VaccineOptions)Enum.Parse(typeof(VaccineOptions), AntiViral.ToString());
            flucase.AntiViralDate = AntiViralDate;
            flucase.AntiViralDateEnd = AntiViralDateEnd;
            flucase.AntiViralType = AntiViralType;
            flucase.OseltaDose = OseltaDose;
            flucase.AntiViralDose = AntiViralDose;
            if (AntiViral != null)  flucase.RiskFactors = (RiskFactor)Enum.Parse(typeof(RiskFactor), RiskFactors.ToString());

            db.SaveChanges();

            return Json("Success");
        }