State.cpp
上传用户:jalin138
上传日期:2022-02-12
资源大小:5720k
文件大小:1k
- #include "State.h"
- CState::CState(void)
- {
- m_pBack = g_Res->GetSprite( "GameBack" );
- m_pParticL = g_Res->GetParticleSystem( "Fire" );
- m_pParticR = g_Res->GetParticleSystem( "Fire2" );
- m_pParticL->info.sprite->SetBlendMode( BLEND_COLORMUL | BLEND_ALPHAADD | BLEND_ZWRITE );
- m_pParticL->Fire();
- m_pParticR->Fire();
-
- m_pParticL->MoveTo( 90, 230 );
- m_pParticR->MoveTo( 710, 230 );
- }
- CState::~CState(void)
- {
- m_pBack = NULL;
- m_pParticL = NULL;
- m_pParticR = NULL;
- }
- // 游戏背景
- void CState::RenderBack(void)
- {
- m_pParticL->Update( 0.010f );
- m_pParticR->Update( 0.010f );
- m_pParticL->Render();
- m_pParticR->Render();
-
- m_pBack->RenderEx( 400, 300, 0.0f, 2.0f, 2.0f );
- }