No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

splosion.go 333B

1234567891011121314151617181920
  1. package botserv
  2. import (
  3. v "bitbucket.org/hackerbots/vector"
  4. )
  5. type Splosion struct {
  6. Id string `json:"id"`
  7. Position v.Point2d `json:"position"`
  8. Radius int `json:"radius"`
  9. Lifespan int `json:"-"`
  10. }
  11. func (s *Splosion) Tick() {
  12. s.Lifespan--
  13. }
  14. func (s *Splosion) Alive() bool {
  15. return s.Lifespan > 0
  16. }