/***************************************************************** * CUISubsystemIndicator(): * * Ins: * * Outs: * * Returns: * * Mod. Date: 05/12/2015 * Mod. Initials: *****************************************************************/ CUISubsystemIndicator::CUISubsystemIndicator(PSUBSYSTEM target) { if (dynamic_cast<CLifeSupport*>(target)) { m_pTexture = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/lifeSupport.png"); //m_pBackTex = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/lifeSupportBack.png"); } if (dynamic_cast<CReactor*>(target)) { m_pTexture = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/reactor.png"); //m_pBackTex = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/reactorBack.png"); } if (dynamic_cast<CEngines*>(target)) { m_pTexture = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/engines.png"); //m_pBackTex = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/enginesBack.png"); } m_bounds = CRectangle(m_vPosition.x - 140.f, m_vPosition.x + 140.f, m_vPosition.y - 36.f, m_vPosition.y + 36.f); m_pLightTex = new CTexture2D(0.f, 0.f, 230.f, 70.f, L"Assets/Images/ColorLight.png"); m_pLightTex->SetColor({ 1.0f, 1.0f, 1.0f, 1.0f }); CRectangle rect = { m_vPosition.x - 70.f, m_vPosition.x + 70.f, m_vPosition.y - 18.f, m_vPosition.y + 18.f }; rect = CGUIManager::ComputeBounds(rect); m_pLightTex->SetWidth(rect.ComputeWidth()); m_pLightTex->SetHeight(rect.ComputeHeight()); m_pSubsystem = target; m_bSpaceToggled = false; m_fPositionMod = 0; }
/***************************************************************** * CHealthBar(): * * Ins: * * Outs: * * Returns: * * Mod. Date: 05/12/2015 * Mod. Initials: *****************************************************************/ CHealthBar::CHealthBar(float fMaxHealth) : m_fMaxHealth(fMaxHealth), m_fHealth(fMaxHealth) { //m_pTexture = new CTexture2D(0.f, 0.f, 250.f, 50.f, L"Assets/Images/healthBar.dds"); m_pTexture = new CTexture2D(100, 300.0f, 250.f, 50.f, L"Assets/Images/RedBar.png"); m_pTexture->SetColor(XMFLOAT4(1, 0, 0, 1)); m_pOverlayTexture = new CTexture2D(100, 300.0f, 250.f, 50.f, L"Assets/Images/BarOverlayThin.png"); CRectangle rect = { 0.f, 310.0f, 0.f, 144.0f }; rect = CGUIManager::ComputeBounds(rect); m_pOverlayTexture->SetWidth(rect.ComputeWidth()); m_pOverlayTexture->SetHeight(rect.ComputeHeight()); m_pOverlayTexture->SetScreenPosition(0.731f, -0.810f); //m_pBackTexture = new CTexture2D(CRenderer::GetReference().GetWidth() * .5f, 300.f, 250.f, 50.f, L"Assets/Images/RedBar.png"); //m_pBackTexture->SetColor(DirectX::XMFLOAT4 { 0.f, 0.f, 0.f, 1.f }); }
CRadar::CRadar() { m_pTexture = new CTexture2D(0, 0, 300, 300, L"Assets/Images/RadarBackground.png"); m_pTexture->SetColor(DirectX::XMFLOAT4{ 1.0f, 1.0f, 1.0f, 0.75f }); // Radar Background Texture CRectangle rect = { 0.f, 210, 0.f, 230 }; rect = CGUIManager::ComputeBounds(rect); m_pTexture->SetWidth(rect.ComputeWidth()); m_pTexture->SetHeight(rect.ComputeHeight()); m_pTexture->SetScreenPosition(-0.79f, -0.7f); // Creep Blimp Texture m_pCreepTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarCreep.png"); rect = { 0.f, 12.5f, 0.f, 12.5f }; rect = CGUIManager::ComputeBounds(rect); m_pCreepTexture->SetWidth(rect.ComputeWidth()); m_pCreepTexture->SetHeight(rect.ComputeHeight()); m_pCreepTexture->SetColor({ 1, 0, 0, 1 }); // Hunter Blimp Texture m_pHuntTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarHunter.png"); rect = { 0.f, 12.5f, 0.f, 12.5f }; rect = CGUIManager::ComputeBounds(rect); m_pHuntTexture->SetWidth(rect.ComputeWidth()); m_pHuntTexture->SetHeight(rect.ComputeHeight()); m_pHuntTexture->SetColor({ 1, 0, 0, 1 }); // Saboteur Blimp Texture m_pSaboTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarSaboteur.png"); rect = { 0.f, 12.5f, 0.f, 12.5f }; rect = CGUIManager::ComputeBounds(rect); m_pSaboTexture->SetWidth(rect.ComputeWidth()); m_pSaboTexture->SetHeight(rect.ComputeHeight()); m_pSaboTexture->SetColor({ 1, 0, 0, 1 }); // LifeSupport Blimp Texture m_pLifeSupTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarLifeSupport.png"); rect = { 0.f, 15.0f, 0.f, 15.0f }; rect = CGUIManager::ComputeBounds(rect); m_pLifeSupTexture->SetWidth(rect.ComputeWidth()); m_pLifeSupTexture->SetHeight(rect.ComputeHeight()); m_pLifeSupTexture->SetColor({ 1, 1, 1, 1 }); // Engines Blimp Texture m_pEnginesTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarEngines.png"); rect = { 0.f, 15.0f, 0.f, 15.0f }; rect = CGUIManager::ComputeBounds(rect); m_pEnginesTexture->SetWidth(rect.ComputeWidth()); m_pEnginesTexture->SetHeight(rect.ComputeHeight()); m_pEnginesTexture->SetColor({ 1, 1, 1, 1 }); // Reactor Blimp Texture m_pReactorTexture = new CTexture2D(0, 0, 10, 10, L"Assets/Images/RadarReactor.png"); rect = { 0.f, 15.0f, 0.f, 15.0f }; rect = CGUIManager::ComputeBounds(rect); m_pReactorTexture->SetWidth(rect.ComputeWidth()); m_pReactorTexture->SetHeight(rect.ComputeHeight()); m_pReactorTexture->SetColor({ 1, 1, 1, 1 }); m_bVisible = false; m_bHaveSystems = false; m_pPlayer = CGameplayState::GetEntityManager()->GetPlayer(); m_fRange = 1500; }