An enemy drone, moves around using navigation. Model is expected to float well above the transform origin.  
 More...
#include <drone.hpp>
|  | 
| virtual void | _ready () override | 
|  | Get required object references and connect observers. 
 | 
|  | 
| virtual void | _process (double delta_time) override | 
|  | Update the state machine. 
 | 
|  | 
| void | process_chase (double delta_time) | 
|  | Process the chase state. Navigate ahead of player player and drop when near target. 
 | 
|  | 
| void | process_flee (double delta_time) | 
|  | Flee state, Flee away from the player. 
 | 
|  | 
| void | process_navigate (double delta_time) | 
|  | Navigate according to path. 
 | 
|  | 
| void | recalculate_navigation () | 
|  | Recalculate pathing based on current state. 
 | 
|  | 
| void | spawn_explosion () | 
|  | Spawn an explosion after dropping. 
 | 
|  | 
| void | key_found (int total) | 
|  | Listener for when a key is found, to up the difficulty. 
 | 
|  | 
| void | start_flee () | 
|  | Listener for when the player grabs a turret pickup. 
 | 
|  | 
| void | end_flee () | 
|  | Listener for when the player drop their turret pickup. 
 | 
|  | 
| void | set_explosion_scene (Ref< PackedScene > scene) | 
|  | The explosion to spawn after dropping. 
 | 
|  | 
| Ref< PackedScene > | get_explosion_scene () const | 
|  | The explosion to spawn after dropping. 
 | 
|  | 
An enemy drone, moves around using navigation. Model is expected to float well above the transform origin. 
◆ _bind_methods()
  
  | 
        
          | void godot::Drone::_bind_methods | ( |  | ) |  |  | staticprivate | 
 
 
◆ _process()
  
  | 
        
          | void godot::Drone::_process | ( | double | delta_time | ) |  |  | overridevirtual | 
 
Update the state machine. 
 
 
◆ _ready()
  
  | 
        
          | void godot::Drone::_ready | ( |  | ) |  |  | overridevirtual | 
 
Get required object references and connect observers. 
 
 
◆ end_flee()
      
        
          | void godot::Drone::end_flee | ( |  | ) |  | 
      
 
Listener for when the player drop their turret pickup. 
 
 
◆ GDCLASS()
  
  | 
        
          | godot::Drone::GDCLASS | ( | Drone | , |  
          |  |  | Node3D |  |  
          |  | ) |  |  |  | private | 
 
 
◆ get_explosion_scene()
      
        
          | Ref< PackedScene > godot::Drone::get_explosion_scene | ( |  | ) | const | 
      
 
The explosion to spawn after dropping. 
 
 
◆ key_found()
      
        
          | void godot::Drone::key_found | ( | int | total | ) |  | 
      
 
Listener for when a key is found, to up the difficulty. 
 
 
◆ process_chase()
      
        
          | void godot::Drone::process_chase | ( | double | delta_time | ) |  | 
      
 
Process the chase state. Navigate ahead of player player and drop when near target. 
 
 
◆ process_flee()
      
        
          | void godot::Drone::process_flee | ( | double | delta_time | ) |  | 
      
 
Flee state, Flee away from the player. 
 
 
◆ process_navigate()
      
        
          | void godot::Drone::process_navigate | ( | double | delta_time | ) |  | 
      
 
Navigate according to path. 
 
 
◆ recalculate_navigation()
      
        
          | void godot::Drone::recalculate_navigation | ( |  | ) |  | 
      
 
Recalculate pathing based on current state. 
 
 
◆ set_explosion_scene()
      
        
          | void godot::Drone::set_explosion_scene | ( | Ref< PackedScene > | scene | ) |  | 
      
 
The explosion to spawn after dropping. 
 
 
◆ spawn_explosion()
      
        
          | void godot::Drone::spawn_explosion | ( |  | ) |  | 
      
 
Spawn an explosion after dropping. 
 
 
◆ start_flee()
      
        
          | void godot::Drone::start_flee | ( |  | ) |  | 
      
 
Listener for when the player grabs a turret pickup. 
 
 
◆ agent
  
  | 
        
          | NavigationAgent3D* godot::Drone::agent {nullptr} |  | private | 
 
Navigation agent Component. 
 
 
◆ anim
  
  | 
        
          | AnimationPlayer* godot::Drone::anim {nullptr} |  | private | 
 
Animation player component. 
 
 
◆ explosion_scene
  
  | 
        
          | Ref<PackedScene> godot::Drone::explosion_scene {} |  | private | 
 
Scene to spawn when exploding. 
 
 
◆ lead_time
  
  | 
        
          | float godot::Drone::lead_time {2.f} |  | private | 
 
How far ahead of the player to target. 
 
 
◆ next_recalc
  
  | 
        
          | int godot::Drone::next_recalc {10} |  | private | 
 
Frame timer for next pathing recalculation. 
 
 
◆ player
Target to chase / flee from. 
 
 
◆ recalc_frame_interval
  
  | 
        
          | int godot::Drone::recalc_frame_interval {10} |  | private | 
 
Time between pathing recalculations. 
 
 
◆ speed
  
  | 
        
          | float godot::Drone::speed {30.f} |  | private | 
 
 
◆ state
Current state machine state. 
 
 
◆ target_distance
  
  | 
        
          | float godot::Drone::target_distance {3.f} |  | private | 
 
distance at which to drop 
 
 
The documentation for this class was generated from the following files: