mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
34 lines
880 B
C++
34 lines
880 B
C++
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
|
#ifndef GAME_CLIENT_COMPONENTS_CONTROLS_H
|
|
#define GAME_CLIENT_COMPONENTS_CONTROLS_H
|
|
#include <base/vmath.h>
|
|
#include <game/client/component.h>
|
|
|
|
class CControls : public CComponent
|
|
{
|
|
public:
|
|
vec2 m_MousePos;
|
|
vec2 m_TargetPos;
|
|
|
|
CNetObj_PlayerInput m_InputData;
|
|
CNetObj_PlayerInput m_LastData;
|
|
int m_InputDirectionLeft;
|
|
int m_InputDirectionRight;
|
|
bool m_ShowHookColl;
|
|
|
|
CControls();
|
|
|
|
virtual void OnReset();
|
|
virtual void OnRelease();
|
|
virtual void OnRender();
|
|
virtual void OnMessage(int MsgType, void *pRawMsg);
|
|
virtual bool OnMouseMove(float x, float y);
|
|
virtual void OnConsoleInit();
|
|
virtual void OnPlayerDeath();
|
|
|
|
int SnapInput(int *pData);
|
|
void ClampMousePos();
|
|
};
|
|
#endif
|