public DemoPlayer(String path) { m_inputManager = new DefaultInputManager(); m_inputManager.AddKeyboardListener(this); m_tickCmd = new DemoTickCmd(); m_cmdLookup = new Dictionary <DemoCmdType, DemoCmd>(); m_cmdLookup[DemoCmdType.Init] = new DemoInitCmd(); m_cmdLookup[DemoCmdType.Input] = new DemoInputCmd(); m_cmdLookup[DemoCmdType.Tick] = m_tickCmd; m_frameSkipLookup = new Dictionary <KeyCode, int>(); m_frameSkipLookup[KeyCode.D2] = 2; m_frameSkipLookup[KeyCode.D3] = 3; m_frameSkipLookup[KeyCode.D4] = 4; m_frameSkipLookup[KeyCode.D5] = 5; m_frameSkipLookup[KeyCode.D6] = 6; m_frameSkipLookup[KeyCode.D7] = 7; m_frameSkipLookup[KeyCode.D8] = 8; m_frameSkipLookup[KeyCode.D9] = 9; m_frameSkipLookup[KeyCode.D0] = 10; Read(path); }
public DemoPlayer(String path) { m_inputManager = new DefaultInputManager(); m_inputManager.AddKeyboardListener(this); m_tickCmd = new DemoTickCmd(); m_cmdLookup = new Dictionary<DemoCmdType, DemoCmd>(); m_cmdLookup[DemoCmdType.Init] = new DemoInitCmd(); m_cmdLookup[DemoCmdType.Input] = new DemoInputCmd(); m_cmdLookup[DemoCmdType.Tick] = m_tickCmd; m_frameSkipLookup = new Dictionary<KeyCode, int>(); m_frameSkipLookup[KeyCode.D2] = 2; m_frameSkipLookup[KeyCode.D3] = 3; m_frameSkipLookup[KeyCode.D4] = 4; m_frameSkipLookup[KeyCode.D5] = 5; m_frameSkipLookup[KeyCode.D6] = 6; m_frameSkipLookup[KeyCode.D7] = 7; m_frameSkipLookup[KeyCode.D8] = 8; m_frameSkipLookup[KeyCode.D9] = 9; m_frameSkipLookup[KeyCode.D0] = 10; Read(path); }
public DemoRecorder() { m_buffer = new BitWriteBuffer(); m_tickCmd = new DemoTickCmd(); m_inputCmd = new DemoInputCmd(); Write(new DemoInitCmd(MathHelp.GetRandomSeed())); }