//------------------------------------------------------------------------------
// Lamp : Open source game middleware
// Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------

/** @file
 * タヌー実装
 * @author Junpee
 */

#include "Core/Utility/stdafx.h"
#include "Enemy/Tanue/Tanue.h"
#include "Game/System/GameSystem.h"
#include "Game/Animation/AnimationSystem.h"
#include "Game/Sound/SoundSystem.h"
#include "Load/System/LoadTask.h"
#include "Enemy/Tanue/TanueStandState.h"

//------------------------------------------------------------------------------
// コンストラクタ
Tanue::Tanue(int health, u_int randomSeed) : Enemy(health, randomSeed){
	String name("Tanue");
	// モデルの初期化
	initializeModel(name, "Sippo2", "Mune", 0);

	// アニメーションの初期化
	initializeAnimation(name);

	// コリジョンノードの初期化
	initializeCollision(name, 7.f, 8.f);

	// 初期状態の設定
	TanueState* state = new TanueStandState(this);
	setState(state);

	// 生成音
	getSoundSystem()->play("TanueGenerate");
}
//------------------------------------------------------------------------------
// デストラクタ
Tanue::~Tanue(){
}
//------------------------------------------------------------------------------
// ロード
void Tanue::load(SceneNode* enemyNode){
	LoadTask* loadTask = getGameSystem()->getLoadTask();
	// ロードタスクの登録
	loadTask->requestScene(
		"Media/Enemy/Tanue/Tanue.bsn", getScene(), enemyNode);
	loadTask->requestAnimation("Media/Enemy/Tanue/Tanue.bam",
		getAnimationManager(), getScene());
}
//------------------------------------------------------------------------------
