bool CEditValue::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { Ui::CEdit* pe; Ui::CButton* pc; if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventType); GlintDelete(); m_edit = new Ui::CEdit(); pe = static_cast<Ui::CEdit*>(m_edit); pe->Create(pos, dim, 0, EVENT_NULL); pe->SetMaxChar(4); m_buttonUp = new Ui::CButton(); pc = static_cast<Ui::CButton*>(m_buttonUp); pc->Create(pos, dim, 49, EVENT_NULL); // ^ pc->SetRepeat(true); m_buttonDown = new Ui::CButton(); pc = static_cast<Ui::CButton*>(m_buttonDown); pc->Create(pos, dim, 50, EVENT_NULL); // v pc->SetRepeat(true); MoveAdjust(); return true; }
bool CScroll::Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { if ( eventMsg == EVENT_NULL ) eventMsg = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventMsg); MoveAdjust(); return true; }
//============================================================================ //処理 //============================================================================ void CCharacter::Exec() { //移動処理 if( !this->GetStopFlag() ) { Move(); } //移動補正 MoveAdjust(); //状態毎の処理 StateExec(); CSprite::Exec(); }
bool CEditValue::Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) { if ( eventType == EVENT_NULL ) eventType = GetUniqueEventType(); CControl::Create(pos, dim, icon, eventType); GlintDelete(); m_edit = MakeUnique<Ui::CEdit>(); m_edit->Create(pos, dim, 0, EVENT_NULL); m_edit->SetMaxChar(4); m_buttonUp = MakeUnique<Ui::CButton>(); m_buttonUp->Create(pos, dim, 49, EVENT_NULL); // ^ m_buttonUp->SetRepeat(true); m_buttonDown = MakeUnique<Ui::CButton>(); m_buttonDown->Create(pos, dim, 50, EVENT_NULL); // v m_buttonDown->SetRepeat(true); MoveAdjust(); return true; }
void CScroll::SetDim(Math::Point dim) { CControl::SetDim(dim); MoveAdjust(); }
void CScroll::SetPos(Math::Point pos) { CControl::SetPos(pos); MoveAdjust(); }
void CEditValue::SetDim(Math::Point dim) { CControl::SetDim(dim); MoveAdjust(); }
void CEditValue::SetPos(Math::Point pos) { CControl::SetPos(pos); MoveAdjust(); }
//================================================ //ゲームメイン画面描画 //================================================ void DrawMain(void) { frame.IsDisp = TRUE; /*当たり判定領域設定*/ SetHitRect(); g_Second++; if(!player.IsStop) { g_gamecounter++; } //------------------------------------------ //アニメーション処理 //------------------------------------------ if(g_Second % 20 == 0) { player.animcounter++; if(!player.IsStop) { for(int i = 0;i < ENEMY_NUM;i++) { enemy[i].animcounter++; } boss.animcounter++; } } if(g_Second % 5 == 0) { if(!player.IsStop) { for(int i = 0;i < SKULL_NUM;i++) { boss.skull[i].animcounter++; } for(int i = 0;i < KNIFE_NUM;i++) { boss.knife[i].animcounter++; } } } /*ショット処理*/ player.Shoot(); /*当たり判定チェック*/ CheckHitRect(); //---------------------------------------- //移動 //---------------------------------------- player.Move(); /*敵の移動処理*/ if(!player.IsStop) { EnemyMove(); EnemyShoot(); } /*ボスの移動処理*/ if(!player.IsStop) { BossMove(); } /*移動範囲補正*/ MoveAdjust(); player.UseGauge(); //if(player.IsUseSpecial) //{ // if(LunaPad::GetState(0, PAD_STATE_PUSH, PAD_BUTTON_03) ) // { // player.IsUseSpecial = FALSE; // } //} //----------------------------------------------------- //化身状態 //----------------------------------------------------- /*ポーズ*/ if(LunaPad::GetState(0, PAD_STATE_PUSH, PAD_BUTTON_05) ) { g_GameMode = SCENE_PAUSE; } /*カメラ更新*/ if(!player.IsStop) { camera.Update(); } model.Translation(); /*キャラクタ変更*/ player.UseCharaChange(); /*待機ライフ回復*/ if(Luna::GetSyncCounter() % 20 == 0) { player.Recoverlife(); } /*ゲームオーバー処理*/ if(player.IsDead) { g_GameMode = SCENE_GAMEOVER; } /*ボス死亡処理*/ boss.Dead(&g_GameMode); player.Draw(); //---------------------------------- //シーン開始 //---------------------------------- if ( Luna3D::BeginScene() ) { /*レンダリング*/ Luna3D::SetRenderState(D3DRS_FOGENABLE, TRUE); model.Rendering(); if(player.IsStop) { screen.IsDisp = TRUE; Luna3D::SetBlendingType(BLEND_REVERSE); screen.DrawTexture(); Luna3D::SetBlendingType(BLEND_NORMAL); } Luna3D::SetRenderState(D3DRS_FOGENABLE, FALSE); Luna3D::SetFilterEnable(TRUE); /*敵出現ポイント*/ EnemyPoint(); frame.DrawTexture(); player.Rendering(); score.DrawFont(g_Score); boss.Rendering(); // シーン終了 Luna3D::EndScene(); } }