예제 #1
0
        private void spawnHen(HenInfo info)
        {
            //TODO fix the bug where hens occasionally spawn inside each other and this causes them to be launched upwards
            Vector3 position = this.transform.position
                               + new Vector3(Random.Range(-2f, 2f), 0, Random.Range(-2f, 2f));
            Hen hen = Instantiate(henPrefab, position, Quaternion.identity);



            if (System.Enum.IsDefined(typeof(HenBreed), info.breedNumber))
            {
                hen.breed = (HenBreed)info.breedNumber;
            }



            hen.henName        = info.name;
            hen.love           = new Stat(hen, info.loveStat, loveIncreaseIcon);
            hen.size           = new Stat(hen, info.sizeStat, sizeIncreaseIcon);
            hen.fitness        = new Stat(hen, info.fitnessStat, fitnessIncreaseIcon);
            hen.featherQuality = new Stat(hen, info.feathersStat, featherQualityIncreaseIcon);
        }
예제 #2
0
 public Stat(Hen hen, float value, GameObject increaseIcon)
 {
     this.hen          = hen;
     this.value        = value;
     this.increaseIcon = increaseIcon;
 }
예제 #3
0
 public HenStateInput(Hen hen)
 {
     this.hen = hen;
 }