MCPcopy
hub / github.com/EngoEngine/engo / Update

Method Update

demos/isoadventure/iso.go:336–345  ·  view source on GitHub ↗
(dt float32)

Source from the content-addressed store, hash-verified

334}
335
336func (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
347func main() {
348 opts := engo.RunOptions{

Callers

nothing calls this directly

Calls 4

NormalizeMethod · 0.80
MultiplyScalarMethod · 0.80
DispatchMethod · 0.80
getSpeedFunction · 0.70

Tested by

no test coverage detected