Added weapon system. Animated laser.
This commit is contained in:
26
weapons/gun.go
Normal file
26
weapons/gun.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package weapons
|
||||
|
||||
import "mover/gamedata"
|
||||
|
||||
type Gun struct {
|
||||
active bool
|
||||
}
|
||||
|
||||
func NewGun() *Gun {
|
||||
g := &Gun{
|
||||
active: false,
|
||||
}
|
||||
return g
|
||||
}
|
||||
|
||||
func (g *Gun) IsActive() bool {
|
||||
return g.active
|
||||
}
|
||||
|
||||
func (g *Gun) SetActivity(active bool) {
|
||||
g.active = active
|
||||
}
|
||||
|
||||
func (g *Gun) GetWeaponType() gamedata.WeaponType {
|
||||
return gamedata.WeaponTypeGun
|
||||
}
|
||||
Reference in New Issue
Block a user