/*************************************************************//** * * @brief 生成処理を行う * @param 射撃者 * @param インデックス * @param 情報 * @return 銃 * ****************************************************************/ C_BaseGun* C_OptionSmallBeamGunFactory::Create(C_Shooter* pShooter, int32_t index, void* pData) { // プレイヤーの情報を取得 assert(JSON::C_JsonObjectManager::s_GetInstance()->GetJsonObject(ID::JSON::s_pSMALL_BEAM_OPTION)); auto pOptionData = JSON::C_JsonObjectManager::s_GetInstance()->GetJsonObject(ID::JSON::s_pSMALL_BEAM_OPTION).get(); auto pGun = newEx C_NormalGun(pShooter); auto direction = Physics::Vector3(static_cast<float>((*pOptionData)["GunDatas"][index]["Direction"][0].GetValue<JSON::Real>()), static_cast<float>((*pOptionData)["GunDatas"][index]["Direction"][1].GetValue<JSON::Real>()), static_cast<float>((*pOptionData)["GunDatas"][index]["Direction"][2].GetValue<JSON::Real>())); auto offsetFromShooter = Physics::Vector3(static_cast<float>((*pOptionData)["GunDatas"][index]["OffsetFromShooter"][0].GetValue<JSON::Real>()), static_cast<float>((*pOptionData)["GunDatas"][index]["OffsetFromShooter"][1].GetValue<JSON::Real>()), static_cast<float>((*pOptionData)["GunDatas"][index]["OffsetFromShooter"][2].GetValue<JSON::Real>())); pGun->SetShotLogic(newEx C_InputShotLogic((*pOptionData)["GunDatas"][index]["ShotInterval"].GetValue<JSON::Integer>())); pGun->SetBulletId((*pOptionData)["GunDatas"][index]["BulletId"].GetValue<JSON::String>()); pGun->SetBulletPower(newEx C_BasePower((*pOptionData)["GunDatas"][index]["BulletPower"].GetValue<JSON::Integer>())); auto pMoveLogic = newEx C_RigidBodyStraightMoveLogic; pMoveLogic->SetDirection(direction); pMoveLogic->SetMovement(static_cast<float>((*pOptionData)["GunDatas"][index]["BulletMovement"].GetValue<JSON::Real>())); pGun->SetBulletMoveLogic(pMoveLogic); pGun->SetOffsetFromShooter(offsetFromShooter); pGun->SetDirection(direction); return pGun; }
/*************************************************************//** * * @brief 生成処理を行う * @param なし * @return 銃 * ****************************************************************/ C_BaseGun* C_Stage01BossGunFactory01::Create(C_Shooter* pShooter) { auto pGun = newEx C_NormalGun(pShooter); pGun->SetShotLogic(newEx C_EvenIntervalShotLogic(90, 30, C_EvenIntervalShotLogic::s_INFINITE_SHOT_COUNT)); pGun->SetBulletId(GameObjectDefine::Id::s_STAGE_01_BOSS_NORMAL_BULLET); pGun->SetBulletPower(newEx C_BasePower(300)); pGun->SetBulletMoveLogic(newEx C_StraightMoveLogic(0.09f, 1.0f, UtilityMath::S_Vector3<>::s_DOWN_DIRECTION)); pGun->SetShotOffset(UtilityMath::S_Vector3<>(1.2f, -2.2f, 0.0f)); pGun->SetAutoBulletFowardDirectionFlag(false); return pGun; }
/*************************************************************//** * * @brief 生成処理を行う * @param なし * @return 銃 * ****************************************************************/ C_BaseGun* C_Stage01BossGunFactory02::Create(C_Shooter* pShooter) { auto pGun = newEx C_RapidFireGun(pShooter, 40); // TODO 無駄なのでなんらかで対処すること pGun->SetShotLogic(newEx C_ArbitraryShotLogic(1, [](){ return true; })); pGun->SetBulletId(GameObjectDefine::Id::s_STAGE_01_BOSS_LASER_BULLET); pGun->SetBulletPower(newEx C_BasePower(1000)); pGun->SetBulletMoveLogic(newEx C_StraightMoveLogic(0.3f, 1.0f, UtilityMath::S_Vector3<>::s_DOWN_DIRECTION)); pGun->SetShotOffset(UtilityMath::S_Vector3<>(0.0f, -2.2f, 0.0f)); pGun->SetAutoBulletFowardDirectionFlag(false); return pGun; }