motiontest

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package motiontest is what motion's tests share: an installer and a world with motion, stepped as a game steps it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	t testing.TB,
	w *world.Plugin,
	m *motion.Plugin,
	rules []act.Rule,
	after ...goke.System,
) *goke.ECS

Start installs w and m on a new ECS, hands rules to the hosts of their moments, sets up their systems and after, and plans Step. Seed and populate before it.

func Step

func Step(w *world.Plugin, m *motion.Plugin) func(goke.RunCtx, time.Duration)

Step is a step as a game takes it: the world, motion, the clock's replay.

Types

type InstallCtx

type InstallCtx struct {
	// contains filtered or unexported fields
}

InstallCtx is the plugin.Installer a Stage would hand over, minus the engine.

func (*InstallCtx) Draws

func (c *InstallCtx) Draws(...render.Source)

func (*InstallCtx) ECS

func (c *InstallCtx) ECS() *goke.ECS

func (*InstallCtx) Hosts

func (c *InstallCtx) Hosts(h ...host.Host)

Hosts keeps the hosts a plugin tells of.

func (*InstallCtx) Looks

func (c *InstallCtx) Looks(func())

func (*InstallCtx) Pool added in v0.4.0

func (*InstallCtx) Pool() *parallel.Pool

func (*InstallCtx) RegSys

func (c *InstallCtx) RegSys(factory func() goke.System) goke.Runnable

func (*InstallCtx) Setup

func (c *InstallCtx) Setup(providers ...goke.SetupProvider)

func (*InstallCtx) UseModule

func (c *InstallCtx) UseModule(m goke.Module)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL