#include "GObjectManager.h"

//#include <algorithm>
#ifdef _DXLIB
#include "GStaticDataDX.h"
#else
#include "GStaticData.h"
#endif

using namespace std;
using namespace GEnum;

GObjectManager::GObjectManager(){

	this->m_nPlayingIndex = 0;

	for( int i = 0; i < PLAYER_MAX_NUM; i ++ ) {
		this->m_aryPlayerList[i].m_nForceID = i;
	}
	char* PLAYER_NAME_LABELS[256] = {
		"えびげん",
		"ターニャ",
		"トリラーマ",
		"アンデルセン",
		"タイツ",
		"ペセル",
		"ガルーダ",
		"早栗",
		"ターニャ（幼女）",
		"のい",
		"えりん",
		"フォボ子",
		"λ",
		"・θ・",
		"⊿",
	};
	for( int i = 0; i < PlayerType::MAX_NUM; i ++ ) {
		// 設定（TODO：ファイルから読み込み）
		HPLPlayerSetting setting;
		setting.m_strName = string( PLAYER_NAME_LABELS[i] );
		this->m_vecPlayerSettings.push_back( setting );
	}
	
}
void GObjectManager::setup() {
	for( int i = 0; i < PLAYER_MAX_NUM; i ++ ) {
		this->m_aryPlayerList[i].setup();
		this->m_aryPlayerList[i].changeType(i);
	}
}

GObjectManager::~GObjectManager(){

}

/**
	remove all objects except player
*/
void GObjectManager::clear(){
	this->m_EnemyManager.getList()->clear();
	this->m_EffectManager.getList()->clear();
	this->m_ShotManager.getList()->clear();
}
