Cafu Engine
CompLight.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_GAMESYS_COMPONENT_LIGHT_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_LIGHT_HPP_INCLUDED
9 
10 #include "CompBase.hpp"
11 
12 
13 namespace cf
14 {
15  namespace GameSys
16  {
17  /// The common base class for light source components.
19  {
20  public:
21 
22  // Base class overrides.
23  ComponentLightT* Clone() const;
24  const char* GetName() const { return "Light"; }
25  unsigned int GetEditorColor() const { return 0xCCFFFF; }
26 
27 
28  // The TypeSys related declarations for this class.
29  const cf::TypeSys::TypeInfoT* GetType() const { return &TypeInfo; }
30  static void* CreateInstance(const cf::TypeSys::CreateParamsT& Params);
31  static const cf::TypeSys::TypeInfoT TypeInfo;
32 
33 
34  protected:
35 
36  static const char* DocClass;
37  };
38  }
39 }
40 
41 #endif
The common base class for light source components.
Definition: CompLight.hpp:18
unsigned int GetEditorColor() const
Returns a color that the Map Editor can use to render the representation of this component's entity...
Definition: CompLight.hpp:25
const char * GetName() const
Returns the name of this component.
Definition: CompLight.hpp:24
Definition: TypeSys.hpp:52
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
ComponentLightT * Clone() const
The virtual copy constructor.
Definition: CompLight.cpp:24
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54