source: 2011/26/JaakkoL/Rogue Agent 2372/Rogue Agent 2372/Rogue Agent 2372/GenWeapon.cs @ 2280

Revision 2280, 1.1 KB checked in by teeevasa, 8 years ago (diff)
Line 
1using System;
2using Jypeli;
3using Jypeli.Assets;
4using Jypeli.Controls;
5using Jypeli.Effects;
6using Jypeli.Widgets;
7
8public class GenWeapon
9{
10    Weapon weapon;
11
12    GenWeapon(string weaponName)
13    {
14   
15    }
16
17    private void loadWeapon(string weaponName)
18    {
19        //weapon = Weapons.Pistol();
20    }
21
22    private void changeWeapon(string weaponName)
23    { 
24   
25    }
26}
27
28struct Weapon
29{ 
30    private int reloadTime;
31    private int firingInterval;
32    private string name;
33    private Image weaponImage;
34    private Image bulletImage;
35    private SoundEffect sound;
36
37    Weapon(int _reloadTime, int _firingInterval, string weaponName,
38        string weaponImgPath, string bulletImgPath, string soundEffectPath)
39    {
40        this.reloadTime = _reloadTime;
41        this.firingInterval = _firingInterval;
42        this.name = weaponName;
43        this.weaponImage = Game.LoadImage(weaponImgPath);
44        this.bulletImage = Game.LoadImage(bulletImgPath);
45        this.sound = Game.LoadSoundEffect(soundEffectPath);
46    }
47}
Note: See TracBrowser for help on using the repository browser.