public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; currentScreen = Screens.startScreen; graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 450; collisionManager = new CollisionManager(400.0f); }
public Catapult(Texture2D catapultTexture, Texture2D lineTexture, Texture2D ammoTexture, CollisionManager collisionManager) { this.catapultTexture = catapultTexture; this.lineTexture = lineTexture; this.ammoTexture = ammoTexture; oldMouseState = Mouse.GetState(); newMouseState = oldMouseState; this.collisionManager = collisionManager; // Setup the list of shot ammo ammo = new List<Ammunition>(); lastSetAngle = 0.0f; damage = 1; }
public CowManager(CollisionManager collisionManager, Texture2D h1Texture, Texture2D h2Texture) { this.collisionManager = collisionManager; activeCows = new List<Cow>(); activeMeats = new List<Meat>(); meatsToRemove = new List<Meat>(); cowTextures = new Dictionary<Type, Texture2D>(); randomNumber = new Random(); timeTillNextCow = randomNumber.Next(minSpawnTime, maxSpawnTime); activeMeats = new List<Meat>(); this.h1Texture = h1Texture; this.h2Texture = h2Texture; }
public VillagerManager(Texture2D villagerTexture, CowManager cowManager, CollisionManager collisionManager, MeatStore meatStore) { this.villagerTexture = villagerTexture; villagers = new Queue<Villager>(); outVillagers = new List<Villager>(); justReturnedVillagers = new List<Villager>(); this.collisionManager = collisionManager; this.cowManager = cowManager; for (int i = 0; i < maxVillagers; ++i) { CreateVillager(); } oldState = Keyboard.GetState(); newState = oldState; this.meatStore = meatStore; }