Created
June 8, 2012 16:03
-
-
Save anonymous/2896445 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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