Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
UnitComponent.cpp
Go to the documentation of this file.
1
2
4
7
8namespace Divide {
10 : BaseComponentType<UnitComponent, ComponentType::UNIT>(parentSGN, context),
11 _unit(nullptr)
12{
13}
14
15bool UnitComponent::setUnit(const Unit_ptr& unit) {
16 if (!_unit) {
17 _unit = unit;
19 return true;
20 }
21
22 return false;
23}
24
25} //namespace Divide
static void setParentNode(Unit *unit, SceneGraphNode *node)
Definition: Unit.h:146
bool setUnit(const Unit_ptr &unit)
UnitComponent(SceneGraphNode *parentSGN, PlatformContext &context)
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
SGNComponent::Registrar< T, C > BaseComponentType
Definition: SGNComponent.h:207