public override void Init(Coord coord) { base.Init(coord); moveFromCoord = coord; genes = Genes.RandomGenes(1); material.color = (genes.isMale) ? maleColour : femaleColour; switch (Specimen) { case Specimen.Undefined: mySleepBehaviour = SleepBehaviour.None; break; case Specimen.Plant: mySleepBehaviour = SleepBehaviour.None; break; case Specimen.Rabbit: mySleepBehaviour = SleepBehaviour.Crepuscular; break; case Specimen.Fox: mySleepBehaviour = SleepBehaviour.Nocturnal; break; default: Debug.LogWarning("Specimen is undefined"); break; } ChooseNextAction(); }
public override void Init(Coord coord) { base.Init(coord); moveFromCoord = coord; genes = Genes.RandomGenes(1); material.color = (genes.isMale) ? maleColour : femaleColour; ChooseNextAction(); }
public override void Init(Coord coord, Age age) { if (genes == null) { Genes genes = Genes.RandomGenes(); setGenes(genes); } base.Init(coord, age); moveFromCoord = coord; ChooseNextAction(); }
public override void Init(Coord coord) { base.Init(coord); moveFromCoord = coord; genes = Genes.RandomGenes(1); mate = null; size = (float)Environment.getRandomDouble() * 0.3f + 0.3f; hunger = (float)Environment.getRandomDouble() * 0.3f + 0.3f; thirst = (float)Environment.getRandomDouble() * 0.2f + 0.2f; reproductionWill = 0f; baseScale = transform.localScale; Male = genes.isMale; ChooseNextAction(); }
public override void Init(Coord coord) { base.Init(coord); moveFromCoord = coord; genes = Genes.RandomGenes(Enum.GetNames(typeof(GeneNames)).Length); moveSpeed += 0.1f * genes.values[(int)GeneNames.Speed]; hungerTimeFactor *= genes.values[(int)GeneNames.Hunger]; thirstTimeFactor *= genes.values[(int)GeneNames.Thirst]; staminaTimeFactor *= genes.values[(int)GeneNames.Stamina]; desireTimeFactor *= genes.values[(int)GeneNames.Desire]; lifespanTimeFactor *= genes.values[(int)GeneNames.Lifespan]; material.color = (genes.isMale) ? maleColour : femaleColour; canReproduce = true; ChooseNextAction(); }