porting flash scripts

ported over agent.as, some pushed into static class Game
ported Registry over, access with Registry.Instance
moved debugEnabled flag to Actor instead of Agent