core/curve with presets, keys, wraps; KindCurve in schema, scenes, prefabs and the inspector curve editor. modules/tween: tweens and timers in per-world pools, game and unscaled domains, script field targets via contracts/scriptfields. Host handle types (abi.Handle, bind.Handle, manifest v5), yield on awaitable handles via contracts/scriptwait. Script modules aego/curve, aego/tween, aego/timer; platformer enemy uses a cooldown and a fade-out tween. Docs: tween.md, curves.md, language reference; golden for the curve editor.
39 lines
724 B
Go
39 lines
724 B
Go
package stdlib
|
|
|
|
import "aego/script/bind"
|
|
|
|
const (
|
|
ModMath = "aego/math"
|
|
ModLog = "aego/log"
|
|
ModRand = "aego/rand"
|
|
ModTime = "aego/time"
|
|
ModCurve = "aego/curve"
|
|
ModTesting = "aego/testing"
|
|
)
|
|
|
|
// Options configure the script library.
|
|
type Options struct {
|
|
Seed uint64
|
|
Testing bool
|
|
}
|
|
|
|
// Install registers the language library: math, log, rand, time, curve and, with Testing, testing.
|
|
func Install(r *bind.Registry, opt Options) {
|
|
InstallBase(r, opt)
|
|
if opt.Testing {
|
|
InstallTesting(r)
|
|
}
|
|
}
|
|
|
|
func InstallBase(r *bind.Registry, opt Options) {
|
|
installMath(r)
|
|
installLog(r)
|
|
installRand(r, opt.Seed)
|
|
installTime(r)
|
|
installCurve(r)
|
|
}
|
|
|
|
func InstallTesting(r *bind.Registry) {
|
|
installTesting(r)
|
|
}
|