示例#1
0
// 方向の取得
Vector2DF Controller::GetDirection() const
{
	Vector2DF direction;

	direction.y = -mpController->GetPower( Engine::Input::CONTROLLER_AXIS_01_MINUIS );
	direction.y = direction.y + mpController->GetPower( Engine::Input::CONTROLLER_AXIS_01_PLUS );
	direction.x = -mpController->GetPower( Engine::Input::CONTROLLER_AXIS_02_MINUIS );
	direction.x = direction.x + mpController->GetPower( Engine::Input::CONTROLLER_AXIS_02_PLUS );

	if( direction.GetAbs() > 1.0f )
	{
		direction.Normalize();
	}

	return direction;
}