31 lines
		
	
	
		
			701 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			701 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef PLAYER_INPUT_H
 | 
						|
#define PLAYER_INPUT_H
 | 
						|
 | 
						|
#include "scene/main/node.h"
 | 
						|
 | 
						|
class PlayerInput : public Node {
 | 
						|
	GDCLASS(PlayerInput, Node);
 | 
						|
	static void _bind_methods();
 | 
						|
	void normalize_input();
 | 
						|
	void _notification(int what);
 | 
						|
	virtual void unhandled_input(Ref<InputEvent> const &event) override;
 | 
						|
 | 
						|
public:
 | 
						|
	static String sig_movement_input;
 | 
						|
	static String sig_look_input;
 | 
						|
	static String sig_primary_fire;
 | 
						|
	static String sig_alt_mode;
 | 
						|
	static String sig_switch_weapon;
 | 
						|
	static String sig_run;
 | 
						|
	static String sig_jump;
 | 
						|
	static String sig_crouch;
 | 
						|
	static String sig_activate;
 | 
						|
	static String sig_reload;
 | 
						|
 | 
						|
private:
 | 
						|
	bool was_paused{ false };
 | 
						|
	float mouselook_speed{ 0.0025f };
 | 
						|
};
 | 
						|
 | 
						|
#endif // !PLAYER_INPUT_H
 |