Revision 2338,
720 bytes
checked in by teeevasa, 12 years ago
(diff) |
initial bullet collision
|
Line | |
---|
1 | using System; |
---|
2 | using Jypeli; |
---|
3 | using Jypeli.Assets; |
---|
4 | using Jypeli.Controls; |
---|
5 | using Jypeli.Effects; |
---|
6 | using Jypeli.Widgets; |
---|
7 | |
---|
8 | public class Pistol : Weapon |
---|
9 | { |
---|
10 | public CollisionHandler BulletCollision |
---|
11 | { |
---|
12 | get { return ProjectileCollision; } |
---|
13 | set { ProjectileCollision = value; } |
---|
14 | } |
---|
15 | |
---|
16 | public Pistol(double width, double height) |
---|
17 | : base(width, height) |
---|
18 | { |
---|
19 | Image = Game.LoadImage("Images/gausspistol"); |
---|
20 | AttackSound = Game.LoadSoundEffect("Sounds/pistolshot"); |
---|
21 | AmmoIgnoresGravity = true; |
---|
22 | InfiniteAmmo = true; |
---|
23 | } |
---|
24 | |
---|
25 | protected override PhysicsObject CreateProjectile() |
---|
26 | { |
---|
27 | return new Projectile(1, 1, Color.DarkGray); |
---|
28 | } |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.