ignore new binary

Create new bserv binary

Herein lie the following ideas:

- change package visibility of many things
- try to stash the globals into structs
- the code is far from correct; it merely compiles
This commit is contained in:
sm
2014-03-31 23:21:14 -07:00
parent 62222a9ad9
commit c8efd34080
16 changed files with 146 additions and 126 deletions
+6 -4
View File
@@ -1,8 +1,9 @@
package main
package botserv
import (
v "bitbucket.org/hackerbots/vector"
"log"
v "bitbucket.org/hackerbots/vector"
)
type Projectile struct {
@@ -13,12 +14,13 @@ type Projectile struct {
Speed float32 `json:"-"`
Damage int `json:"-"`
Owner *Robot `json:"-"`
Delta float32
}
func (p *Projectile) Tick(g *game) {
func (p *Projectile) Tick(g *Game) {
vec := p.MoveTo.Sub(p.Position)
v_norm := vec.Normalize()
v_scaled := v_norm.Scale(p.Speed * delta)
v_scaled := v_norm.Scale(p.Speed * p.Delta)
newPos := p.Position.Add(v_scaled)
hit_player := false