//**************************** // DOWNSAMPLE //**************************** void Deferred::CtrlExposure() { // 露光度 if (KeyBoard(KB_C)) { // 動く if (KeyBoard(KB_LEFT)) { m_fExposure -= 0.1f; } else if(KeyBoard(KB_RIGHT)) { m_fExposure += 0.1f; } } // 動く if (KeyBoard(KB_P)) { m_fExposure -= 0.05f; } else if (KeyBoard(KB_O)) { m_fExposure += 0.05f; } tdnText::Draw(10, 600, 0xff00ffff, "露光度%.1f", m_fExposure); shader->SetValue("exposure", m_fExposure); }
//****************************************************************** // 更新・描画 //****************************************************************** bool sceneMain::Update() { PlayerCtrl(); PlayerUpdate(); SoundManager::Update(); if (KeyBoard(KB_F))cameraPos.z += 1; if (KeyBoard(KB_G))cameraPos.z -= 1; tdnView::Set(cameraPos, VECTOR_ZERO); // メッシュテスト shader3D->SetValue( "viewPosition", cameraPos ); static float meshAngle = 0; meshAngle += 0.01f; TestMesh->Rot( *D3DXQuaternionRotationYawPitchRoll( &Quaternion(), meshAngle, meshAngle * 0.9f, meshAngle * 0.7f ) ); TestMesh->Pos( Vector3( 0.0f, 0.0f, 0.0f ) ); TestMesh->UpdateWorldMatrix(); return true; }
void PlayerCtrl() { if (KeyBoardTRG(KB_DELETE)) { se->Play("イエアア"); } if (KeyBoard(KB_Y))tdnRenderState::Filter(true); if (KeyBoard(KB_U))tdnRenderState::Filter(false); if (KeyBoard(KB_Q)) player.picture->SetScale(player.picture->GetScale() - 0.1f); if (KeyBoard(KB_E)) player.picture->SetScale(player.picture->GetScale() + 0.1f); if (KeyBoard(KB_R))player.picture->SetAngle(player.picture->GetAngle() - 0.1f); if (KeyBoard(KB_T))player.picture->SetAngle(player.picture->GetAngle() + 0.1f); if (KEY(KEY_LEFT, 0) == 1) { player.x -= 6; player.Anime = Player:: RunL; // 画面半分でクロスフェード if (player.x < tdnSystem::GetScreenSize().right / 2 && player.invincible_action) { player.invincible_action = false; bgm->Cross_fade("EoE_A", "EoE_B", .01f); } } if (KEY(KEY_RIGHT, 0) == 1) { player.x += 6; player.Anime = Player:: RunR; // 画面半分でクロスフェード if (player.x > tdnSystem::GetScreenSize().right / 2 && !player.invincible_action) { player.invincible_action = true; bgm->Cross_fade("EoE_B", "EoE_A", .025f); } } if (tdnInput::KeyGet(KEY_LEFT) != 1 && tdnInput::KeyGet(KEY_RIGHT) != 1) { if (player.Anime == Player:: RunL) { player.Anime = Player:: WaitL; } if (player.Anime == Player::RunR) { player.Anime = Player::WaitR; } } };
void sceneRenderingTest::Update() { if (KeyBoardTRG(KB_7)) { g_scoreUI->Action(); } g_scoreUI->Update(); // カメラ static float cameraAngle = 0; static float cameraRange= 100; // アングル if (KeyBoard(KB_A)) { cameraAngle -= 0.1f; } if (KeyBoard(KB_D)) { cameraAngle += 0.1f; } if (KeyBoard(KB_W)) { cameraRange -= 1; } if (KeyBoard(KB_S)) { cameraRange += 1; } if (KeyBoard(KB_Q)) { m_camera.pos.y -= 1.0f; } if (KeyBoard(KB_E)) { m_camera.pos.y += 1.0f; } m_camera.pos.x = sinf(cameraAngle) * cameraRange; m_camera.pos.z = cosf(cameraAngle) * cameraRange; tdnView::Set(m_camera.pos, m_camera.target); // パーティクル更新 ParticleManager::Update(); static float lightAngle = 2.14f; // アングル if (KeyBoard(KB_R)) { lightAngle -= 0.05f; } if (KeyBoard(KB_T)) { lightAngle += 0.05f; } m_dirLight.x = sinf(lightAngle); m_dirLight.z = cosf(lightAngle); m_dirLight.y = -0.8f; // ブラー更新 DeferredManagerEx.RadialBlurUpdate(); // ポイントライト更新 PointLightMgr->Update(); if (KeyBoardTRG(KB_L)) { PointLightManager::GetInstance()->AddPointLight(Vector3(10, 3, 0), Vector3(0, 1, 1), 100, 4, 60, 20, 40); } if (KeyBoardTRG(KB_K)) { if (m_bShaderFlag) { m_bShaderFlag = false; } else { m_bShaderFlag = true; } } // g_stage->Update(); g_airou->Update(); g_airou->Animation(1.0f); static Vector3 locusPos = VECTOR_ZERO; static Vector3 locusPos2 = VECTOR_ZERO; locusPos.y = 10; locusPos2.y = 5; m_pAIROU_EF->Update(); m_pAIROU_EF->SetPos(locusPos-Vector3(0,5,0)); m_pAIROU_EF_IMP->Update(); m_pWave->Update(); m_pWind->Update(); m_pWind2->Update(); m_pGodHand->Update(); m_pSpeedLine->Update(); m_pPanel->Update(); if (KeyBoardTRG(KB_C)) { HeaveHoFinishUI->Action(); } HeaveHoFinishUI->Update(); //m_pLocus->Update(locusPos + Vector3(0, 3, 0), locusPos + Vector3(0, -3, 0)); m_pLocus->Update(); if (KeyBoard(KB_V)) { locusPos.x -= 5; locusPos2.x -= 5; m_pAIROU_EF->SetAngleAnimation(Vector3(0, 0, 1.57f) , Vector3(0, 0, 1.57f)); } if (KeyBoard(KB_B)) { locusPos.x += 5; locusPos2.x += 5; m_pAIROU_EF->SetAngleAnimation(Vector3(0, 0, -1.57f), Vector3(0, 0, -1.57f)); } if (KeyBoardTRG(KB_N)) { m_pLocus->Action(&(locusPos), &(locusPos2)); } if (KeyBoardTRG(KB_M)) { m_pLocus->Stop(); } if (KeyBoardTRG(KB_H)==1) { // かんぺき! つぎ風戦 m_pAIROU_EF_IMP->Action(Vector3(10, 0, 0), .5, 1.0f); PointLightManager::GetInstance()->AddPointLight(Vector3(10, 10, 0), Vector3(1, 0.5, 0), 125, 2, 10, 2, 6); m_pWave->Action(Vector3(10, 5, 0), 0.5, 1); m_pWind->Action(Vector3(10, 10, 0), 2.5, 3.5, Vector3(0, 0, 0), Vector3(0, 0, 0)); DeferredManagerEx.SetRadialBlur(Vector2(0, 0), 5); //for (int i = 0; i < 8; i++) //{ // PointLightManager::GetInstance()->AddPointLight(Vector3(i * 30.0f ,5, 0), Vector3(1, 0.5f, 0), 65, 2, 180, 2, 170); // PointLightManager::GetInstance()->AddPointLight(Vector3(i * 30.0f, 5, 40), Vector3(0, 1.0f, .7f), 65, 3, 180, 2, 170); //} } if (KeyBoardTRG(KB_J) == 1) { m_pPanel->Action(Vector3(0, 10, 0)); } // サイクロン if (KeyBoardTRG(KB_R) == 1) { m_pWind->Action(Vector3(0, 0, 0), 2, 6); //m_pWind2->Action(Vector3(0, -10, 0), 1.75, 3.75, Vector3(0, 1.57f, 0), Vector3(0, 1.57f, 0)); m_pGodHand->Action(Vector3(0, 0, 0), 12, 12); //m_pAIROU_EF_IMP->Action(Vector3(0, 0, 0)); m_pWave->Action(Vector3(0, 0, 0)); } // //if (KeyBoard(KB_8) == 1) //{ // Effect2DMgr.GetEffectNode(0)->LoadTexture("DATA/Effect/DamageEffect.png"); //} //if (KeyBoard(KB_9) == 1) //{ // //Effect2DMgr.GetEffectNode(1)->LoadTexture("DATA/Effect/star.png"); // Effect2DMgr.m_iSelectNodeNo++; //} //if (KeyBoard(KB_0) == 1) //{ // //Effect2DMgr.GetEffectNode(0)->LoadTexture("DATA/Effect/star.png"); // Effect2DMgr.m_iSelectNodeNo--; //} //if (KeyBoard(KB_5) == 1) //{ // Effect2DMgr.Save("さべ.hef"); //} //if (KeyBoard(KB_4) == 1) //{ // Effect2DMgr.Load("さべ.hef"); //} //if (KeyBoard(KB_T) == 1) //{ // Effect2DMgr.ChangeScreenSize(1024, 400); //} //if (KeyBoard(KB_Y) == 1) //{ // Effect2DMgr.ChangeScreenSize(256, 512); //} //Effect2DMgr.Update(); //g_fram++; //if (g_fram > 120) //{ // g_fram = 0; //} }
void sceneTutorial::PoseUpdate() { // カーソル戻す pointer->SetState(MousePointer::STATE::NOMAL); // ウェイトタイマー static int waitTimer = 0; static bool againFlag = false; // ポーズ if (KeyBoard(KB_P) == 3) { state = SCENE::MAIN; } m_again.pic->Update(); m_again.rip->Update(); m_stop.pic->Update(); m_stop.rip->Update(); // 数値 m_poseTimer.one->Update(); m_poseTimer.two->Update(); m_poseTimer.three->Update(); switch (m_poseState) { case sceneTutorial::POSE_STATE::START: // 後でSE全部ここで止めてもらお se->Stop_all(); bgm->SetVolume("MAIN", .5f); // クリックしたSE se->Play("ポーズ"); m_poseState = POSE_STATE::EXE; waitTimer = 0; againFlag = false; pointer->SetState(MousePointer::STATE::NOMAL); break; case sceneTutorial::POSE_STATE::EXE: { /***************************/ // アゲインの動き // 距離計算 float len = Math::Length((float)m_again.x + 240, (float)m_again.y + 64, tdnMouse::GetPos().x, tdnMouse::GetPos().y); if (len < 220 && 60 > abs((m_again.y + 64) - tdnMouse::GetPos().y))// +Yをカットする { // 色を実体化 m_again.pic->GetObj()->SetARGB(0xffffffff); if (m_again.isAction == false) { m_again.isAction = true; m_again.pic->Action(); // カーソルを合わせたSEの再生 se->Play("カーソル"); } // クリックすると if (tdnMouse::GetLeft() == 3) { // 選択クリック音 se->Play("CLICK"); m_again.rip->Action(); againFlag = true; } } else { m_again.pic->GetObj()->SetARGB(0xffaaaaaa); m_again.isAction = false; } //★ // わっしょいしょいのしょいのすけ if (againFlag == true) { waitTimer++; if (waitTimer > 22) { waitTimer = 0; m_poseState = POSE_STATE::COUNT; // カウントステートへ } } /****************************/ /***************************/ // ストップの動き // 距離計算 len = Math::Length((float)m_stop.x + 240, (float)m_stop.y + 64, tdnMouse::GetPos().x, tdnMouse::GetPos().y); if (len < 220 && 60 > abs((m_stop.y + 64) - tdnMouse::GetPos().y))// +Yをカットする { // 色を実体化 m_stop.pic->GetObj()->SetARGB(0xffffffff); if (m_stop.isAction == false) { m_stop.isAction = true; m_stop.pic->Action(); // カーソルを合わせたSEの再生 se->Play("カーソル"); } // クリックすると if (tdnMouse::GetLeft() == 3) { // 選択クリック音 se->Play("キャンセル"); m_stop.rip->Action(); FadeControl::Setting(FadeControl::MODE::FADE_OUT, 40.0f); m_poseState = POSE_STATE::TITLE; // タイトルステートへ } } else { m_stop.pic->GetObj()->SetARGB(0xffaaaaaa); m_stop.isAction = false; } /****************************/ } break; case sceneTutorial::POSE_STATE::COUNT: waitTimer++; if (waitTimer == 1) { m_poseTimer.three->Action(); } if (waitTimer == 32) { m_poseTimer.two->Action(); } if (waitTimer == 64) { m_poseTimer.one->Action(); } if (waitTimer == 96) { // BGMの音戻す bgm->SetVolume("MAIN", 1.0f); state = SCENE::MAIN; } break; case sceneTutorial::POSE_STATE::TITLE: // if (FadeControl::IsFade()) return; if (FadeControl::IsEndFade()) { bgm->Stop("MAIN"); state = SCENE::INIT; MainFrame->ChangeScene(new Title()); return; } break; default: break; } }