示例#1
0
        private void _populate()
        {
            FillObstaclesWithArray(GetFunPlayField());
            graph = GraphGenerator.FloodFill(world: this, startPosition: new Vector2D(50f, 50f));
            GraphGenerator.SetNearestItems(this);

            Lion l1 = new Lion(new Vector2D(60f, 60f), this);
            Lion l2 = new Lion(new Vector2D(120, 100f), this);

            Gazelle g1 = new Gazelle(new Vector2D(200f, 200f), this);
            Gazelle g2 = new Gazelle(new Vector2D(250f, 250f), this);
            Gazelle g3 = new Gazelle(new Vector2D(300f, 300f), this);

            Entities.AddRange(new List <MovingEntity>()
            {
                g1,
                l1,
                g2,
                g3,
                l2
            });
        }