entity

command
v0.0.0-...-544bd7e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2016 License: BSD-2-Clause Imports: 3 Imported by: 0

README

Entity Demo

What does it do?

It demonstrates how one can create an Entity.

What are important aspects of the code?

These lines are key in this demo:

  • guy := ecs.NewEntity([]string{"RenderSystem", "ScaleSystem"}), to define the Entity;
  • render := engi.NewRenderComponent(texture, engi.Point{8, 8}, "guy"), to add something renderable to the Entity;
  • guy.AddComponent(render), to combine the renderable component and the Entity;
  • game.AddEntity(guy), to actually add the Entity to the game.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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