Prepare to refactor movement to be based on attributes
This commit is contained in:
parent
d0a5b91de7
commit
33f25a7414
8 changed files with 45 additions and 47 deletions
|
@ -4,12 +4,10 @@ package game
|
|||
type Vector struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Z float64 `json:"z"`
|
||||
}
|
||||
|
||||
// Add adds one vector to another
|
||||
func (v *Vector) Add(v2 Vector) {
|
||||
v.X += v2.X
|
||||
v.Y += v2.Y
|
||||
v.Z += v2.Z
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue