Added weapon drops and collection. New laser item asset.
This commit is contained in:
@@ -13,7 +13,7 @@ func NewHolster() *Holster {
|
||||
activewp: gamedata.WeaponTypeGun,
|
||||
}
|
||||
holster.AddWeapon(NewGun())
|
||||
holster.AddWeapon(NewLaser())
|
||||
//holster.AddWeapon(NewLaser())
|
||||
return holster
|
||||
}
|
||||
|
||||
@@ -46,8 +46,9 @@ func (h *Holster) CycleWeapon() {
|
||||
}
|
||||
|
||||
//keep searching until we find the next weapon that exists
|
||||
var nextwp gamedata.WeaponType = h.activewp
|
||||
for ok := false; !ok; {
|
||||
nextwp := (h.activewp + 1) % gamedata.WeaponTypeMax
|
||||
nextwp = (nextwp + 1) % gamedata.WeaponTypeMax
|
||||
_, ok = h.guns[nextwp]
|
||||
if ok {
|
||||
h.activewp = nextwp
|
||||
|
||||
Reference in New Issue
Block a user