43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "core/templates/hash_set.h"
|
|
#include "scene/3d/node_3d.h"
|
|
#include "scene/resources/material.h"
|
|
#include "scene/resources/texture.h"
|
|
#include "you_done_it/clue_marker.h"
|
|
|
|
class ClueFinder : public Node3D {
|
|
GDCLASS(ClueFinder, Node3D);
|
|
static void _bind_methods();
|
|
static ClueFinder *singleton_instance;
|
|
void enter_tree();
|
|
void exit_tree();
|
|
void on_button_pressed(String button);
|
|
|
|
protected:
|
|
void _notification(int what);
|
|
|
|
public:
|
|
static ClueFinder *get_singleton();
|
|
ClueMarker *find_current_clue();
|
|
void register_clue_marker(ClueMarker *marker);
|
|
void remove_clue_marker(ClueMarker *marker);
|
|
void take_photo();
|
|
void send_photo();
|
|
void delete_photo();
|
|
void set_empty_texture(Ref<Texture> texture);
|
|
Ref<Texture> get_empty_texture() const;
|
|
void set_photo_material(Ref<StandardMaterial3D> material);
|
|
Ref<StandardMaterial3D> get_photo_material() const;
|
|
|
|
private:
|
|
Ref<StandardMaterial3D> photo_material{};
|
|
Ref<Texture> empty_texture{};
|
|
ClueMarker *found_marker{ nullptr };
|
|
HashSet<ClueMarker *> clue_markers{};
|
|
|
|
public:
|
|
static String const sig_found_marker_changed;
|
|
static String const sig_clue_deleted;
|
|
static String const sig_clue_sent;
|
|
};
|