27 lines
342 B
Go
27 lines
342 B
Go
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
|
|
}
|