void CSweepingWind::Update( float fElapsedTime ) { CSpecial::Update(fElapsedTime); if(IsFlipped()) SetVelX(GetSpeed()); else SetVelX(-GetSpeed()); SetPosX(GetPosX() + GetVelX() * fElapsedTime); CCamera* Game_Camera = CCamera::GetInstance(); if(this->GetPosX() < Game_Camera->GetPosX() || this->GetPosX() > Game_Camera->GetPosX() + Game_Camera->GetWidth()) { CRemoveEntityMessage* pMsg = new CRemoveEntityMessage(this); CSGD_MessageSystem::GetInstance()->SendMsg(pMsg); pMsg = nullptr; } if(CSpecial::Timer() == 0) { CRemoveEntityMessage* pMsg = new CRemoveEntityMessage(this); CSGD_MessageSystem::GetInstance()->SendMsg(pMsg); pMsg = nullptr; } }
unsigned int D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const { if( aView->GetPrintMode() > 0 ) // In printing mode the pad is always drawable return 0; const int HIDE = std::numeric_limits<unsigned int>::max(); BOARD* board = GetBoard(); // Handle Render tab switches if( ( GetAttribute() == PAD_ATTRIB_STANDARD || GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) && !aView->IsLayerVisible( LAYER_PADS_TH ) ) return HIDE; if( !IsFlipped() && !aView->IsLayerVisible( LAYER_MOD_FR ) ) return HIDE; if( IsFlipped() && !aView->IsLayerVisible( LAYER_MOD_BK ) ) return HIDE; if( IsFrontLayer( ( PCB_LAYER_ID )aLayer ) && !aView->IsLayerVisible( LAYER_PAD_FR ) ) return HIDE; if( IsBackLayer( ( PCB_LAYER_ID )aLayer ) && !aView->IsLayerVisible( LAYER_PAD_BK ) ) return HIDE; // Only draw the pad if at least one of the layers it crosses is being displayed if( board && !( board->GetVisibleLayers() & GetLayerSet() ).any() ) return HIDE; // Netnames will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { int divisor = std::max( m_Size.x, m_Size.y ); // Pad sizes can be zero briefly when someone is typing a number like "0.5" // in the pad properties dialog if( divisor == 0 ) return HIDE; return ( Millimeter2iu( 10 ) / divisor ); } // Other layers are shown without any conditions return 0; }
void CFighter::Render(void) { CCamera* Game_Camera = CCamera::GetInstance(); ///////////////////////////////////////////////////////////////// // BUG FIX // Reference Bug # 33 / 56 // BUG FIX START ///////////////////////////////////////////////////////////////// AnimationManager::GetInstance()->Render(GetPosX() - Game_Camera->GetPosX(), GetPosY() - Game_Camera->GetPosY(), IsFlipped(), *GetAnimInfo(), GetRenderColor()); /////////////////////////////////////////////////////////////////////////// // BUG FIX END Reference # 33 / 56 ////////////////////////////////////////////////////////////////////////// CEnemy::Render(); }
void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { int nbpad; wxString msg; aList.push_back( MSG_PANEL_ITEM( m_Reference->GetShownText(), m_Value->GetShownText(), DARKCYAN ) ); // Display last date the component was edited (useful in Module Editor). wxDateTime date( m_LastEditTime ); if( m_LastEditTime && date.IsValid() ) // Date format: see http://www.cplusplus.com/reference/ctime/strftime msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year else msg = _( "Unknown" ); aList.push_back( MSG_PANEL_ITEM( _( "Last Change" ), msg, BROWN ) ); // display schematic path aList.push_back( MSG_PANEL_ITEM( _( "Netlist Path" ), m_Path, BROWN ) ); // display the board side placement aList.push_back( MSG_PANEL_ITEM( _( "Board Side" ), IsFlipped()? _( "Back (Flipped)" ) : _( "Front" ), RED ) ); EDA_ITEM* PtStruct = m_Pads; nbpad = 0; while( PtStruct ) { nbpad++; PtStruct = PtStruct->Next(); } msg.Printf( wxT( "%d" ), nbpad ); aList.push_back( MSG_PANEL_ITEM( _( "Pads" ), msg, BLUE ) ); msg = wxT( ".." ); if( IsLocked() ) msg[0] = 'L'; if( m_ModuleStatus & MODULE_is_PLACED ) msg[1] = 'P'; aList.push_back( MSG_PANEL_ITEM( _( "Status" ), msg, MAGENTA ) ); msg.Printf( wxT( "%.1f" ), GetOrientationDegrees() ); aList.push_back( MSG_PANEL_ITEM( _( "Rotation" ), msg, BROWN ) ); // Controls on right side of the dialog switch( m_Attributs & 255 ) { case 0: msg = _( "Normal" ); break; case MOD_CMS: msg = _( "Insert" ); break; case MOD_VIRTUAL: msg = _( "Virtual" ); break; default: msg = wxT( "???" ); break; } aList.push_back( MSG_PANEL_ITEM( _( "Attributes" ), msg, BROWN ) ); aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), FROM_UTF8( m_fpid.Format().c_str() ), BLUE ) ); if( m_3D_Drawings.empty() ) msg = _( "No 3D shape" ); else msg = m_3D_Drawings.front().m_Filename; // Search the first active 3D shape in list aList.push_back( MSG_PANEL_ITEM( _( "3D-Shape" ), msg, RED ) ); wxString doc, keyword; doc.Printf( _( "Doc: %s" ), GetChars( m_Doc ) ); keyword.Printf( _( "Key Words: %s" ), GetChars( m_KeyWord ) ); aList.push_back( MSG_PANEL_ITEM( doc, keyword, BLACK ) ); }
void Npc::ChangeDirection() { mVelocity.x *= -1.0f; Flip(!IsFlipped()); }
/*virtual*/ void CEarthBoss::Render(void) { CCamera* Game_Camera = CCamera::GetInstance(); AnimationManager::GetInstance()->Render(GetPosX() - Game_Camera->GetPosX(), GetPosY() - Game_Camera->GetPosY(), IsFlipped(), *GetAnimInfo(), GetRenderColor()); CEnemy::Render(); }