public BaseChest(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, region, content, graphics) { nInventorySlots = 5; var objKey = "baseChest"; storageTierType = "baseChestItem"; // needed for deserialization of burying your own treasure List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 4); List <InventoryItem> items = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); inventory = Enumerable.Repeat <InventoryItem>(null, nInventorySlots).ToList(); Texture2D texture = content.Load <Texture2D>("BaseChest"); Texture2D textureBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBB = new Texture2D(graphics, texture.Width, texture.Height); } Asset asset = new Asset(texture, textureBB, 3, 2, 0.5f, objKey, region); SetSpriteAsset(asset, location); foreach (var i in items) { if (AddInventoryItem(i)) { i.inInventory = true; } } }
public Chicken(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, content, graphics) { millisecondToDie = 10000; millisecondsPerTurnFrame = 500; // turn speed millisecondsPerWalkFrame = 300; // turn speed millisecondsCombatMove = 75; idleFreezeColFrame = 5; fullHealth = 10; health = fullHealth; damage = 0.05f; actionState = ActionState.PassiveRoam; string objKey = "chicken"; List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 3); inventory = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); Texture2D texture = content.Load <Texture2D>("Chicken"); Texture2D textureBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBB = new Texture2D(graphics, texture.Width, texture.Height); } Asset asset = new Asset(texture, textureBB, 10, 4, 0.7f, objKey, region); SetSpriteAsset(asset, location); }
public BaseTribal(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, content, graphics) { millisecondToDie = 10000; millisecondsPerTurnFrame = 500; // turn speed millisecondsPerWalkFrame = 100; // turn speed millisecondsCombatMove = 75; combatFrameIndex = 7; fullHealth = 25; health = fullHealth; damage = 0.05f; actionState = ActionState.DefenseRoam; string objKey = "baseTribal"; List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 3); inventory = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); Texture2D textureBaseTribal = content.Load <Texture2D>("Tribal1"); Texture2D textureBaseTribalBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBaseTribalBB = new Texture2D(graphics, textureBaseTribal.Width, textureBaseTribal.Height); } Asset baseTribalAsset = new Asset(textureBaseTribal, textureBaseTribalBB, 12, 4, 1.0f, objKey, region); SetSpriteAsset(baseTribalAsset, location); }
public BlueBird(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, content, graphics) { millisecondToDie = 10000; millisecondsPerTurnFrame = 400; // turn speed millisecondsPerWalkFrame = 200; // turn speed millisecondsCombatMove = 75; msIdleWaitTime = 6000; nIdleRowFrames = 1; fullHealth = 25; health = fullHealth; damage = 0.05f; actionState = ActionState.IdleFlee; string objKey = "blueBird"; List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 3); inventory = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); Texture2D texture = content.Load <Texture2D>("BlueBird"); Texture2D textureBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBB = new Texture2D(graphics, texture.Width, texture.Height); } Asset asset = new Asset(texture, textureBB, 4, 5, 0.4f, objKey, region); SetSpriteAsset(asset, location); }
public void UpdateRespawn(GameTime gt) { respawnTimeCountMs += gt.ElapsedGameTime.Milliseconds; if (respawnTimeCountMs > msRespawn) { SetTileDesignRow(RandomEvents.rand.Next(0, nRows)); location.X += RandomEvents.rand.Next(-GameOptions.tileWidth, GameOptions.tileWidth); location.Y += RandomEvents.rand.Next(-GameOptions.tileHeight, GameOptions.tileHeight); List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(bbKey, 2); drops = ItemUtility.CreateNPInventory(itemDrops, team, regionKey, location, _content, _graphics); remove = false; respawnTimeCountMs = 0; nHits = 0; } }
public BaseBarrel(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, region, content, graphics) { nHitsToDestroy = 5; var objKey = "baseBarrel"; List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 4); drops = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); Texture2D texture = content.Load <Texture2D>("Barrel"); Texture2D textureBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureBB = new Texture2D(graphics, texture.Width, texture.Height); } Asset asset = new Asset(texture, textureBB, 3, 2, 0.5f, objKey, region); SetSpriteAsset(asset, location); }
public Tree2(TeamType team, string region, Vector2 location, ContentManager content, GraphicsDevice graphics) : base(team, content, graphics) { nHitsToDestory = 5; msRespawn = GameOptions.GameDayLengthMs / 2; string objKey = "tree2"; List <Tuple <string, int> > itemDrops = RandomEvents.RandomNPDrops(objKey, 2); drops = ItemUtility.CreateNPInventory(itemDrops, team, region, location, content, graphics); Texture2D textureTree = content.Load <Texture2D>("Tree2"); Texture2D textureTreeBB = null; if (Gusto.GameOptions.ShowBoundingBox) { textureTreeBB = new Texture2D(graphics, textureTree.Width, textureTree.Height); } Asset treeAsset = new Asset(textureTree, textureTreeBB, 4, 2, 0.6f, objKey, region); SetSpriteAsset(treeAsset, location); }