Changeset 1694 for code/branches/gui/src/orxonox/objects/Ambient.cc
- Timestamp:
- Sep 1, 2008, 10:20:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/objects/Ambient.cc
r1653 r1694 44 44 #include "core/XMLPort.h" 45 45 #include "core/ConsoleCommand.h" 46 #include "Settings.h" 46 47 47 48 namespace orxonox … … 65 66 66 67 bool Ambient::create(){ 67 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_); 68 return Synchronisable::create(); 68 if (Settings::showsGraphics()) 69 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_); 70 return Synchronisable::create(); 69 71 } 70 72 71 73 void Ambient::registerAllVariables(){ 72 registerVar(&ambientLight_, sizeof(ColourValue), network::DATA);73 74 registerVar(&ambientLight_, sizeof(ColourValue), network::DATA); 75 74 76 } 75 77 76 78 void Ambient::setAmbientLight(const ColourValue& colour) 77 79 { 78 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour); 79 ambientLight_=colour; 80 if (Settings::showsGraphics()) 81 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour); 82 ambientLight_=colour; 80 83 } 81 84 82 85 /** 83 @brief XML loading and saving. 84 @param xmlelement The XML-element 85 @param loading Loading (true) or saving (false) 86 @return The XML-element 86 @brief 87 XML loading and saving. 88 @param 89 xmlelement The XML-element 90 @param 91 loading Loading (true) or saving (false) 92 @return 93 The XML-element 87 94 */ 88 95 void Ambient::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Note: See TracChangeset
for help on using the changeset viewer.