示例#1
0
 public FpsCounter(Main game, Vector2 position)
     : base(game)
 {
     this.game = game;
     this.position = position;
     game.Components.Add(this);
 }
示例#2
0
 public Pheromone(Main game, bool active)
     : base(game, active)
 {
     // make sure it loads and draws
     DrawOrder = 49;
     UpdateOrder = 50;
 }
示例#3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Main game = new Main())
     {
         game.Run();
     }
 }
示例#4
0
        public MouseEventsManager(Main game)
            : base(game)
        {
            this.game = game;
            game.Components.Add(this);

            this.DrawOrder = 100;
        }
示例#5
0
文件: Ant.cs 项目: loophac/a-i-nts
 public Ant(Main game, bool active)
     : base(game, active)
 {
     hungry = 0;
     life = ConstantsHolder.Singleton.LifeMax;
     pheromonesTick = 0;
     Origin = new Vector2(8, 7);
     choicePheromones = new Aints.Behaviours.AntBehaviourFollowPheromone(game, this, false);
     // make sure it loads and draws
     DrawOrder = 50;
     UpdateOrder = 50;
 }
示例#6
0
        public AntHill(Main game, Vector2 position)
            : base(game,true)
        {
            this.scale = 2f;

            food = 2000;
            prevFood = food;
            this.game = game;
            this.Position = position;

            this.logFile = @".\log" + DateTime.Now.Ticks + ".txt";
            tw = new StreamWriter(this.logFile);
        }
示例#7
0
        public GameObject(Main game, bool active)
            : base(game)
        {
            this.game = game;
            if (active)
            {
                game.Components.Add(this);
            }
            SetupBehaviours();
            maxSpeed = 100f;

            this.Enabled = active;
            this.Visible = active;
        }
示例#8
0
文件: Pools.cs 项目: loophac/a-i-nts
        public Pools(Main game)
        {
            this.game = game;
            this.PoolPheromones = new List<Pheromone>(POOL_SIZE_PHEROMONES);
            this.PoolAnts = new List<Ant>(POOL_SIZE_ANTS);

            for (int i = 0; i < POOL_SIZE_PHEROMONES; i++)
            {
                PoolPheromones.Add(new Pheromone(game, false));
            }
            for (int i = 0; i < POOL_SIZE_ANTS; i++)
            {
                PoolAnts.Add(new Ant(game, false));
            }
        }