- [NEW] actor::getLast()
This commit is contained in:
@@ -23,6 +23,14 @@ namespace actor
|
|||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actor_t *getLast()
|
||||||
|
{
|
||||||
|
if (!first) return nullptr;
|
||||||
|
actor_t *last = first;
|
||||||
|
while(last->next) last = last->next;
|
||||||
|
return last;
|
||||||
|
}
|
||||||
|
|
||||||
actor_t *getSelected()
|
actor_t *getSelected()
|
||||||
{
|
{
|
||||||
return selected;
|
return selected;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define FLAG_NOEDITOR 1024 // No es seleccionable a l'editor (son les portes)
|
#define FLAG_NOEDITOR 1024 // No es seleccionable a l'editor (son les portes)
|
||||||
|
|
||||||
#define FLAG_SENSIBLE 6 // PUSHABLE or REACTIVE
|
#define FLAG_SENSIBLE 6 // PUSHABLE or REACTIVE
|
||||||
|
#define FLAG_IGNORE 1025 // HERO or NOEDITOR
|
||||||
|
|
||||||
// Direcció de espenta
|
// Direcció de espenta
|
||||||
#define PUSH_NONE 0
|
#define PUSH_NONE 0
|
||||||
@@ -80,6 +81,9 @@ namespace actor
|
|||||||
// Torna el primer actor de la llista
|
// Torna el primer actor de la llista
|
||||||
actor_t *getFirst();
|
actor_t *getFirst();
|
||||||
|
|
||||||
|
// Torna l'últim actor de la llista
|
||||||
|
actor_t *getLast();
|
||||||
|
|
||||||
// Torna el actor seleccionat a l'editor
|
// Torna el actor seleccionat a l'editor
|
||||||
actor_t *getSelected();
|
actor_t *getSelected();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user