|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
Package gohan provides an Entity Component System framework for Ebiten.
|
|
|
|
|
Package gohan provides an Entity Component System framework for Ebitengine.
|
|
|
|
|
|
|
|
|
|
An example game is available at /examples/twinstick, which may be built by
|
|
|
|
|
executing the following command (in /examples/twinstick):
|
|
|
|
@ -27,7 +27,9 @@ each systems' set of required matching components.
|
|
|
|
|
type ExampleSystem struct {
|
|
|
|
|
Position *component.PositionComponent // Required component.
|
|
|
|
|
Velocity *component.VelocityComponent // Required component.
|
|
|
|
|
|
|
|
|
|
Sprite *component.SpriteComponent `gohan:"?"` // Optional component.
|
|
|
|
|
|
|
|
|
|
Enabled bool `gohan:"-"` // Not a component.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -51,11 +53,6 @@ call, or else the application will encounter race conditions.
|
|
|
|
|
Environment Variables
|
|
|
|
|
|
|
|
|
|
Running an application with the environment variable GOHAN_DEBUG set to 1
|
|
|
|
|
enables verification of systems' access to components. This verification is
|
|
|
|
|
disabled by default for performance reasons. While verification is enabled,
|
|
|
|
|
if a system attempts to access a component which is not included in the
|
|
|
|
|
system's Needs or Uses, the application will panic and print information about
|
|
|
|
|
the illegal component access. Setting GOHAN_DEBUG to 1 will also enable
|
|
|
|
|
printing system registration events and statistics.
|
|
|
|
|
will enable printing verbose system update and draw information.
|
|
|
|
|
*/
|
|
|
|
|
package gohan
|
|
|
|
|