Exemplo n.º 1
0
Arquivo: Main.cs Projeto: 7Kronos/Rush
 public void AddBee(Vector2 position)
 {
     Bee bee1 = new Bee()
     {
         CurrentHive = null,
         Destination = null,
         Position = position
     };
     bee1.SpriteTexture = _universe.Map.GetTexture(MapBase.__beeTexture);
     Things.Add(bee1);
     circletest.Add(bee1);
 }
Exemplo n.º 2
0
Arquivo: Hive.cs Projeto: 7Kronos/Rush
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (gameTime.TotalGameTime >= nextBeeProduction)
            {
                var newBee = new Bee() {
                    CurrentHive = this,
                    Position = GetRandomPosition(),
                    SpriteTexture = _parentMap.GetTexture(MapBase.__beeTexture)
                };

                Main.Things.Add(newBee);

                nextBeeProduction = gameTime.TotalGameTime + new TimeSpan(0, 0, 0, 0, 100);
            }
        }
Exemplo n.º 3
0
Arquivo: Main.cs Projeto: 7Kronos/Rush
        private void InitCircleTest()
        {
            circletest = new ConcurrentBag<Bee>();
            Point Centralpoint = new Point(0, 0);

            float radius = 5;
            AddBee(Centralpoint, radius, 360 / 6 * 0);

            Bee bee1 = new Bee()
            {
                CurrentHive = null,
                Destination = null,
                Position = new Vector2(0, 0)
            };
            bee1.SpriteTexture = _universe.Map.GetTexture(MapBase.__beeTexture);
            Things.Add(bee1);
            circletest.Add(bee1);
        }
Exemplo n.º 4
0
Arquivo: Main.cs Projeto: 7Kronos/Rush
 private void AddBee(Point Centralpoint, float radius, float angle)
 {
     Bee bee1 = new Bee()
     {
         CurrentHive = null,
         Destination = null,
         Position = new Vector2(20, -20)
     };
     bee1.SpriteTexture = _universe.Map.GetTexture(MapBase.__beeTexture);
     Things.Add(bee1);
     circletest.Add(bee1);
 }