source: 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/Weapons.cs @ 2354

Revision 2354, 862 bytes checked in by teeevasa, 9 years ago (diff)

added keyboard controls for menu

Line 
1using System;
2using Jypeli;
3using Jypeli.Assets;
4using Jypeli.Controls;
5using Jypeli.Effects;
6using Jypeli.Widgets;
7
8public class Pistol : Weapon
9{
10    public Pistol(double width, double height)
11        : base(width, height)
12    {
13        Image = Game.LoadImage("Images/gausspistol");
14        AttackSound = Game.LoadSoundEffect("Sounds/pistolshot");
15        AmmoIgnoresGravity = true;
16        InfiniteAmmo = true;
17        Power.DefaultValue = 1000;
18        TimeBetweenUse = TimeSpan.FromSeconds(0.4);
19    }
20
21    protected override PhysicsObject CreateProjectile()
22    {
23        Projectile proj = new Projectile(1, 1, Color.DarkGray);
24        proj.CollisionIgnoreGroup = 1;
25        return proj;
26    }
27
28    public int firePower()
29    {
30        return 10;
31    }
32
33    public string name()
34    {
35        return "Pistol";
36    }
37}
Note: See TracBrowser for help on using the repository browser.