(dt float32)
| 334 | } |
| 335 | |
| 336 | func (c *ControlSystem) Update(dt float32) { |
| 337 | for _, e := range c.entities { |
| 338 | if vector, changed := getSpeed(e); changed { |
| 339 | speed := dt * SPEED_SCALE |
| 340 | vector, _ = vector.Normalize() |
| 341 | vector.MultiplyScalar(speed) |
| 342 | engo.Mailbox.Dispatch(SpeedMessage{e.BasicEntity, vector}) |
| 343 | } |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | func main() { |
| 348 | opts := engo.RunOptions{ |
nothing calls this directly
no test coverage detected