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