public Peon(Engine game, PeonManager manager, Texture2D gfxPlaceholder, Vector2 position) : base(game) { this.game = game; this.tex = new SpriteSheet(gfxPlaceholder, new Vector2(21, 20), 3.0f); this.glow = new SpriteSheet(Engine.ContentManager.Load <Texture2D>("glowPeon"), new Vector2(26, 30), 3); sfxWorshipping = Engine.ContentManager.Load <SoundEffect>("sound/bleep"); boundingCircle = new BoundingCircle(position, 10); comfortZone = new BoundingCircle(position, 20); this.tex.Position = position; //opacity = 1.0f; //this.gfxPlaceholder.FrameCount = 3; favorTex = Engine.ContentManager.Load <Texture2D>("favorBar"); favorBorder = Engine.ContentManager.Load <Texture2D>("favorBorder"); this.tex.Origin = new Vector2(10, 10); glow.Origin = new Vector2(13, 15); // add our peon to the manager which contains all peons manager.addPeon(this); vehicle = new Vehicle(); vehicle.Position = position; opacity = 0.1f; //startFollowingPlayer(Engine.playerOne); startWandering(); this.peonManager = manager; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here Form.FromHandle(this.Window.Handle).SetBounds(0, -16, 1280, 1024); manager = new PeonManager(); mainMenu.Initialize(); introScreen.Initialize(); base.Initialize(); }