Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
RuntimeEnvironment.cpp
Go to the documentation of this file.
1/**
2 * @file RuntimeEnvironment.cpp
3 * @brief Implementation of RuntimeEnvironment.
4 * @author Olympe Engine
5 * @date 2026-03-17
6 */
7
9
10namespace Olympe {
11
12// ---------------------------------------------------------------------------
13// Blackboard variables
14// ---------------------------------------------------------------------------
15
16void RuntimeEnvironment::SetBlackboardVariable(const std::string& key, float value)
17{
19}
20
21bool RuntimeEnvironment::GetBlackboardVariable(const std::string& key, float& outValue) const
22{
23 auto it = m_blackboardVariables.find(key);
24 if (it == m_blackboardVariables.end())
25 return false;
26 outValue = it->second;
27 return true;
28}
29
30bool RuntimeEnvironment::HasBlackboardVariable(const std::string& key) const
31{
33}
34
35// ---------------------------------------------------------------------------
36// Dynamic pin values
37// ---------------------------------------------------------------------------
38
39void RuntimeEnvironment::SetDynamicPinValue(const std::string& pinID, float value)
40{
42}
43
44bool RuntimeEnvironment::GetDynamicPinValue(const std::string& pinID, float& outValue) const
45{
46 auto it = m_dynamicPinValues.find(pinID);
47 if (it == m_dynamicPinValues.end())
48 return false;
49 outValue = it->second;
50 return true;
51}
52
53// ---------------------------------------------------------------------------
54// Utility
55// ---------------------------------------------------------------------------
56
62
63} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Runtime context supplying Blackboard variables and dynamic pin values.
bool GetBlackboardVariable(const std::string &key, float &outValue) const
Looks up a Blackboard variable.
void SetDynamicPinValue(const std::string &pinID, float value)
Stores or overwrites the runtime value for a dynamic data pin.
std::map< std::string, float > m_blackboardVariables
Blackboard key -> value.
void Clear()
Removes all stored variables and pin values.
void SetBlackboardVariable(const std::string &key, float value)
Stores or overwrites a Blackboard variable.
bool GetDynamicPinValue(const std::string &pinID, float &outValue) const
Looks up the runtime value of a dynamic data pin.
std::map< std::string, float > m_dynamicPinValues
Pin UUID -> value.
bool HasBlackboardVariable(const std::string &key) const
Returns true when the given key has been set.
< Provides AssetID and INVALID_ASSET_ID