| 99 | } |
| 100 | |
| 101 | void GameObject::initialize() |
| 102 | { |
| 103 | if (!m_active) |
| 104 | { |
| 105 | Debug::Log->debug( |
| 106 | "<GameObject> Initializing GameObject '{0}' ({1})", m_id, m_type); |
| 107 | m_active = true; |
| 108 | if (m_hasScriptEngine) |
| 109 | { |
| 110 | m_environment["__OBJECT_INIT"] = true; |
| 111 | t_local->trigger("Init"); |
| 112 | } |
| 113 | } |
| 114 | else |
| 115 | Debug::Log->warn("<GameObject> GameObject '{0}' ({1}) has already " |
| 116 | "been initialized", |
| 117 | m_id, m_type); |
| 118 | } |
| 119 | |
| 120 | GameObject::~GameObject() |
| 121 | { |