1#include "Game/LiveActor/LiveActorGroup.hpp"
2#include "Game/LiveActor/LiveActor.hpp"
3#include "Game/Util.hpp"
5LiveActorGroup::LiveActorGroup(
const char *pName,
int count) :
NameObjGroup(pName, count) {
9void LiveActorGroup::registerActor(
LiveActor *pActor) {
13LiveActor* LiveActorGroup::getActor(
int idx)
const {
14 return static_cast<LiveActor*
>(mObjects[idx]);
17LiveActor* LiveActorGroup::getDeadActor()
const {
18 for (s32 i = 0; i < mObjectCount; i++) {
20 if (MR::isDead(actor)) {
21 return static_cast<LiveActor*
>(mObjects[i]);
28s32 LiveActorGroup::getLivingActorNum()
const {
30 for (s32 i = 0; i < mObjectCount; i++) {
33 if (!MR::isDead(actor)) {
41void LiveActorGroup::appearAll() {
42 for (s32 i = 0; i < mObjectCount; i++) {
43 if (!MR::isDead(
static_cast<LiveActor*
>(mObjects[i]))) {
44 static_cast<LiveActor*
>(mObjects[i])->appear();
49void LiveActorGroup::killAll() {
50 for (s32 i = 0; i < mObjectCount; i++) {
51 static_cast<LiveActor*
>(mObjects[i])->kill();
The basis of a drawable actor that can contain states (see: Nerve)
Class that can contain multiple NameObj instances stored in a group.