public FpsCounter(Main game, Vector2 position) : base(game) { this.game = game; this.position = position; game.Components.Add(this); }
public Pheromone(Main game, bool active) : base(game, active) { // make sure it loads and draws DrawOrder = 49; UpdateOrder = 50; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Main game = new Main()) { game.Run(); } }
public MouseEventsManager(Main game) : base(game) { this.game = game; game.Components.Add(this); this.DrawOrder = 100; }
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; }
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); }
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; }
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)); } }