Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2012 16:03
Show Gist options
  • Save anonymous/2896445 to your computer and use it in GitHub Desktop.
Save anonymous/2896445 to your computer and use it in GitHub Desktop.
struct Agent {
Agent (const Vector3 &initialPosition);
void LookAt (const Vector3 &target);
void MoveTo (const Vector3 &target);
private:
Vector3 position;
Vector3 facing;
};
struct IController {
virtual void Update (float elapsed) = 0;
};
struct HumanController : IController {
HumanController (Agent & agent, InputSystem &inputSystem);
void Update (float elapsed);
private:
InputSystem & inputSystem;
};
struct AiController : IController {
AiController (Agent & agent, const Script &script);
void Update (float elapsed);
private:
Script & script;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment