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

Method Update

demos/animation/anim.go:118–126  ·  view source on GitHub ↗
(dt float32)

Source from the content-addressed store, hash-verified

116}
117
118func (c *ControlSystem) Update(dt float32) {
119 for _, e := range c.entities {
120 if engo.Input.Button(actionButton).JustPressed() {
121 e.AnimationComponent.SelectAnimationByAction(WalkAction)
122 } else if engo.Input.Button(jumpButton).JustPressed() {
123 e.AnimationComponent.SelectAnimationByAction(SkillAction)
124 }
125 }
126}
127
128func main() {
129 opts := engo.RunOptions{

Callers

nothing calls this directly

Calls 3

ButtonMethod · 0.80
JustPressedMethod · 0.45

Tested by

no test coverage detected