#pragma once

#include "../interface.h"

class CGameControl;
extern CGameControl*			g_pGameControl;

class CGameControl : public CInterfaceBase
{
public:
	CGameControl(CInterface* object);
	virtual ~CGameControl();

	virtual	void				RegisterFunc();
	virtual	void				Update(float elapsedTime);
	virtual	bool				MsgProc(UINT iMsg, WPARAM wParam, LPARAM lParam);		
	virtual	CUiFrame*			GetWorldFrame()								{ return m_pUiWorldFrame; }
	//virtual	void				SetScripts();

protected:	
	virtual	void				HandleKeyboard(float elapsedTime);
	virtual	void				HandleMouse(float elapsedTime);
	virtual	void				HandleMove(float elapsedTime);
	virtual	void				OnMouseDown(int key);
	virtual	void				OnMouseUp(int key);
	virtual	void				OnClick(int key);
	virtual	void				OnMouseWheel(int delta);
	virtual	void				LockCursor();
	virtual	void				UnlockCursor();
	virtual	void				OnReceiveDrag();
	virtual	void				RotateCamera(float xDelta, float yDelta, bool isModifyPlayer);

protected:
	CUiFrame*					m_pUiWorldFrame;
	bool						m_isLockForward;
	bool						m_isJump;
	bool						m_isLockCursor;
	float						m_forwardDelta;
	float						m_rightDelta;
};