public ItemType(string name, Rectangle location, Weapon weapon) { Name = name; Description = "A default description"; Stacksize = 255; Location = location; Use = "useweapon:" + weapon.Id; }
public LiveProjectile(Weapon weapon, Vector2 location, float force, Control control, Camera camera) : base(weapon, location) { Movement = new Movement(location, 24, 6); Movement.Gravity = 0.15f; Movement.Drag = 0.06f; Movement.PushbackFrom(new Vector2(control.currentMouse.X - camera.X, control.currentMouse.Y - camera.Y), force); TimeToLive = 250; }
public LiveSword(Weapon weapon, Vector2 location, string direction) : base(weapon, location) { SwingStart = 0f; SwingEnd = 2.5f; Direction = direction; if (Direction == "left") { SwingStart = SwingStart * -1; } if (Direction == "left") { SwingEnd = SwingEnd * -1; } if (Direction == "left") { Speed = 0.1f * -1; } else { Speed = 0.1f; } Rotation = SwingStart; }
public void mock(BlockType[] blockTypes, Weapon[] weapons) { ItemTypes = new ItemType[10]; ItemTypes[0] = new ItemType("Sword", new Rectangle(0, 0, 40, 40), weapons[0]); ItemTypes[1] = new ItemType("Food", new Rectangle(40, 0, 40, 40)); ItemTypes[2] = new ItemType("Stone", new Rectangle(80, 0, 40, 40), blockTypes[0]); ItemTypes[3] = new ItemType("Shirt", new Rectangle(120, 0, 40, 40)); ItemTypes[4] = new ItemType("Health Potion", new Rectangle(160, 0, 40, 40)); ItemTypes[5] = new ItemType("Mana Potion", new Rectangle(200, 0, 40, 40), "placewall:1"); ItemTypes[6] = new ItemType("Pants", new Rectangle(240, 0, 40, 40)); ItemTypes[7] = new ItemType("Gun", new Rectangle(280, 0, 40, 40)); ItemTypes[8] = new ItemType("Copper Ore", new Rectangle(320, 0, 40, 40), "placeentity:1"); ItemTypes[9] = new ItemType("Bow", new Rectangle(360, 0, 40, 40), weapons[2]); }
public void Initialize(Texture2D weaponTexture, Texture2D arrowTexture) { WeaponTexture = weaponTexture; ArrowTexture = arrowTexture; Weapons[0] = new Weapon(11, Types[0], "Big Stick", new Rectangle(0, 0, WeaponTexture.Bounds.Width, WeaponTexture.Bounds.Height)); Weapons[1] = new Weapon(12, Types[2], "Bow", new Rectangle(0, 0, WeaponTexture.Bounds.Width, WeaponTexture.Bounds.Height)); Weapons[2] = new Weapon(13, Types[3], "Wooden Arrow", new Rectangle(0, 0, WeaponTexture.Bounds.Width, WeaponTexture.Bounds.Height)); }
public LiveWeapon(Weapon weapon, Vector2 location) { Weapon = weapon; Location = location; }