Ejemplo n.º 1
0
static void UpdateFadeIn()
{
    UpdateNormal();
    
    if ( g_color_table[3] < GLOW_FACTOR )
        g_color_table[3]++;
}
Ejemplo n.º 2
0
void CGeoTri::Init()
{
	UpdateMid();
	UpdateArea();
	if( m_fArea != 0.0f )
		UpdateNormal();
	else
		m_oNormal.Clear();
}
Ejemplo n.º 3
0
//=========================================================
// Procesa la música
//=========================================================
void CAP_DirectorMusic::Update()
{
	BaseClass::Update();

	if ( InRules->IsGameMode(GAME_MODE_SURVIVAL) )
		UpdateSurvival();
	else
		UpdateNormal();
}
Ejemplo n.º 4
0
void Vertex::UpdateVertex(float deltaTime, float volumeCompensatCoe, float contactAngle)
{
	UpdateNormal();
	UpdateCoverArea();
	
	if(!isOnASurface)
		ApplyVolumeCompensation(volumeCompensatCoe, deltaTime);
	if(!isOnASurface)
		ApplyGravity(deltaTime);
	//if(!isOnASurface)
		ApplySurfaceTension(deltaTime);
	ApplyRestrict(contactAngle);
}
Ejemplo n.º 5
0
	long SmtWater::Create(LP3DRENDERDEVICE p3DRenderDevice)
	{
		if (NULL == p3DRenderDevice)
		{
			return SMT_ERR_INVALID_PARAM;
		}

		m_pVertexBuffer = p3DRenderDevice->CreateVertexBuffer(2*(CST_INT_GRID_HEIGHT-1) * CST_INT_GRID_WIDTH,VF_XYZ|VF_DIFFUSE| VF_NORMAL|VF_TEXCOORD,false);
	
		m_aAbb.vcMax.Set(0,0,0);
		m_aAbb.vcMin.Set(0,0,0);
		m_aAbb.vcMax += (CST_INT_GRID_HEIGHT/2.)*m_fXScale;
		m_aAbb.vcMin += -(CST_INT_GRID_HEIGHT/2.)*m_fZScale;
		m_aAbb.vcCenter += (m_aAbb.vcMax+m_aAbb.vcMin)/2.;

		return SMT_ERR_NONE;
		//////////////////////////////////////////////////////////////////////////
		int x,y,index = 0;	
		double dx, dy, d;

		for(y = 0; y<CST_INT_GRID_HEIGHT; y++)
		{
			for(x = 0; x<CST_INT_GRID_WIDTH; x++)
			{
				dx = (double)(x-CST_INT_GRID_WIDTH/2);
				dy = (double)(y-CST_INT_GRID_HEIGHT/2);
				d = sqrt( dx*dx + dy*dy );
				if(d < 0.1 * (double)(CST_INT_GRID_WIDTH/2))
				{
					d = d * 10.0;
					p[x][y] = -cos(d * (PI / (double)(CST_INT_GRID_WIDTH * 4))) * 100.0;
				}
				else
				{
					p[x][y] = 0.0;
				}
				vx[x][y] = 0.0;
				vy[x][y] = 0.0;
			}
		}

		UpdateVertex();
		UpdateNormal();
		UpdateTexcoord();
		//
		UpdateVB();

		return SMT_ERR_NONE;
	}
Ejemplo n.º 6
0
static void UpdateMirrorsMove()
{
    if ( g_color_table[3] > GLOW_FACTOR )
        g_color_table[3] -= 2;
    if ( g_mirror_show_flash )
    {
        g_mirror_show_flash = false;
        g_color_table[3] = 206;
    }
    
    UpdateNormal();
    
    UpdateMirrors();
    DrawMirrors();
}
Ejemplo n.º 7
0
//-----------------------------------------------------------------------------
//! 更新
//-----------------------------------------------------------------------------
void EnemyLeader::UpdateByCommand()
{
	
	// 一定距離はなれていなければ
	if( (_goalPos - _position).length() <= 3000.0f && !_goGoal){
		
		// ターゲットの検索、設定
		EnemyBase::searchAndSetTarget();

		
		// キーの更新
		_key->Update();

		//---- キャラの移動
		Vector3	StickState = _key->getVector();
		
		// スティック操作がされていたら
		if( abs(atan2f(StickState._x, StickState._z) ) > 0.0f )
		{
			_rotation._y = atan2f( StickState._x, StickState._z );
			_speed = _myStatus->getParam()->_speedMAX;
		}else{
			_speed = 0.0f;
		}
	}else{
		UpdateNormal(_goalPos);
	}

	// 当たり判定とダメージ計算
	s32 damage = EnemyBase::calcDamageAndCollision();
	
	s32 currentAnimation = _pTaskModel->getAnimation();

	if( damage > 0 ) {
		Damage(damage);
		// ダメージアニメーションへ
		_pTaskModel->setAnimation(_aniDamage);
	}else if( currentAnimation == _aniDamage ){
		_isDamage = false;
	}
	
	_pTaskModel->update();
		
}
Ejemplo n.º 8
0
	long SmtWater::Init(Vector3& vPos,SmtMaterial&matMaterial,const char* szTexName)
	{
		Smt3DObject::Init(vPos,matMaterial,szTexName);

		m_fTexOffset = 0;

		//////////////////////////////////////////////////////////////////////////
		int x,y,index = 0;	
		/* place the vertices in a grid */
		for(y=0;y<CST_INT_GRID_HEIGHT;y++)
			for(x=0;x<CST_INT_GRID_WIDTH;x++)
			{
				index = y*CST_INT_GRID_WIDTH + x;
				wvertex[index].x = (x-CST_INT_GRID_WIDTH/2)*m_fXScale;
				wvertex[index].y = (y-CST_INT_GRID_HEIGHT/2)*m_fZScale;
				wvertex[index].z = 0;
				wvertex[index].r = 0.7;
				wvertex[index].g = 0.8;
				wvertex[index].b = 0.7;
				wvertex[index].u = y;
				wvertex[index].v = x;
			}

		//////////////////////////////////////////////////////////////////////////
		for(y = 0; y<CST_INT_GRID_HEIGHT; y++)
		{
			for(x = 0; x<CST_INT_GRID_WIDTH; x++)
			{
				p[x][y] = 0.0;
				vx[x][y] = 0.0;
				vy[x][y] = 0.0;
			}
		}

		UpdateVertex();
		UpdateNormal();

		UpdateTexcoord();

		return SMT_ERR_NONE;
	}
Ejemplo n.º 9
0
void Connection::UpdateDelay( int idx, data_type act, data_type mu, data_type backAct, data_type &dw_sum )
{
	// only update if delay has passed
	if ( mTime == mDelay ) UpdateNormal( idx, act, mu, backAct, dw_sum );
}
Ejemplo n.º 10
0
void IStage::step()
{
	//*
	switch (phase_)
	{
	case IStage::Phase::CLEAR_ANNOUNCE:
		if (UpdateClearAnnounce())
		{
			phase_ = IStage::Phase::NORMAL;
		}
		/*
		switch (clearType_)
		{
		case IStage::ClearType::GOAL:
		break;
		case IStage::ClearType::ANNIHILATION:
		break;
		default:
		break;
		}
		//*/
		break;
	case IStage::Phase::NORMAL:
		for (auto& ap : stage_[0].actionPoints)
			ap->step();
		if (UpdateNormal())
		{
			nextPhase_ = IStage::Phase::BOSS;
			phase_ = IStage::Phase::FADE_OUT;
			fadeOutTime_ = 0.3f;
			fadeInTime_ = 0.3f;
			CFade::ChangeColor(0xff000000);
			CFade::StartFadeOut();
		}
		break;
	case IStage::Phase::FADE_OUT:
		if (CFade::FadeOut(255.f / fadeOutTime_*system::FrameTime))
		{
			phase_ = IStage::Phase::FADE_IN;
			CFade::StartFadeIn();
		}
		break;
	case IStage::Phase::FADE_IN:
		if (CFade::FadeIn(255.f / fadeInTime_*system::FrameTime))
		{
			phase_ = nextPhase_;
		}
		break;
	case IStage::Phase::BOSS:
		for (auto& ap : stage_[1].actionPoints)
			ap->step();
		if (UpdateBoss())
		{
			nextPhase_ = IStage::Phase::RESULT;
			phase_ = IStage::Phase::FADE_OUT;
			fadeOutTime_ = 0.7f;
			fadeInTime_ = 0.3f;
			CFade::ChangeColor(0xffffffff);
			CFade::StartFadeOut();
		}
		break;
	}
	if (input::CheckPush(input::KEY_BTN0))
	{
		phase_ = IStage::Phase::RESULT;
	}
}
Ejemplo n.º 11
0
//////////////////////////////////////////////////////////////////////////
//	render
//////////////////////////////////////////////////////////////////////////
void RCharCloth::render()
{     
	//	bHarewareBuffer = true;
	int i;

	LPDIRECT3DDEVICE9 dev =	RGetDevice(); // Get Device Pointer

	UpdateNormal();

	RMtrlMgr* pMtrlMgr = &mpMeshNode->m_pParentMesh->m_mtrl_list_ex;
	RMtrl* pMtrl = pMtrlMgr->Get_s(mpMeshNode->m_mtrl_id,-1);
	int num_mtrl = pMtrl->m_sub_mtrl_num;

	int point_index;		// 현재 버텍스의 인덱스

	for( i = 0 ; i < mpMeshNode->m_face_num ; ++i )
	{
		for( int j = 0 ; j < 3; ++j )
		{
			point_index = mpMeshNode->m_face_list[i].m_point_index[j];
			gVertices[3*i+j].p	= m_pX[point_index];
			gVertices[3*i+j].tu	= mpMeshNode->m_face_list[i].m_point_tex[j].x;
			gVertices[3*i+j].tv	= mpMeshNode->m_face_list[i].m_point_tex[j].y;
			gVertices[3*i+j].n	= m_pNormal[point_index];
		}
	}	

	if( bHarewareBuffer && gpClothVertexBuffer)
	{
		//// Copy Begin
		void *Buffer;
		if( FAILED( gpClothVertexBuffer->Lock( 0, sizeof(RVertex) * mpMeshNode->m_face_num * 3, (VOID**)&Buffer, D3DLOCK_DISCARD )))
		{
			bHarewareBuffer = false;
			REL( gpClothVertexBuffer );

			mlog("Fail to lock of Vertex Buffer\n");
			goto e2SoftRender;
		}
		//memcpy( Buffer, gVertices, sizeof(RVertex) * m_nCntP );
		memcpy( Buffer, gVertices, sizeof(RVertex) * mpMeshNode->m_face_num * 3 );

		gpClothVertexBuffer->Unlock();
		// Copy End
	}
e2SoftRender:
	prerender();

	if(mpMesh->m_pVisualMesh)
		mpMesh->m_pVisualMesh->UpdateLight();

	rmatrix rtemp;
	dev->GetTransform( D3DTS_WORLD, &rtemp );
	dev->SetTransform( D3DTS_WORLD ,  &( mLocalMat * mWorldMat ) );

	mpMesh->SetCharacterMtrl_ON( pMtrl,mpMeshNode,1 ,mpMeshNode->GetTColor());

#ifdef USE_TOON_RENDER

	mpMeshNode->ToonRenderSettingOn(pMtrl);	

#endif

	if( bHarewareBuffer )
	{			
		dev->DrawPrimitive( D3DPT_TRIANGLELIST, 0, mpMeshNode->m_face_num );
	}
	else
	{
		dev->DrawPrimitiveUP( D3DPT_TRIANGLELIST, mpMeshNode->m_face_num, gVertices, sizeof(RVertex));
	}

#ifdef USE_TOON_RENDER

//	if(Silhouette)
	{
		mpMeshNode->ToonRenderSilhouetteSettingOn();

		if( bHarewareBuffer )
			dev->DrawPrimitive( D3DPT_TRIANGLELIST, 0, mpMeshNode->m_face_num );
		else
			dev->DrawPrimitiveUP( D3DPT_TRIANGLELIST, mpMeshNode->m_face_num, gVertices, sizeof(RVertex));

		mpMeshNode->ToonRenderSilhouetteSettingOff();
	}

	mpMeshNode->ToonRenderSettingOff();	

#endif

	mpMesh->SetCharacterMtrl_OFF( pMtrl, 1 );
	dev->SetTransform( D3DTS_WORLD, &rtemp );

	postrender();

}
Ejemplo n.º 12
0
//////////////////////////////////////////////////////////////////////////
//	create
//////////////////////////////////////////////////////////////////////////
bool RCharCloth::create( RMesh* pMesh_, RMeshNode* pMeshNode_ )
{
	mpMesh = pMesh_;
	mpMeshNode = pMeshNode_;

	int i;
	rvector vecDistance;

	// vertex copy
	m_nCntP = mpMeshNode->m_point_num;
	m_nCntC = mpMeshNode->m_face_num * 3 ;

	m_pX			= new rvector[m_nCntP];
	m_pOldX			= new rvector[m_nCntP];
	m_pForce		= new rvector[m_nCntP];
	m_pHolds		= new int    [m_nCntP];
	m_pWeights		= new float  [m_nCntP];
	m_pNormal		= new rvector[m_nCntP];
	mpInitNormal	= new rvector[m_nCntP];

	m_pConst		= new sConstraint[m_nCntC];

	memset( m_pX		, 0, sizeof(rvector) * m_nCntP );
	memset( m_pOldX		, 0, sizeof(rvector) * m_nCntP );
	memset( m_pForce	, 0, sizeof(rvector) * m_nCntP );
	memset( m_pHolds	, 0, sizeof(int)	 * m_nCntP );
	memset( m_pWeights	, 0, sizeof(float)   * m_nCntP );
	memset( m_pNormal	, 0, sizeof(rvector) * m_nCntP );
	memset( mpInitNormal, 0, sizeof(rvector) * m_nCntP );

	memset( m_pConst, 0, sizeof(sConstraint)*m_nCntC);

	//unsigned short* TempIndexBuf = new unsigned short[mpMeshNode->m_face_num*3];

	for( i = 0 ; i < mpMeshNode->m_face_num; ++i )
	{
		for( int j = 0 ; j < 3; ++j )
		{
			m_pConst[ i*3 + j ].refA = mpMeshNode->m_face_list[i].m_point_index[j];
			if( j + 1 >= 3 )
			{
				m_pConst[ i*3 + j ].refB = mpMeshNode->m_face_list[i].m_point_index[0];
			}
			else
			{
				m_pConst[ i*3 + j ].refB = mpMeshNode->m_face_list[i].m_point_index[j+1];
			}
			vecDistance = mpMeshNode->m_point_list[m_pConst[ i*3 + j ].refA] - mpMeshNode->m_point_list[m_pConst[ i*3 + j ].refB];
			m_pConst[ i*3 + j ].restLength = D3DXVec3Length(&vecDistance);

		}
	}

	UpdateNormal();

	// Render Vertex setup
	m_nNumVertices = 3 * mpMeshNode->m_face_num;
	//gVertices	= new RVertex[ m_nNumVertices ];

	// Vertex Buffer Setup)

	if (!initialize())
		return false;

	mInitParticle	= true;

	OnRestore();

	return true;
}
Ejemplo n.º 13
0
//////////////////////////////////////////////////////////////////////////
//	Render
//////////////////////////////////////////////////////////////////////////
void ZClothEmblem::render()
{
 //	if( !isInViewFrustum( &mAABB, RGetViewFrustum() ) )	
	//{
	//	return;
	//}
//	if(g_pGame==NULL || !ZGetGame()->GetWorld()->GetBsp()->IsVisible(mAABB)) return;

	if( !mbIsInFrustrum ) return;

	int		i, index;

	UpdateNormal();

	//memset(g_Cloth_Buffer,0, sizeof(RVertex)*MAX_NUM_CLOTH_PARTICLE*3 );

	//for( i = 0 ; i < mpMeshNode->m_point_num; ++i )
	//{
	//	g_Cloth_Buffer[i].p	= m_pX[i];
	//	g_Cloth_Buffer[i].n	= m_pNormal[i];
	//}

 //   for( i = 0 ; i < mpMeshNode->m_face_num; ++i )
	//{
	//	for( int j = 0 ; j < 3; ++j )
	//	{
	//		index	= mpMeshNode->m_face_list[i].m_point_index[j];
	//		g_Cloth_Buffer[index].tu	= mpMeshNode->m_face_list[i].m_point_tex[j].x;
	//		g_Cloth_Buffer[index].tv	= mpMeshNode->m_face_list[i].m_point_tex[j].y;
	//		g_index_buffer[i*3+j] = index;
	//	}
	//}
	for( i = 0 ; i < mpMeshNode->m_face_num; ++i )
	{
		for( int j = 0 ; j < 3; ++j )
		{
			index	= mpMeshNode->m_face_list[i].m_point_index[j];
			g_Cloth_Buffer[3*i+j].p	= m_pX[index];
			g_Cloth_Buffer[3*i+j].n	= m_pNormal[index];
			g_Cloth_Buffer[3*i+j].tu = mpMeshNode->m_face_list[i].m_point_tex[j].x;
			g_Cloth_Buffer[3*i+j].tv = mpMeshNode->m_face_list[i].m_point_tex[j].y;
//			g_index_buffer[i*3+j] = index;
		}
	}

	D3DMATERIAL9	mtrl;
	mtrl.Ambient.r	= 1.f;	mtrl.Ambient.g	= 1.f;	mtrl.Ambient.b	= 1.f;	mtrl.Ambient.a	= 0.f;	
	mtrl.Diffuse.r	= 1.0f;	mtrl.Diffuse.g	= 1.0f;	mtrl.Diffuse.b	= 1.0f;	mtrl.Diffuse.a	= 1.f;
	mtrl.Specular.r	= 0.f;	mtrl.Specular.g	= 0.f;	mtrl.Specular.b	= 0.f;	mtrl.Specular.a	= 0.f;
	mtrl.Emissive.r	= 0.f;	mtrl.Emissive.g	= 0.f;	mtrl.Emissive.b	= 0.f;	mtrl.Emissive.a	= 0.f;
	mtrl.Power	= 0.0f;
	RGetDevice()->SetMaterial( &mtrl );

	RMtrlMgr* pMtrlMgr	= &mpMeshNode->m_pParentMesh->m_mtrl_list_ex;
	RMtrl* pMtrl		= pMtrlMgr->Get_s(mpMeshNode->m_mtrl_id,-1);
	RGetDevice()->SetTexture( 0, pMtrl->GetTexture() );
	RGetDevice()->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
	RGetDevice()->SetRenderState( D3DRS_SPECULARENABLE, FALSE );

	RGetDevice()->SetRenderState( D3DRS_AMBIENT, 0x00555555 );
	RGetShaderMgr()->setAmbient( 0x00555555 );

	RGetDevice()->SetRenderState( D3DRS_LIGHTING, TRUE );
	RGetDevice()->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
	RGetDevice()->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
	RGetDevice()->SetLight( 0, mpLight );
	RGetDynamicLightManager()->SetLight( m_pX[0], 1, LIGHT_DISTANCE );

	rmatrix Identity;
	D3DXMatrixIdentity( &Identity );
	RGetDevice()->SetTransform( D3DTS_WORLD, &Identity );

	RGetDevice()->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
 	RGetDevice()->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );
	RGetDevice()->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
	RGetDevice()->SetRenderState( D3DRS_ZWRITEENABLE, TRUE );

	RGetDevice()->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );
	RGetDevice()->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );
	RGetDevice()->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_TEXTURE );

	RGetDevice()->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
	RGetDevice()->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );

	RGetDevice()->SetRenderState( D3DRS_FILLMODE, D3DFILL_SOLID );

	RGetDevice()->LightEnable( 0, TRUE );
	RGetDevice()->LightEnable( 1, FALSE );

	RGetDevice()->SetFVF( RVertexType );
	//RGetDevice()->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME );
	
	if( bHardwareBuffer )
	{
		// TODO: 무조건 DISCARD 로 lock할것이 아니라, nooverwrite 로 적절히 낭비되지않도록해주자.
		VOID* pVertex;
		if( FAILED( g_hw_Buffer->Lock( 0,  mpMeshNode->m_point_num * 3 * sizeof(RVertex), (VOID**)&pVertex, D3DLOCK_DISCARD )))
		{
			mlog(" Fail to Lock Emblem hw buffer.. Check Buffer Size.. \n" );
			bHardwareBuffer = false;
			return;
		}
		memcpy( pVertex, g_Cloth_Buffer, mpMeshNode->m_face_num*3 * sizeof(RVertex) );
		if( FAILED( g_hw_Buffer->Unlock() ))
		{
			mlog(" Fail to unLock Emblem hw buffer.. Check Buffer Size.. \n" );
			bHardwareBuffer = false;
			return;
		}

		RGetDevice()->SetStreamSource( 0, g_hw_Buffer, 0, sizeof(RVertex) );
		//RGetDevice()->SetIndices( mIndexBuffer);
		//RGetDevice()->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0, mpMeshNode->m_point_num, 0, mpMeshNode->m_face_num );
		RGetDevice()->DrawPrimitive(D3DPT_TRIANGLELIST,0,mpMeshNode->m_face_num);
	}
	else
	{
 		//RGetDevice()->DrawIndexedPrimitiveUP( D3DPT_TRIANGLELIST, 0, mpMeshNode->m_point_num, mpMeshNode->m_face_num, g_index_buffer, D3DFMT_INDEX16, g_Cloth_Buffer, sizeof(RVertex) );
		RGetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLELIST, mpMeshNode->m_face_num, g_Cloth_Buffer, sizeof(RVertex) );
	}	

	RGetDevice()->LightEnable( 0, FALSE );
	RGetDevice()->LightEnable( 1, FALSE );
	
	//{
	//	static testv v[1000];
	//	for( int i = 0; i < m_nCntP; ++i )
	//	{
	//		v[2*i].n = m_pX[i];
	//		v[2*i].c	= 0xffffffff;
	//		v[2*i + 1].n = m_pX[i] + mpNormal[i] * 50.f;
	//		v[2*i + 1].c	= 0xffffffff;
	//	}
	//	RGetDevice()->SetFVF( testvFVF );
	//	RGetDevice()->DrawPrimitiveUP( D3DPT_LINELIST, m_nCntP, v, sizeof(testv) );
	//}
}
Ejemplo n.º 14
0
//-----------------------------------------------------------------------------
//! 更新(コマンドによって変わる)(今はかわらない)
//-----------------------------------------------------------------------------
void AllyHealer::UpdateByCommand()
{

	//---- プレイヤー情報取得
	Player*	pPlayer   = IObjDataManager()->_pPlayer;
	Vector3 playerPos = pPlayer->getPosition();

	// 回復中なら更新しない
	if( !_isHeal ) {
		// ターゲットの検索、設定
		if( searchAndSetTarget() )
		{
			// ターゲットが見つからなければ
			_keyUpdate = false;
		}
	}


	s32	currentAnimation = _pTaskModel->getAnimation();
		
	// プレイヤーの周りにいるならば
	if( _keyUpdate ){
		
		// キーの更新
		_key->Update();

		// 角度を求める
		// 3D上ではxzの順番で角度が求められる
		Vector3	StickState = _key->getVector();
	
		// ヒールコマンドがONならヒールする
		if( _key->getPushState("Heal") )
		{
			// 攻撃アニメーション再生(1はヒール)
			_pTaskModel->setAnimation(_aniHeal);
		}else if ( currentAnimation == _aniHeal ) {
			// ヒール再生中なら
			// 再生比率取得
			f32	aniRate = _pTaskModel->getAnimationRate();
			// 再生が半分いったら
			if( aniRate >= 0.1f && !_isHeal) {
				// ヒール
				Heal(_target);
			}
		}else{
			_isHeal = false;
		}


		// 移動があれば更新
		if( abs(atan2f(StickState._x, StickState._z) ) > 0.0f )
		{
			_rotation._y = atan2f( StickState._x, StickState._z );
			Status::Param* myParam = _myStatus->getParam();
			_speed = myParam->_speedMAX;
		}else{
			_speed = 0.0f;
		}

	} else {
		// それ以外は通常通り
		UpdateNormal(playerPos);
	}

	// 当たり判定処理とダメージ計算
	s32 damage = calcDamageAndCollision();


	if( damage > 0 ) {
		// ダメージ処理
		Damage(damage);
		_pTaskModel->setAnimation(_aniDamage);
	}else if( currentAnimation == _aniDamage ){
		_isDamage = false;
	}
	_pTaskModel->update();
}