Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
Squad Class Reference

#include <squad.h>

Inheritance diagram for Squad:
[legend]
Collaboration diagram for Squad:
[legend]

Public Member Functions

 Squad (Ship *leader=nullptr)
 
Shipleader ()
 
void setLeader (Ship *leader)
 
std::shared_ptr< AiGroupTasktask ()
 
void setTask (std::shared_ptr< AiGroupTask > task)
 
const std::vector< Ship * > & members ()
 
- Public Member Functions inherited from Scriptable
int scriptKey () const
 
void setScriptKey (int key)
 
bool isScriptLocal () const
 
void setScriptLocal (bool local)
 

Protected Member Functions

void onMemberJoin (Ship *member)
 
void onMemberLeave (Ship *member)
 
glm::vec3 formationPositionFor (Ship *member)
 
glm::vec3 formationUpFor (Ship *member)
 
void chooseNewLeader ()
 
glm::vec3 calculateFormationPosition (Ship *member, int position)
 

Protected Attributes

Shipm_leader
 
std::vector< Ship * > m_members
 
std::shared_ptr< AiGroupTaskm_task
 
- Protected Attributes inherited from Scriptable
int m_key
 
bool m_local
 

Friends

class SquadLogic
 

Additional Inherited Members

- Static Public Attributes inherited from Scriptable
static const int INVALID_KEY = -1
 

Detailed Description

Ships can be joined to Squads to give them AiGroupTasks. The Squad's leader is the one to execute the Squad's task.


The documentation for this class was generated from the following files: