wonder.js
Version:
36 lines (28 loc) • 1.82 kB
JavaScript
;
var Log$WonderLog = require("wonder-log/lib/js/src/Log.js");
var Contract$WonderLog = require("wonder-log/lib/js/src/Contract.js");
var StateDataMain$Wonderjs = require("../state/main/data/StateDataMain.js");
var ArrayMapService$Wonderjs = require("../atom/ArrayMapService.js");
var IsDebugMainService$Wonderjs = require("../state/main/state/IsDebugMainService.js");
var MutableSparseMapService$WonderCommonlib = require("wonder-commonlib/lib/js/src/MutableSparseMapService.js");
var getGameObjects = MutableSparseMapService$WonderCommonlib.get;
function unsafeGetGameObjects(component, gameObjectsMap) {
return Contract$WonderLog.ensureCheck((function (gameObjectsMap) {
return Contract$WonderLog.test(Log$WonderLog.buildAssertMessage("component\'s gameObjectsMap exist", "not"), (function (param) {
return Contract$WonderLog.assertNullableExist(gameObjectsMap);
}));
}), IsDebugMainService$Wonderjs.getIsDebug(StateDataMain$Wonderjs.stateData), MutableSparseMapService$WonderCommonlib.unsafeGet(component, gameObjectsMap));
}
function removeGameObject(gameObject, component, gameObjectsMap) {
return ArrayMapService$Wonderjs.removeValue(component, gameObject, gameObjectsMap);
}
var removeGameObjects = MutableSparseMapService$WonderCommonlib.deleteVal;
function batchRemoveGameObjects(gameObjectArr, component, gameObjectsMap) {
return ArrayMapService$Wonderjs.batchRemoveValueArr(component, gameObjectArr, gameObjectsMap);
}
exports.getGameObjects = getGameObjects;
exports.unsafeGetGameObjects = unsafeGetGameObjects;
exports.removeGameObject = removeGameObject;
exports.removeGameObjects = removeGameObjects;
exports.batchRemoveGameObjects = batchRemoveGameObjects;
/* Log-WonderLog Not a pure module */