Latest version:
Tramway SDK 0.0.9
Github
Quick links
Home
Get Started

Controller Component


This EntityComponent can be used for controlling players and NPCs and that sort of stuff.

Programming in C++


#include <components/controller.h>
API documentation page.

All you really need to do to get started is just the creation of the component. Also you need to feed in a pointer to the entity which will be controlled by this component. It will automatically update the position of it when it moves.

Component<ControllerComponent> component;

component.make();
component->SetParent(this);
component->Init();

After that, you can begin sending commands to the component. Check the API documentation to see what kinds of commands there are. You can also look at the implementation of the PlayerComponent to see an example of the usage of the component.

Scripting in Lua


Not done yet.