Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/CCmpMinimap.cpp
Show All 26 Lines | |||||
#include "ps/Shapes.h" | #include "ps/Shapes.h" | ||||
class CCmpMinimap : public ICmpMinimap | class CCmpMinimap : public ICmpMinimap | ||||
{ | { | ||||
public: | public: | ||||
static void ClassInit(CComponentManager& componentManager) | static void ClassInit(CComponentManager& componentManager) | ||||
{ | { | ||||
componentManager.SubscribeToMessageType(MT_Deserialized); | |||||
componentManager.SubscribeToMessageType(MT_PositionChanged); | componentManager.SubscribeToMessageType(MT_PositionChanged); | ||||
componentManager.SubscribeToMessageType(MT_OwnershipChanged); | componentManager.SubscribeToMessageType(MT_OwnershipChanged); | ||||
componentManager.SubscribeToMessageType(MT_MinimapPing); | componentManager.SubscribeToMessageType(MT_MinimapPing); | ||||
} | } | ||||
DEFAULT_COMPONENT_ALLOCATOR(Minimap) | DEFAULT_COMPONENT_ALLOCATOR(Minimap) | ||||
// Template state: | // Template state: | ||||
▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | case MT_PositionChanged: | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
m_Active = false; | m_Active = false; | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
case MT_Deserialized: | |||||
case MT_OwnershipChanged: | case MT_OwnershipChanged: | ||||
{ | { | ||||
UpdateColor(); | UpdateColor(); | ||||
break; | break; | ||||
} | } | ||||
case MT_MinimapPing: | case MT_MinimapPing: | ||||
{ | { | ||||
CmpPtr<ICmpOwnership> cmpOwnership(GetSimContext(), GetEntityId()); | CmpPtr<ICmpOwnership> cmpOwnership(GetSimContext(), GetEntityId()); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator