| 1335 | // MARK: events |
| 1336 | |
| 1337 | void Node::onEnter() |
| 1338 | { |
| 1339 | if (!_running) |
| 1340 | { |
| 1341 | ++__attachedNodeCount; |
| 1342 | } |
| 1343 | |
| 1344 | if (_onEnterCallback) |
| 1345 | _onEnterCallback(); |
| 1346 | |
| 1347 | if (_componentContainer && !_componentContainer->isEmpty()) |
| 1348 | { |
| 1349 | _componentContainer->onEnter(); |
| 1350 | } |
| 1351 | |
| 1352 | _isTransitionFinished = false; |
| 1353 | |
| 1354 | for (const auto& child : _children) |
| 1355 | child->onEnter(); |
| 1356 | |
| 1357 | this->resume(); |
| 1358 | |
| 1359 | _running = true; |
| 1360 | |
| 1361 | #if AX_ENABLE_SCRIPT_BINDING |
| 1362 | ScriptEngineManager::sendNodeEventToLua(this, kNodeOnEnter); |
| 1363 | #endif |
| 1364 | } |
| 1365 | |
| 1366 | void Node::onEnterTransitionDidFinish() |
| 1367 | { |
no test coverage detected