Exemplo n.º 1
0
 public Allele(Species species, Speed speed, LifeSpan lifeSpan, Fertility fertility)
 {
     this.species   = species;
     this.speed     = speed;
     this.lifeSpan  = lifeSpan;
     this.fertility = fertility;
 }
Exemplo n.º 2
0
    void CreateArea(Coordinate coord, Fertility fertility)
    {
        AreaSciprt area = Instantiate(areaPref,
                                      new Vector3(coord.y * (width + margin), coord.x * (height + margin)),
                                      Quaternion.identity, this.transform);

        area.Fertility = fertility;
    }
Exemplo n.º 3
0
 public Area(int fertility)
 {
     if (Enum.IsDefined(typeof(Fertility), fertility))
     {
         this.fertility = (Fertility)fertility;
     }
     else if (fertility < 0)
     {
         this.fertility = Fertility.Hollow;
     }
     else
     {
         throw new ArgumentOutOfRangeException("No such fertility level(-1..3).");
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Get the significant details of what needs approval
        /// </summary>
        /// <returns>A list of strings</returns>
        public override IDictionary<string, string> SignificantDetails()
        {
            IDictionary<string, string> returnList = base.SignificantDetails();

            returnList.Add("Solubility", Solubility.ToString());
            returnList.Add("Fertility", Fertility.ToString());
            returnList.Add("Rock", Rock.Name);
            returnList.Add("Dirt", Dirt.ToString());

            foreach(IMineral ore in Ores)
            {
                returnList.Add("Ore", ore.Name);
            }

            return returnList;
        }
Exemplo n.º 5
0
 private void AddAllele(Species species, Speed speed, LifeSpan lifeSpan, Fertility fertility)
 {
     KeyValues.Add((Species.ValueType)species.value, new Allele(species, speed, lifeSpan, fertility));
 }
Exemplo n.º 6
0
 public Area(Fertility fertility)
 {
     this.fertility = fertility;
 }
Exemplo n.º 7
0
 public void SetFertility(float distanceToCenter, float val)
 {
     fertility = new Fertility(distanceToCenter, val);
 }
Exemplo n.º 8
0
        public override string ToString()
        {
            string str = "";

            if (IDUser != -1)
            {
                str += "&iduser=\"" + IDUser.ToString() + "\"";
            }
            if (!AccessToken.Equals(""))
            {
                str += "&accesstoken=\"" + Uri.EscapeDataString(AccessToken) + "\"";
            }
            if (FacebookID != -1)
            {
                str += "&iduser=\"" + FacebookID.ToString() + "\"";
            }
            if (!FirstName.Equals(""))
            {
                str += "&firstname=\"" + Uri.EscapeDataString(FirstName) + "\"";
            }
            if (!LastName.Equals(""))
            {
                str += "&lastname=\"" + Uri.EscapeDataString(LastName) + "\"";
            }
            if (Gender != -1)
            {
                str += "&gender=\"" + Gender.ToString() + "\"";
            }
            if (!Email.Equals(""))
            {
                str += "&email=\"" + Uri.EscapeDataString(Email) + "\"";
            }
            if (!Password.Equals(""))
            {
                str += "&password=\"" + Password + "\"";
            }
            if (!Location.Equals(""))
            {
                str += "&location=\"" + Location + "\"";
            }
            if (Height != -1)
            {
                str += "&height=\"" + Height.ToString() + "\"";
            }
            if (HeightType != -1)
            {
                str += "&heighttype=\"" + HeightType.ToString() + "\"";
            }
            if (Skeleton != 0)
            {
                str += "&skeleton=\"" + Skeleton.ToString() + "\"";
            }
            if (fertility != -1)
            {
                str += "&fertility=\"" + Fertility.ToString() + "\"";
            }
            if (Birthdate != null)
            {
                str += "&birthdate=\"" + Birthdate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }
            if (RemindDate != null)
            {
                str += "&reminddate=\"" + RemindDate.Value.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }
            if (InsertDate != DateTime.MinValue)
            {
                str += "&insertdate=\"" + InsertDate.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }
            if (UpdateDate != DateTime.MinValue)
            {
                str += "&updatedate=\"" + UpdateDate.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }
            if (AdjustDiet != -1)
            {
                str += "&adjustdiet=\"" + AdjustDiet.ToString() + "\"";
            }
            return(str.Substring(1));
        }