Changeset 10418 for code/branches/core7/src/libraries/core/UpdateListener.h
- Timestamp:
- May 3, 2015, 1:54:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/UpdateListener.h
r10413 r10418 36 36 namespace orxonox 37 37 { 38 /** 39 * Inherit from UpdateListener if you need to receive calls before or after the game is ticked. All classes inheriting from UpdateListener 40 * need to be strictly independent of each other and may not rely on a specific order in which all UpdateListeners are called. 41 * 42 * If you do have such a dependency between two UpdateListeners, e.g. A::preUpdate() always needs to be called before B::preUpdate(), then 43 * you need to create a third class C (which inherits from UpdateListener) with the following implementation: 44 * void C::preUpdate() 45 * { 46 * A::preUpdate(); 47 * B::preUpdate(); 48 * } 49 * This is the only way to ensure that A gets called before B. In this example, only C inherits from UpdateListener, while A and B do not. 50 * Instead they receive the update from C. 51 */ 38 52 class _CoreExport UpdateListener : virtual public Listable 39 53 {
Note: See TracChangeset
for help on using the changeset viewer.