#include <Unit.h>
◆ CUnit()
When entity selections change, we might end up with a different layout in terms of variants/groups, which means the random key calculation might end up with different results for the same seed. This is bad, as it means entities randomly change appearence when changing e.g. animation. To fix this, we'll initially pick a random and complete specification based on our seed, and then pass that as the lowest priority selections. Thus, if the actor files are properly specified, we can ensure that the entities will look the same no matter what happens.
◆ ~CUnit()
◆ Create()
◆ GetActorSelections()
const std::set< CStr > & CUnit::GetActorSelections |
( |
| ) |
const |
|
inline |
◆ GetAnimation()
◆ GetID()
◆ GetModel()
◆ GetObject()
◆ NONCOPYABLE()
CUnit::NONCOPYABLE |
( |
CUnit |
| ) |
|
|
private |
◆ ReloadObject()
void CUnit::ReloadObject |
( |
| ) |
|
|
private |
◆ SetActorSelections()
void CUnit::SetActorSelections |
( |
const std::set< CStr > & |
selections | ) |
|
Overwrite the seed-selected actor selections.
Likely only useful for Atlas or debugging.
◆ SetEntitySelection() [1/2]
void CUnit::SetEntitySelection |
( |
const CStr & |
key, |
|
|
const CStr & |
selection |
|
) |
| |
◆ SetEntitySelection() [2/2]
void CUnit::SetEntitySelection |
( |
const std::map< CStr, CStr > & |
selections | ) |
|
◆ UpdateModel()
void CUnit::UpdateModel |
( |
float |
frameTime | ) |
|
Update the model's animation.
- Parameters
-
◆ CUnitAnimation
◆ m_Actor
◆ m_ActorSelections
std::set<CStr> CUnit::m_ActorSelections |
|
private |
◆ m_Animation
◆ m_EntitySelections
std::map<CStr, CStr> CUnit::m_EntitySelections |
|
private |
◆ m_ID
◆ m_Model
◆ m_Object
◆ m_ObjectManager
◆ m_Seed
The documentation for this class was generated from the following files:
- /home/docker/jenkins/workspace/technical-docs/source/graphics/Unit.h
- /home/docker/jenkins/workspace/technical-docs/source/graphics/Unit.cpp