19 lines
248 B
Plaintext
19 lines
248 B
Plaintext
package boxes
|
|
|
|
import "aego/input"
|
|
|
|
script Kick {
|
|
@export
|
|
var Impulse Vec2 = Vec2{0, -4}
|
|
|
|
func Update(dt float) {
|
|
if !input.Pressed("Jump") {
|
|
return
|
|
}
|
|
body := node.Get<Body2D>()
|
|
if body != nil {
|
|
body.ApplyImpulse(Impulse)
|
|
}
|
|
}
|
|
}
|