34 lines
		
	
	
		
			841 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			841 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef PLAYER_INTERACTOR_H
 | 
						|
#define PLAYER_INTERACTOR_H
 | 
						|
 | 
						|
#include "scene/3d/physics/shape_cast_3d.h"
 | 
						|
class Interactable;
 | 
						|
class WeaponInventory;
 | 
						|
 | 
						|
class PlayerInteractor : public ShapeCast3D {
 | 
						|
	GDCLASS(PlayerInteractor, ShapeCast3D);
 | 
						|
	static void _bind_methods();
 | 
						|
	void highlight_removed();
 | 
						|
	void activate();
 | 
						|
	void ready();
 | 
						|
	void process(double delta);
 | 
						|
 | 
						|
protected:
 | 
						|
	void _notification(int what);
 | 
						|
 | 
						|
public:
 | 
						|
	virtual PackedStringArray get_configuration_warnings() const override;
 | 
						|
	void pickup_demo_pack();
 | 
						|
	bool try_use_demo_pack();
 | 
						|
	WeaponInventory *get_inventory() const;
 | 
						|
 | 
						|
private:
 | 
						|
	int num_demo_packs{ 0 };
 | 
						|
	Interactable *interactable{ nullptr };
 | 
						|
	Callable on_highlight_removed{ callable_mp(this, &self_type::highlight_removed) };
 | 
						|
	WeaponInventory *inventory{ nullptr };
 | 
						|
	static String activate_method_name;
 | 
						|
};
 | 
						|
 | 
						|
#endif // !PLAYER_INTERACTOR_H
 |