示例#1
0
        public Habitat(EntityRandom random)
        {
            bool putBug      = random.NextBool(0.01f);
            bool putPredator = random.NextBool(0.02f);

            bug      = new GridLogic(0, putBug ? 0.01f : 0);
            predator = new GridLogic(1, putPredator ? 0.01f : 0);
        }
示例#2
0
 public void Consume(GridLogic bug)
 {
     Consume(bug.animal.Size);
     bug.animal = null;
 }