public static void Load() { Sprite hudSprite = new Sprite(2, 2); hudSprite.Load(" ", new Color[] { new Color(WHITE, BLACK), new Color(BLACK, BLACK), new Color(WHITE, BLACK), new Color(BLACK, BLACK) }); Sprite groundSprite = new Sprite(2, 2); groundSprite.Load(" ", new Color[] { new Color(WHITE, BLACK), new Color(BLACK, BLACK), new Color(WHITE, BLACK), new Color(BLACK, BLACK), }); Sprite bulletSprite = Resources.GetSprite(Resources.bullet); asparagus.Game.Object bullet = new asparagus.Game.Object(0, 0, 0, 0, 0, 1, 4, bulletSprite, "bullet"); Weapon _pistol = new Weapon("Pistol", 15.0f, 0.35f, 4.0f, Resources.GetSprite(Resources.pistol), Resources.GetSprite(Resources.hudPistol), bullet, false); Weapon _shotgun = new Weapon("Shotgun", 15.0f, 0.45f, 6.0f, Resources.GetSprite(Resources.shotgun), Resources.GetSprite(Resources.hudShotgun), bullet, false); Weapon _machinegun = new Weapon("Machinegun", 10.0f, 0.10f, 8.0f, Resources.GetSprite(Resources.machinegun), Resources.GetSprite(Resources.hudMachinegun), bullet, true); Weapon _sniper = new Weapon("Sniper", 60.0f, 1.0f, 12.0f, Resources.GetSprite(Resources.sniper), Resources.GetSprite(Resources.hudSniper), bullet, false); pistol = _pistol; shotgun = _shotgun; machinegun = _machinegun; sniper = _sniper; }
public Weapon( string _name, float _damage, float _cooldown, float _speed, Sprite _hudSprite, Sprite _handSprite, asparagus.Game.Object _bullet, bool _hold) { name = _name; damage = _damage; cooldown = _cooldown; speed = _speed; hudSprite = _hudSprite; handSprite = _handSprite; bullet = _bullet; hold = _hold; }