예제 #1
0
파일: Lion.cs 프로젝트: jbfp/SavannahGame
        public override void Visit(Lion lion)
        {
            if (lion.Gender == Gender)
            {
                return;
            }

            for (int i = 0; i < 2; i++)
            {
                var gender = (Gender) Random.Next(0, 2);
                var cub = new Lion(this.spawner, gender);
                this.spawner.Spawn(cub);
            }

            base.Visit(lion);
        }
예제 #2
0
        public override void Visit(Lion lion)
        {
            if (lion.Gender == Gender)
            {
                return;
            }

            for (int i = 0; i < 2; i++)
            {
                var gender = (Gender)Random.Next(0, 2);
                var cub    = new Lion(this.spawner, gender);
                this.spawner.Spawn(cub);
            }

            base.Visit(lion);
        }