Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'LayerManager is not a constructor' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 103
User prompt
Please fix the bug: 'LayerManager is not a constructor' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 103
User prompt
Please fix the bug: 'LayerManager is not a constructor' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 103
User prompt
Please fix the bug: 'LayerManager is not defined' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 60
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'LayerManager is not a constructor' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 60
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'LayerManager is not a constructor' in or related to this line: 'game.layerManager = new LayerManager();' Line Number: 60
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addToLayer')' in or related to this line: 'game.layerManager.addToLayer(game.reticle, LAYERS.RETICLE);' Line Number: 577
User prompt
Please fix the bug: 'tween.add is not a function' in or related to this line: 'tween.add(pulseConfig);' Line Number: 550 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 390 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 390 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 390 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 390 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 388
User prompt
Please fix the bug: 'Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.' in or related to this line: 'return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;' Line Number: 369
/**** * Plugins ****/ var storage = LK.import("@upit/storage.v1", { highScore: 0 }); /**** * Initialize Game ****/ // Initialize game var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ // Define the GameInitializer class var background = LK.getAsset('67cb14d582516b65d7d56166', { anchorX: 0.5, anchorY: 0.5 }); var bird1 = LK.getAsset('67d1bdc5249940bb44cbfd3f', { anchorX: 0.5, anchorY: 0.5 }); var bird2 = LK.getAsset('67c9022d120d8830ebbf570b', { anchorX: 0.5, anchorY: 0.5 }); var cat = LK.getAsset('67c8fd9b120d8830ebbf56e9', { anchorX: 0.5, anchorY: 0.5 }); var cloud1 = LK.getAsset('67c915be120d8830ebbf582c', { anchorX: 0.5, anchorY: 0.5 }); var cloud2 = LK.getAsset('67c915be120d8830ebbf582b', { anchorX: 0.5, anchorY: 0.5 }); var grassBack = LK.getAsset('67c90d44120d8830ebbf57b8', { anchorX: 0.5, anchorY: 0.5 }); var grassFront = LK.getAsset('67c90d44120d8830ebbf57b9', { anchorX: 0.5, anchorY: 0.5 }); var jet1 = LK.getAsset('67cbdf3f8f0bb65062649f12', { anchorX: 0.5, anchorY: 0.5 }); var laser2 = LK.getAsset('67c92a5e120d8830ebbf58bb', { anchorX: 0.5, anchorY: 0.5 }); var light1 = LK.getAsset('67cbd61a8f0bb65062649e52', { anchorX: 0.5, anchorY: 0.5 }); var mirror1 = LK.getAsset('67cb7aec82516b65d7d56434', { anchorX: 0.5, anchorY: 0.5 }); var reticle1 = LK.getAsset('67c935fd120d8830ebbf5944', { anchorX: 0.5, anchorY: 0.5 }); var stack1 = LK.getAsset('67cb6ce882516b65d7d563cf', { anchorX: 0.5, anchorY: 0.5 }); var sun = LK.getAsset('67c92a9f120d8830ebbf58c8', { anchorX: 0.5, anchorY: 0.5 }); var tree1 = LK.getAsset('67c911c5120d8830ebbf5807', { anchorX: 0.5, anchorY: 0.5 }); var tree2 = LK.getAsset('67cb5a3d82516b65d7d562fe', { anchorX: 0.5, anchorY: 0.5 }); var ufo1 = LK.getAsset('67cc62364e271169e42de9e4', { anchorX: 0.5, anchorY: 0.5 }); var ufo2 = LK.getAsset('67cc62364e271169e42de9e5', { anchorX: 0.5, anchorY: 0.5 }); var _GameObjectMovement; var _excluded = ["interval"]; function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) { throw o; } } } }; } function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) { return; } f = !1; } else { for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) { return; } } finally { if (o) { throw n; } } } return a; } } function _arrayWithHoles(r) { if (Array.isArray(r)) { return r; } } function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) { return e; } if (void 0 !== e) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(t); } function _assertThisInitialized(e) { if (void 0 === e) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return e; } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); } function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));) { ; } return t; } function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } function _inherits(t, e) { if ("function" != typeof e && null !== e) { throw new TypeError("Super expression must either be null or a function"); } t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } function _objectWithoutProperties(e, t) { if (null == e) { return {}; } var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; } function _objectWithoutPropertiesLoose(r, e) { if (null == r) { return {}; } var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) { continue; } t[n] = r[n]; } } return t; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) { return _arrayLikeToArray(r, a); } var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) { return Array.from(r); } } function _arrayWithoutHoles(r) { if (Array.isArray(r)) { return _arrayLikeToArray(r); } } function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; } function _classCallCheck2(a, n) { if (!(a instanceof n)) { throw new TypeError("Cannot call a class as a function"); } } function __defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass2(e, r, t) { return r && __defineProperties(e.prototype, r), t && __defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) { return t; } var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) { return i; } throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var screenWidth = LK.width; var screenHeight = LK.height; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) { _defineProperties(Constructor.prototype, protoProps); } if (staticProps) { _defineProperties(Constructor, staticProps); } return Constructor; } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) { descriptor.writable = true; } Object.defineProperty(target, descriptor.key, descriptor); } } var ScoreManager = /*#__PURE__*/function ScoreManager() { function ScoreManager() { _classCallCheck(this, ScoreManager); this.score = 0; this.highScore = 0; try { try { try { try { try { try { this.highScore = Number(storage.highScore) || 0; } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } } catch (e) { if (e instanceof DOMException && e.name === "SecurityError") { console.warn("LocalStorage access is restricted due to sandboxing. High score will not be persistent."); this.highScore = 0; } else { throw e; } } this.mirror = null; this.initialized = false; } return _createClass(ScoreManager, [{ key: "addScore", value: function addScore(points) { if (!this.initialized || typeof points !== 'number') { return; } this.score += points; if (this.score > this.highScore) { this.highScore = this.score; storage.set('highScore', this.highScore); } if (this.mirror && typeof this.mirror.text !== 'undefined') { this.mirror.text = "Score: ".concat(this.score, "\nHigh Score: ").concat(this.highScore); } } }, { key: "resetScore", value: function resetScore() { this.score = 0; if (this.mirror && typeof this.mirror.text !== 'undefined') { this.mirror.text = "Score: ".concat(this.score, "\nHigh Score: ").concat(this.highScore); } } }, { key: "getScore", value: function getScore() { return this.score; } }, { key: "getHighScore", value: function getHighScore() { return this.highScore; } }, { key: "cleanup", value: function cleanup() { this.score = 0; this.mirror = null; this.initialized = false; } }]); }; var LAYERS = { BACKGROUND: 0, SUN: 1, LIGHT1: 2, UFO2: 3, CLOUD1: 4, JET1: 5, CLOUD2: 6, UFO1: 7, BIRD1: 8, GRASS_BACK: 9, TREE: 10, STACK: 11, BIRD2: 12, MIRROR: 13, GRASS_FRONT: 14, CAT: 15, LASER: 16, RETICLE: 17, UI: 18 }; function AABBIntersect(obj1, obj2) { if (!(obj1 !== null && obj1 !== void 0 && obj1.x) || !(obj2 !== null && obj2 !== void 0 && obj2.x) || !(obj1 !== null && obj1 !== void 0 && obj1.y) || !(obj2 !== null && obj2 !== void 0 && obj2.y) || !obj1.active || !obj2.active) { return false; } t; function getDimensions(obj) { var _obj$graphics, _obj$graphics2; var width = obj.width || ((_obj$graphics = obj.graphics) === null || _obj$graphics === void 0 ? void 0 : _obj$graphics.width) || 0; var height = obj.height || ((_obj$graphics2 = obj.graphics) === null || _obj$graphics2 === void 0 ? void 0 : _obj$graphics2.height) || 0; return { width: width, height: height }; } ; var dim1 = getDimensions(obj1); var dim2 = getDimensions(obj2); var bounds1 = { left: obj1.x - dim1.width / 2, right: obj1.x + dim1.width / 2, top: obj1.y - dim1.height / 2, bottom: obj1.y + dim1.height / 2 }; var bounds2 = { left: obj2.x - dim2.width / 2, right: obj2.x + dim2.width / 2, top: obj2.y - dim2.height / 2, bottom: obj2.y + dim2.height / 2 }; return bounds1.right > bounds2.left && bounds1.left < bounds2.right && bounds1.bottom > bounds2.top && bounds1.top < bounds2.bottom; } var LayerManager = /*#__PURE__*/function () { function LayerManager() { _classCallCheck2(this, LayerManager); this.layers = {}; this.entityLayers = {}; } return _createClass2(LayerManager, [{ key: "addToLayer", value: function addToLayer(entity, layerId) { if (!entity || typeof layerId !== 'number') { return; } if (!this.layers[layerId]) { this.layers[layerId] = []; } if (!this.layers[layerId].includes(entity)) { this.layers[layerId].push(entity); this.entityLayers[entity] = layerId; } } }, { key: "removeFromLayer", value: function removeFromLayer(entity, layerId) { if (!entity || !this.layers[layerId]) { return; } var index = this.layers[layerId].indexOf(entity); if (index !== -1) { this.layers[layerId].splice(index, 1); delete this.entityLayers[entity]; } } }, { key: "removeFromAllLayers", value: function removeFromAllLayers(entity) { if (!entity) { return; } var layerId = this.entityLayers[entity]; if (layerId !== undefined && this.layers[layerId]) { this.removeFromLayer(entity, layerId); } } }, { key: "isInLayer", value: function isInLayer(entity, layerName) { if (!entity || !layerName) { return false; } var layerId = LAYERS[layerName.toUpperCase()]; return layerId !== undefined && this.layers[layerId] && this.layers[layerId].includes(entity); } }, { key: "getLayerEntities", value: function getLayerEntities(layerId) { return this.layers[layerId] ? _toConsumableArray(this.layers[layerId]) : []; } }, { key: "removeFromTracking", value: function removeFromTracking(entity) { if (!entity) { return; } this.removeFromAllLayers(entity); } }]); }(); var SoundManager = /*#__PURE__*/function () { function SoundManager() { _classCallCheck2(this, SoundManager); this.soundConfig = this._initSoundConfig(); this.soundResources = { timers: new Map(), callbacks: new Map(), intervals: new Map() }; this.masterVolume = 1.0; } return _createClass2(SoundManager, [{ key: "_validateVolume", value: function _validateVolume(volume) { var validatedVolume = Number(volume); return !isNaN(validatedVolume) && validatedVolume >= 0 && validatedVolume <= 1 ? validatedVolume : SoundManager.DEFAULT_VOLUME; } }, { key: "_initSoundConfig", value: function _initSoundConfig() { var baseConfig = { volume: SoundManager.DEFAULT_VOLUME }; var configs = _defineProperty(_defineProperty(_defineProperty({}, SoundManager.SOUND_TYPES.AMBIENT, _objectSpread(_objectSpread({}, baseConfig), SoundManager.DEFAULT_DELAY)), SoundManager.SOUND_TYPES.BACKGROUND, _objectSpread(_objectSpread({}, baseConfig), {}, { isMusic: true, loop: true })), SoundManager.SOUND_TYPES.EFFECT, _objectSpread({}, baseConfig)); return _defineProperty(_defineProperty(_defineProperty({}, SoundManager.SOUND_TYPES.AMBIENT, { sounds: ['songbird1', 'cricket1', 'breeze1', 'frog1', 'chitter'].map(function (id) { return _objectSpread({ id: id }, configs[SoundManager.SOUND_TYPES.AMBIENT]); }) }), SoundManager.SOUND_TYPES.BACKGROUND, { sounds: [_objectSpread({ id: 'bgm1' }, configs[SoundManager.SOUND_TYPES.BACKGROUND])] }), SoundManager.SOUND_TYPES.EFFECT, _objectSpread({ sounds: { ufo1: 'ufo1', ufo2: 'ufo1', laser: 'laser1', jet: 'jet1', jet2: 'jet2', dead1: 'dead1', dead2: 'dead2', dead3: 'dead3', wings: 'wings1' } }, configs[SoundManager.SOUND_TYPES.EFFECT])); } }, { key: "_cleanupSound", value: function _cleanupSound(soundId) { var _callback$onStop; if (!soundId) { return; } var sound = LK.getSound(soundId); if (sound !== null && sound !== void 0 && sound.playing) { sound.stop(); } if (LK.isMusicPlaying(soundId)) { LK.stopMusic(soundId); } var resources = this.soundResources; [resources.timers, resources.intervals].forEach(function (collection) { var timerId = collection.get(soundId); if (timerId) { collection === resources.timers ? LK.clearTimeout(timerId) : LK.clearInterval(timerId); collection["delete"](soundId); } }); var callback = resources.callbacks.get(soundId); callback === null || callback === void 0 || (_callback$onStop = callback.onStop) === null || _callback$onStop === void 0 || _callback$onStop.call(callback); resources.callbacks["delete"](soundId); } }, { key: "_handleAutoRestart", value: function _handleAutoRestart(soundId, _ref2) { var _this = this; var interval = _ref2.interval, options = _objectWithoutProperties(_ref2, _excluded); var _ref3 = interval || {}, min = _ref3.min, max = _ref3.max; if (!min || !max || max <= min) { return; } var delay = Math.random() * (max - min) + min; this.soundResources.timers.set(soundId, LK.setTimeout(function () { return _this._playSound(soundId, options); }, delay)); } }, { key: "_playSound", value: function _playSound(soundId, options) { if (!soundId) { return null; } var volume = this._validateVolume(options.volume); var sound = LK.getSound(soundId); if (!sound) { this.soundResources.callbacks["delete"](soundId); return null; } try { options.isMusic ? LK.playMusic(soundId, { volume: volume }) : Object.assign(sound, { volume: volume, loop: options.loop || false }).play(); options.autoRestart && this._handleAutoRestart(soundId, options); return sound; } catch (e) { this.soundResources.callbacks["delete"](soundId); return null; } } }, { key: "playSound", value: function playSound(soundId) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!soundId) { return null; } var existingCallback = this.soundResources.callbacks.get(soundId); if (existingCallback !== null && existingCallback !== void 0 && existingCallback.isPlaying) { return null; } this.stopSound(soundId); var mergedOptions = _objectSpread({ volume: SoundManager.DEFAULT_VOLUME, loop: false, isMusic: false, isPlaying: true }, options); this.soundResources.callbacks.set(soundId, mergedOptions); var sound = this._playSound(soundId, mergedOptions); if (!sound) { mergedOptions.isPlaying = false; } return sound; } }, { key: "playEffectSound", value: function playEffectSound(effectType) { var _this$soundConfig$Sou; if (!effectType || !((_this$soundConfig$Sou = this.soundConfig[SoundManager.SOUND_TYPES.EFFECT]) !== null && _this$soundConfig$Sou !== void 0 && _this$soundConfig$Sou.sounds[effectType])) { return null; } return this.playSound(this.soundConfig[SoundManager.SOUND_TYPES.EFFECT].sounds[effectType], { volume: this.soundConfig[SoundManager.SOUND_TYPES.EFFECT].volume }); } }, { key: "stopSound", value: function stopSound(soundId) { return soundId ? (this._cleanupSound(soundId), true) : false; } }, { key: "setMasterVolume", value: function setMasterVolume(volume) { var newVolume = this._validateVolume(volume); return newVolume !== undefined && (this.masterVolume = newVolume, true); } }, { key: "playAmbientSounds", value: function playAmbientSounds() { var _this2 = this; this.soundConfig[SoundManager.SOUND_TYPES.AMBIENT].sounds.forEach(function (sound) { return _this2.playSound(sound.id, { volume: sound.volume, autoRestart: true, interval: { min: sound.min, max: sound.max } }); }); } }, { key: "playBackgroundMusic", value: function playBackgroundMusic() { var _this3 = this; this.soundConfig[SoundManager.SOUND_TYPES.BACKGROUND].sounds.forEach(function (sound) { return _this3.playSound(sound.id, { volume: sound.volume, isMusic: true, loop: true }); }); } }, { key: "stopAllSounds", value: function stopAllSounds() { var _this4 = this; var allSoundIds = new Set([].concat(_toConsumableArray(this.soundResources.timers.keys()), _toConsumableArray(this.soundResources.callbacks.keys()), _toConsumableArray(this.soundResources.intervals.keys()), _toConsumableArray(this.soundConfig[SoundManager.SOUND_TYPES.AMBIENT].sounds.map(function (s) { return s.id; })), _toConsumableArray(this.soundConfig[SoundManager.SOUND_TYPES.BACKGROUND].sounds.map(function (s) { return s.id; })), _toConsumableArray(Object.values(this.soundConfig[SoundManager.SOUND_TYPES.EFFECT].sounds)))); allSoundIds.forEach(function (id) { return _this4._cleanupSound(id); }); this.soundResources.timers.clear(); this.soundResources.callbacks.clear(); this.soundResources.intervals.clear(); return true; } }]); }(); _defineProperty(SoundManager, "DEFAULT_VOLUME", 0.1); _defineProperty(SoundManager, "DEFAULT_DELAY", { min: 20000, max: 30000 }); _defineProperty(SoundManager, "SOUND_TYPES", { AMBIENT: 'ambient', BACKGROUND: 'background', EFFECT: 'effect' }); var Container = /*#__PURE__*/function () { function Container() { _classCallCheck2(this, Container); this.children = []; } return _createClass2(Container, [{ key: "attachAsset", value: function attachAsset(assetName, options) { if (!assetName) { return null; } var sprite = LK.getAsset(assetName, {}); if (!sprite) { return null; } if (options) { Object.assign(sprite, options); } return this.addChild(sprite); } }, { key: "addChild", value: function addChild(child) { if (!child || this.children.includes(child)) { return child; } this.children.push(child); return child; } }, { key: "destroy", value: function destroy() { if (!this.children) { return; } var processedChildren = new Set(); this.children.forEach(function (child) { if (child && child.destroy && !processedChildren.has(child)) { processedChildren.add(child); child.destroy(); } }); this.children = []; } }]); }(); var EntityManager = /*#__PURE__*/function () { function EntityManager() { _classCallCheck2(this, EntityManager); this.entities = []; this.scheduledRemovals = []; } return _createClass2(EntityManager, [{ key: "add", value: function add(entity) { if (!entity || this.entities.includes(entity)) { return; } this.entities.push(entity); this._updateSpawnCount(entity, 1); } }, { key: "remove", value: function remove(entity) { var _game$layerManager; if (!entity) { return; } this._cleanupEntityResources(entity); this._updateTracking(entity); this.entities = this.entities.filter(function (e) { return e !== entity; }); (_game$layerManager = game.layerManager) === null || _game$layerManager === void 0 || _game$layerManager.removeFromAllLayers(entity); } }, { key: "_cleanupEntityResources", value: function _cleanupEntityResources(entity) { var _entity$movement; if (!(entity !== null && entity !== void 0 && (_entity$movement = entity.movement) !== null && _entity$movement !== void 0 && _entity$movement.options)) { return; } if (entity.movement.options.moveSound) { var _game$soundManager; (_game$soundManager = game.soundManager) === null || _game$soundManager === void 0 || _game$soundManager.stopSound(entity.movement.options.moveSound); } if ((entity === null || entity === void 0 ? void 0 : entity.type) === 'bird') { var _game$soundManager2; (_game$soundManager2 = game.soundManager) === null || _game$soundManager2 === void 0 || _game$soundManager2.playEffectSound('wings'); } if (entity !== null && entity !== void 0 && entity.destroy) { entity.destroy(); } } }, { key: "_updateTracking", value: function _updateTracking(entity) { this._updateSpawnCount(entity, -1); } }, { key: "_updateSpawnCount", value: function _updateSpawnCount(entity, delta) { var _game$spawnManager; if (entity !== null && entity !== void 0 && entity.type && (_game$spawnManager = game.spawnManager) !== null && _game$spawnManager !== void 0 && _game$spawnManager.objectCounts) { var currentCount = game.spawnManager.objectCounts[entity.type] || 0; game.spawnManager.objectCounts[entity.type] = Math.max(0, currentCount + delta); } } }, { key: "update", value: function update(deltaTime) { var _this5 = this; this.entities.forEach(function (entity, i) { var _entity$update; if (!entity || entity.destroyed || entity.markedForRemoval) { _this5._scheduleForRemoval(entity, i); return; } (_entity$update = entity.update) === null || _entity$update === void 0 || _entity$update.call(entity, deltaTime); }); this._processScheduledRemovals(); } }, { key: "_scheduleForRemoval", value: function _scheduleForRemoval(entity, index) { if (!entity || this.scheduledRemovals.includes(index)) { return; } this._cleanupEntityResources(entity); this._updateTracking(entity); this.scheduledRemovals.push(index); } }, { key: "_processScheduledRemovals", value: function _processScheduledRemovals() { var _this6 = this; if (!this.scheduledRemovals) { this.scheduledRemovals = []; } this.scheduledRemovals.sort(function (a, b) { return b - a; }).forEach(function (index) { return _this6.entities.splice(index, 1); }); this.scheduledRemovals = []; } }, { key: "getEntitiesByType", value: function getEntitiesByType(type) { return type ? this.entities.filter(function (entity) { return (entity === null || entity === void 0 ? void 0 : entity.constructor) === type && !entity.destroyed; }) : []; } }, { key: "clear", value: function clear() { var _this7 = this; this.entities.forEach(function (entity) { _this7._cleanupEntityResources(entity); _this7._updateTracking(entity); LK.removeFromAllLayers(entity); }); this.entities = []; if (!game.spawnManager) { return; } var timers = game.spawnManager.spawnTimers || {}; Object.values(timers).forEach(LK.clearTimeout); game.spawnManager.spawnTimers = {}; game.spawnManager.objectCounts = Object.fromEntries(Object.keys(LAYERS).filter(function (key) { return typeof LAYERS[key] === 'number'; }).map(function (key) { return [key.toLowerCase(), 0]; })); } }, { key: "destroy", value: function destroy() { this.clear(); this.entities = null; } }]); }(); var GameObject = /*#__PURE__*/function (_Container) { function GameObject(assetName) { var _this8; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, GameObject); _this8 = _callSuper(this, GameObject); _this8.graphics = _this8.attachAsset(assetName, {}); return _this8; } _inherits(GameObject, _Container); return _createClass2(GameObject, [{ key: "destroy", value: function destroy() { var _this$movement; if ((_this$movement = this.movement) !== null && _this$movement !== void 0 && _this$movement.cleanup) { this.movement.cleanup(); } _superPropGet(GameObject, "destroy", this, 3)([]); } }, { key: "_updateArcOffset", value: function _updateArcOffset(deltaTime) { if (!this.currentState || !this.options) { return; } if (this.currentState.arcOffset === undefined || !this.options.arcEnabled || !this.options.arcAmplitude) { return; } var normalizedDelta = Math.min(deltaTime, 50); this.currentState.arcOffset += normalizedDelta * (Math.PI * 2) / (this.options.arcFrequency || 200); this.currentState.arcOffset %= Math.PI * 2; } }, { key: "_calculateMovement", value: function _calculateMovement() { var _this$options, _this$options2, _this$options3; if (!this.currentState || !this.object || !this.graphics) { return { x: 0, y: 0 }; } if (!this.currentState.speed || !this.currentState.direction) { return { x: 0, y: 0 }; } var bounds = GameObjectMovement.CommonConfig.screenDimensions; var width = this.graphics.width || 0; var height = this.graphics.height || 0; var movement = { x: this.currentState.speed * this.currentState.direction, y: 0 }; if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.arcEnabled && (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.arcAmplitude && this.currentState.arcOffset !== undefined) { movement.y = Math.sin(this.currentState.arcOffset) * this.options.arcAmplitude; var nextY = this.object.y + movement.y; var buffer = height * 0.1; if (nextY - height / 2 < buffer) { movement.y = buffer - (this.object.y - height / 2); this.currentState.arcOffset = 0; } else if (nextY + height / 2 > bounds.height - buffer) { movement.y = bounds.height - buffer - (this.object.y + height / 2); this.currentState.arcOffset = Math.PI; } } if (!((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.destroyOutOfBounds)) { var nextX = this.object.x + movement.x; var buffer = width * 0.1; if (nextX - width / 2 < buffer) { movement.x = buffer - (this.object.x - width / 2); this.currentState.direction *= -1; } else if (nextX + width / 2 > bounds.width - buffer) { movement.x = bounds.width - buffer - (this.object.x + width / 2); this.currentState.direction *= -1; } } return movement; } }, { key: "_applyMovement", value: function _applyMovement(movement) { var _this$options4; if (!movement || !this.object || !this.object.x || !this.object.y) { return; } var _movement$x = movement.x, x = _movement$x === void 0 ? 0 : _movement$x, _movement$y = movement.y, y = _movement$y === void 0 ? 0 : _movement$y; if ((_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.isVertical) { this.object.y = this.object.y + x; this.object.x = this.object.x + y; } else { this.object.x = this.object.x + x; this.object.y = this.object.y + y; } } }, { key: "_checkBoundaries", value: function _checkBoundaries() { var _this$options5; if (!this.object || !this.graphics) { return; } var bounds = GameObjectMovement.CommonConfig.screenDimensions; var width = this.graphics.width || 0; var height = this.graphics.height || 0; // Store previous position for movement direction calculations if (this.currentState) { this.currentState.lastX = this.object.x; this.currentState.lastY = this.object.y; } // Check if object should be destroyed when out of bounds if ((_this$options5 = this.options) !== null && _this$options5 !== void 0 && _this$options5.destroyOutOfBounds) { var buffer = Math.max(width, height); if (this.object.x < -buffer || this.object.x > bounds.width + buffer || this.object.y < -buffer || this.object.y > bounds.height + buffer) { var _this$object$destroy, _this$object; (_this$object$destroy = (_this$object = this.object).destroy) === null || _this$object$destroy === void 0 || _this$object$destroy.call(_this$object); } } else { var _this$options6; // Keep object within screen bounds with special handling for arc movement var minX = width / 2; var maxX = bounds.width - width / 2; var minY = height / 2; var maxY = bounds.height - height / 2; // Apply boundary constraints with a small buffer to prevent sticking this.object.x = Math.max(minX, Math.min(this.object.x, maxX)); this.object.y = Math.max(minY, Math.min(this.object.y, maxY)); // If object is at the boundary and has arc movement, adjust arc offset if ((_this$options6 = this.options) !== null && _this$options6 !== void 0 && _this$options6.arcEnabled && this.currentState && (this.object.y <= minY || this.object.y >= maxY)) { // Adjust arc phase to help object move away from boundary this.currentState.arcOffset = this.object.y <= minY ? Math.PI : 0; } } } }, { key: "_handleSoundTriggers", value: function _handleSoundTriggers() { var _this$options7, _this$currentState, _this$object2, _this$object3, _this9 = this; if (!((_this$options7 = this.options) !== null && _this$options7 !== void 0 && _this$options7.moveSound) || (_this$currentState = this.currentState) !== null && _this$currentState !== void 0 && _this$currentState.soundPlayed) { return; } var bounds = this.options.soundTriggerBounds || GameObjectMovement.CommonConfig.soundTriggerBounds; if (((_this$object2 = this.object) === null || _this$object2 === void 0 ? void 0 : _this$object2.x) > bounds.min && ((_this$object3 = this.object) === null || _this$object3 === void 0 ? void 0 : _this$object3.x) < bounds.max && this.active) { var _game$soundManager3; (_game$soundManager3 = game.soundManager) === null || _game$soundManager3 === void 0 || _game$soundManager3.playEffectSound(this.options.moveSound); this.currentState.soundPlayed = true; this.soundTimer = LK.setTimeout(function () { return _this9.currentState.soundPlayed = false; }, 2000); } } }, { key: "_updateGraphics", value: function _updateGraphics() { var _this$options8, _this$currentState2, _this$object4; if (!((_this$options8 = this.options) !== null && _this$options8 !== void 0 && _this$options8.canFlip) || !this.graphics || !((_this$currentState2 = this.currentState) !== null && _this$currentState2 !== void 0 && _this$currentState2.direction) || !((_this$object4 = this.object) !== null && _this$object4 !== void 0 && _this$object4.x)) { return; } var isVertical = this.options.isVertical; if (isVertical && this.currentState.lastX !== undefined) { this.graphics.flipX = this.object.x < this.currentState.lastX; } else { this.graphics.flipX = this.currentState.direction < 0; } } }]); }(Container); var Background = /*#__PURE__*/function (_GameObject) { function Background() { _classCallCheck2(this, Background); return _callSuper(this, Background, ['background']); } _inherits(Background, _GameObject); return _createClass2(Background); }(GameObject); var Bird = /*#__PURE__*/function (_GameObject2) { function Bird(type) { var _this10; _classCallCheck2(this, Bird); var validType = ['bird1', 'bird2'].includes(type) ? type : 'bird1'; _this10 = _callSuper(this, Bird, [validType]); _this10.type = validType; var config = GameObjectMovement.MovementConfigs[validType]; _this10.movement = config ? new GameObjectMovement(_this10, _this10.graphics, config) : null; _this10.soundPlayed = false; return _this10; } _inherits(Bird, _GameObject2); return _createClass2(Bird, [{ key: "update", value: function update(deltaTime) { if (!this.active || !this.movement) { return; } _superPropGet(Bird, "update", this, 3)([deltaTime]); if (this.movement) { this.movement.update(deltaTime); } } }, { key: "destroy", value: function destroy() { var _game$soundManager4; this.movement = null; _superPropGet(Bird, "destroy", this, 3)([]); (_game$soundManager4 = game.soundManager) === null || _game$soundManager4 === void 0 || _game$soundManager4.playEffectSound('wings'); } }]); }(GameObject); var Cat = /*#__PURE__*/function (_GameObject3) { function Cat() { var _this11; _classCallCheck2(this, Cat); _this11 = _callSuper(this, Cat, ['cat', { anchorX: 0.5, anchorY: 1 }]); _this11.type = 'cat'; return _this11; } _inherits(Cat, _GameObject3); return _createClass2(Cat); }(GameObject); var ENTITY_TYPES = { CLOUD: ['cloud1', 'cloud2'], GRASS: ['grass-front', 'grass-back'] }; var EnvironmentEntity = /*#__PURE__*/function (_GameObject4) { function EnvironmentEntity(type) { var _this12; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, EnvironmentEntity); var defaultOptions = { anchorX: 0.5, anchorY: 0.5, alpha: type.startsWith('cloud') ? 0.8 : 1.0 }; _this12 = _callSuper(this, EnvironmentEntity, [type, _objectSpread(_objectSpread({}, defaultOptions), options)]); _this12.type = type; if (type && typeof type === 'string') { var configs = GameObjectMovement.MovementConfigs || {}; var config = configs[type]; if (config) { _this12.movement = new GameObjectMovement(_this12, _this12.graphics, config); } } return _this12; } _inherits(EnvironmentEntity, _GameObject4); return _createClass2(EnvironmentEntity, [{ key: "update", value: function update(deltaTime) { if (!this.active) { return; } if (this.movement && this.graphics) { this.movement.update(deltaTime); this._updateGraphics(); } } }, { key: "destroy", value: function destroy() { var _this$movement2, _this$graphics; this.active = false; if ((_this$movement2 = this.movement) !== null && _this$movement2 !== void 0 && _this$movement2.cleanup) { this.movement.cleanup(); this.movement = null; } if ((_this$graphics = this.graphics) !== null && _this$graphics !== void 0 && _this$graphics.destroy) { this.graphics.destroy(); this.graphics = null; } _superPropGet(EnvironmentEntity, "destroy", this, 3)([]); } }]); }(GameObject); var Cloud = /*#__PURE__*/function (_EnvironmentEntity) { function Cloud() { var _this13; _classCallCheck2(this, Cloud); var cloudType = ENTITY_TYPES.CLOUD[Math.floor(Math.random() * ENTITY_TYPES.CLOUD.length)]; _this13 = _callSuper(this, Cloud, [cloudType]); _this13.type = cloudType; return _this13; } _inherits(Cloud, _EnvironmentEntity); return _createClass2(Cloud, [{ key: "update", value: function update(deltaTime) { if (!this.active) { return; } _superPropGet(Cloud, "update", this, 3)([deltaTime]); } }]); }(EnvironmentEntity); var GrassLayer = /*#__PURE__*/function (_EnvironmentEntity2) { function GrassLayer(type) { var _this14; _classCallCheck2(this, GrassLayer); if (!ENTITY_TYPES.GRASS.includes(type)) { throw new Error("Invalid grass type: ".concat(type)); } _this14 = _callSuper(this, GrassLayer, [type]); if (type === 'grass-front') { _this14.x = GameObjectMovement.CommonConfig.screenDimensions.width / 2; _this14.y = GameObjectMovement.CommonConfig.screenDimensions.height - _this14.graphics.height / 2; } return _this14; } _inherits(GrassLayer, _EnvironmentEntity2); return _createClass2(GrassLayer); }(EnvironmentEntity); // Grass layers will be initialized after GameObjectMovement class is defined var Jet1 = /*#__PURE__*/function (_GameObject5) { function Jet1() { var _this15; _classCallCheck2(this, Jet1); _this15 = _callSuper(this, Jet1, ['jet1']); _this15.type = 'jet1'; _this15.movement = new GameObjectMovement(_this15, _this15.graphics, GameObjectMovement.MovementConfigs[_this15.type]); _this15.soundPlayed = false; return _this15; } _inherits(Jet1, _GameObject5); return _createClass2(Jet1, [{ key: "update", value: function update(deltaTime) { if (!this.active) { return; } _superPropGet(Jet1, "update", this, 3)([deltaTime]); if (!this.soundPlayed && this.isOnScreen()) { var _game$soundManager5; (_game$soundManager5 = game.soundManager) === null || _game$soundManager5 === void 0 || _game$soundManager5.playEffectSound('jet1'); this.soundPlayed = true; } } }, { key: "isOnScreen", value: function isOnScreen() { return this.x >= -this.width / 2 && this.x <= LK.width + this.width / 2; } }, { key: "destroy", value: function destroy() { if (this.soundPlayed) { var _game$soundManager6; (_game$soundManager6 = game.soundManager) === null || _game$soundManager6 === void 0 || _game$soundManager6.stopSound('jet1'); } _superPropGet(Jet1, "destroy", this, 3)([]); } }]); }(GameObject); var GameUtils = /*#__PURE__*/function () { function GameUtils() { _classCallCheck2(this, GameUtils); } return _createClass2(GameUtils, null, [{ key: "validateVolume", value: function validateVolume(volume) { if (!volume) { return null; } var parsed = typeof volume === 'string' ? parseFloat(volume) : volume; if (typeof parsed !== 'number' || isNaN(parsed)) { return null; } return Math.max(0, Math.min(1, parsed)); } }]); }(); var Laser = /*#__PURE__*/function (_Container2) { function Laser(startX, startY, targetX, targetY) { var _this16; _classCallCheck2(this, Laser); _this16 = _callSuper(this, Laser); _this16.laserGraphics = _this16.attachAsset('laser2', { anchorX: 0.5, anchorY: 0.5, brightness: 2.0 }); var dx = targetX - startX; var dy = targetY - startY; var distance = Math.sqrt(dx * dx + dy * dy); var speed = 60; _this16.vx = dx / distance * speed; _this16.vy = dy / distance * speed; _this16.x = startX; _this16.y = startY; _this16.lastIntersecting = false; _this16.active = true; LK.getSound('laser1').play(); return _this16; } _inherits(Laser, _Container2); return _createClass2(Laser, [{ key: "destroy", value: function destroy() { if (game.layerManager) { game.layerManager.removeFromTracking(this); } _superPropGet(Laser, "destroy", this, 3)([]); } }, { key: "update", value: function update() { if (!this.active) { return; } this.x += this.vx; this.y += this.vy; if (this.x < 0 || this.x > 2048 || this.y < 0 || this.y > 2732) { this.destroy(); } } }]); }(Container); var PulseEffect = /*#__PURE__*/function () { function PulseEffect(graphics) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, PulseEffect); this.graphics = graphics; this.options = { minScale: options.minScale || 0.95, maxScale: options.maxScale || 1.05, duration: options.duration || 1000, easing: options.easing || 'easeInOutQuad' }; this.active = false; } return _createClass2(PulseEffect, [{ key: "startPulsating", value: function startPulsating() { if (this.active) { return; } this.active = true; this._pulse(); } }, { key: "stopPulsating", value: function stopPulsating() { this.active = false; if (this.graphics) { this.graphics.scale = 1; } } }, { key: "_pulse", value: function _pulse() { var _this17 = this; if (!this.active || !this.graphics) { return; } var _this$options9 = this.options, minScale = _this$options9.minScale, maxScale = _this$options9.maxScale, duration = _this$options9.duration, easing = _this$options9.easing; tween.to(this.graphics, { scale: maxScale }, duration / 2, { ease: easing }).then(function () { return tween.to(_this17.graphics, { scale: minScale }, duration / 2, { ease: easing }); }).then(function () { return _this17._pulse(); }); } }], [{ key: "createPulse", value: function createPulse(type, graphics) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; switch (type) { case 'sun': return new ScalePulse(graphics, _objectSpread({ minScale: 0.95, maxScale: 1.05, speed: 0.02, interval: 40 }, options)); case 'light': return new BrightnessPulse(graphics, _objectSpread({ minBrightness: 0.9, maxBrightness: 1.1, speed: 0.05, interval: 40 }, options)); default: return new ScalePulse(graphics, options); } } }]); }(); var Light = /*#__PURE__*/function (_GameObject6) { function Light() { _classCallCheck2(this, Light); return _callSuper(this, Light, ['light1', { anchorX: 0.5, anchorY: 0.5, brightness: 1.5 }]); } _inherits(Light, _GameObject6); return _createClass2(Light); }(GameObject); var Sun = /*#__PURE__*/function (_GameObject7) { function Sun() { _classCallCheck2(this, Sun); return _callSuper(this, Sun, ['sun', { anchorX: 0.5, anchorY: 0.5, brightness: 1.5 }]); } _inherits(Sun, _GameObject7); return _createClass2(Sun); }(GameObject); var UFO = /*#__PURE__*/function (_GameObject8) { function UFO(type) { var _this18; _classCallCheck2(this, UFO); if (!type || !['ufo1', 'ufo2'].includes(type)) { type = 'ufo1'; } var asset = LK.getAsset(type, {}); if (!asset) { type = 'ufo1'; } _this18 = _callSuper(this, UFO, [type]); _this18.type = type; _this18.movement = new GameObjectMovement(_this18, _this18.graphics, GameObjectMovement.MovementConfigs[type]); _this18.soundPlayed = false; return _this18; } _inherits(UFO, _GameObject8); return _createClass2(UFO, [{ key: "update", value: function update(deltaTime) { if (!this.active || !this.movement) { return; } _superPropGet(UFO, "update", this, 3)([deltaTime]); if (this.movement) { this.movement.update(deltaTime); } if (!this.soundPlayed && this.isOnScreen()) { var _game$soundManager7; (_game$soundManager7 = game.soundManager) === null || _game$soundManager7 === void 0 || _game$soundManager7.playEffectSound('ufo1'); this.soundPlayed = true; } } }, { key: "isOnScreen", value: function isOnScreen() { return this.x >= -this.width / 2 && this.x <= LK.width + this.width / 2; } }, { key: "destroy", value: function destroy() { if (this.soundPlayed) { var _game$soundManager8; (_game$soundManager8 = game.soundManager) === null || _game$soundManager8 === void 0 || _game$soundManager8.stopSound(this.options.sound); } this.movement = null; _superPropGet(UFO, "destroy", this, 3)([]); } }]); }(GameObject); var GameObjectMovement = /*#__PURE__*/function () { function GameObjectMovement(object, graphics) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; _classCallCheck2(this, GameObjectMovement); this.object = object; this.graphics = graphics; var typeConfig = object.type ? GameObjectMovement.MovementConfigs[object.type] : null; var mergedOptions = this.validateMovementConfig(_objectSpread(_objectSpread({}, typeConfig), options)); this.options = mergedOptions; this.currentState = { speed: mergedOptions.speed + Math.random() * (mergedOptions.speedRange || 0), direction: Math.random() < 0.5 ? 1 : -1, arcOffset: Math.random() * Math.PI * 2, lastX: object.x, lastY: object.y, soundPlayed: false }; this.soundTimer = null; this.soundInstance = null; if (this.options.moveSound && game.soundManager) { this.cleanupSound(); this.initializeSound(); } if (typeConfig) { this.maxCount = typeConfig.maxCount; this.respawnTime = typeConfig.respawnTime; this.exclusiveWith = typeConfig.exclusiveWith; } } return _createClass2(GameObjectMovement, [{ key: "update", value: function update(deltaTime) { if (!this.object || !this.graphics || !this.currentState) { return; } this._updateArcOffset(deltaTime); var movement = this._calculateMovement(); this._applyMovement(movement); this._checkBoundaries(); this._handleSoundTriggers(); this._updateGraphics(); } }, { key: "validateMovementConfig", value: function validateMovementConfig() { var _Number, _Number2; var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var validatedConfig = _objectSpread(_objectSpread({}, GameObjectMovement.DefaultMovementConfig), config); // Validate and normalize speed parameters validatedConfig.speed = Math.max(0, (_Number = Number(config.speed)) !== null && _Number !== void 0 ? _Number : validatedConfig.speed); validatedConfig.speedRange = Math.max(0, (_Number2 = Number(config.speedRange)) !== null && _Number2 !== void 0 ? _Number2 : validatedConfig.speedRange); // Validate arc parameters validatedConfig.arcEnabled = Boolean(config.arcEnabled); if (validatedConfig.arcEnabled) { var _Number3, _Number4; validatedConfig.arcAmplitude = Math.max(0, (_Number3 = Number(config.arcAmplitude)) !== null && _Number3 !== void 0 ? _Number3 : validatedConfig.arcAmplitude); validatedConfig.arcFrequency = Math.max(1, (_Number4 = Number(config.arcFrequency)) !== null && _Number4 !== void 0 ? _Number4 : validatedConfig.arcFrequency); } // Validate boolean flags and sound validatedConfig.canFlip = Boolean(config.canFlip); validatedConfig.moveSound = typeof config.moveSound === 'string' ? config.moveSound : validatedConfig.moveSound; return validatedConfig; } }, { key: "cleanupSound", value: function cleanupSound() { if (this.soundTimer) { var _game$soundManager9; (_game$soundManager9 = game.soundManager) === null || _game$soundManager9 === void 0 || _game$soundManager9.stopSound(this.options.moveSound); LK.clearTimeout(this.soundTimer); this.soundTimer = null; } if (this.currentState) { this.currentState.soundPlayed = false; } } }, { key: "initializeSound", value: function initializeSound() { var _this$options10, _this19 = this; if (!((_this$options10 = this.options) !== null && _this$options10 !== void 0 && _this$options10.moveSound) || !game.soundManager) { return; } this.cleanupSound(); if (this.currentState) { this.currentState.soundPlayed = false; } if (this.soundInstance) { game.soundManager.stopSound(this.soundInstance); this.soundInstance = null; } this.soundInstance = game.soundManager.playSound(this.options.moveSound, { volume: 0.1, interval: { min: 20000, max: 30000 }, onPlay: function onPlay() { return _this19.currentState && (_this19.currentState.soundPlayed = true); }, onStop: function onStop() { if (_this19.currentState) { _this19.currentState.soundPlayed = false; } _this19.soundTimer = null; _this19.soundInstance = null; } }); } }]); }(); // Initialize grass layers after GameObjectMovement class is defined _GameObjectMovement = GameObjectMovement; _defineProperty(GameObjectMovement, "CommonConfig", { screenDimensions: { width: 2048, height: 2732 }, respawnTime: { min: 20000, max: 30000 }, soundTriggerBounds: { min: -100, max: 2148 } }); _defineProperty(GameObjectMovement, "DefaultMovementConfig", { speed: 1, speedRange: 0, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: false, moveSound: null, destroyOutOfBounds: true, isVertical: false }); // Initialize MovementConfigs after DefaultMovementConfig is defined _defineProperty(GameObjectMovement, "MovementConfigs", { bird1: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 3, speedRange: 1, arcEnabled: true, arcAmplitude: 50, arcFrequency: 200, canFlip: true, moveSound: 'wings1' }), bird2: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 2, speedRange: 0.5, arcEnabled: true, arcAmplitude: 30, arcFrequency: 150, canFlip: true, moveSound: 'wings1' }), jet1: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 8, speedRange: 1, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: true, moveSound: 'jet1' }), ufo1: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 1, speedRange: 0.5, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: false, moveSound: 'ufo1' }), ufo2: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 1, speedRange: 0.5, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: false, moveSound: 'ufo2' }), cloud1: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 0.3, speedRange: 0.1, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: false, moveSound: null }), cloud2: _objectSpread(_objectSpread({}, _GameObjectMovement.DefaultMovementConfig), {}, { speed: 0.3, speedRange: 0.1, arcEnabled: false, arcAmplitude: 0, arcFrequency: 0, canFlip: false, moveSound: null }) }); var grassFront = new GrassLayer('grass-front'); grassFront.x = GameObjectMovement.CommonConfig.screenDimensions.width / 2; grassFront.y = GameObjectMovement.CommonConfig.screenDimensions.height - grassFront.height / 2; var grassBack = new GrassLayer('grass-back'); grassBack.x = LK.width / 2; grassBack.y = LK.height - 150; var GameInitializer = /*#__PURE__*/function () { function GameInitializer() { _classCallCheck2(this, GameInitializer); this.game = null; this.initialized = false; } return _createClass2(GameInitializer, [{ key: "initialize", value: function initialize(gameInstance) { if (this.initialized) { return; } this.game = gameInstance; // Initialize core systems this._initializeManagers(); this._setupGameState(); this._loadResources(); this.initialized = true; } }, { key: "_initializeManagers", value: function _initializeManagers() { // Initialize sound manager if not already present if (!this.game.soundManager) { this.game.soundManager = new SoundManager(); } // Initialize entity manager if not already present if (!this.game.entityManager) { this.game.entityManager = new EntityManager(); } // Initialize layer manager if not already present if (!this.game.layerManager) { this.game.layerManager = new LayerManager(); } } }, { key: "_setupGameState", value: function _setupGameState() { if (!this.game.state) { this.game.state = new GameState(); } this.game.state.reset(); } }, { key: "_loadResources", value: function _loadResources() { // Placeholder for resource loading logic // This would typically load textures, sounds, etc. } }]); }(); var GameState = /*#__PURE__*/function () { function GameState() { _classCallCheck2(this, GameState); this.score = 0; this.isGameOver = false; this.isPaused = false; this.currentLevel = 1; } return _createClass2(GameState, [{ key: "reset", value: function reset() { this.score = 0; this.isGameOver = false; this.isPaused = false; this.currentLevel = 1; } }]); }(); var BasePulse = /*#__PURE__*/function () { function BasePulse(graphics) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, BasePulse); if (!graphics || _typeof(graphics) !== 'object') { throw new Error('Graphics must be a valid object'); } if (typeof graphics.scale === 'undefined' && (typeof graphics.scaleX === 'undefined' || typeof graphics.scaleY === 'undefined') && typeof graphics.brightness === 'undefined') { throw new Error('Graphics object must have either scale, scaleX/scaleY, or brightness property'); } this.graphics = graphics; this.pulseTimer = null; this.options = Object.assign({ min: 1.0, max: 1.2, speed: 0.01, interval: 50 }, options); } return _createClass2(BasePulse, [{ key: "startPulsating", value: function startPulsating() { var self = this; var value = this.options.min; var direction = 1; if (this.pulseTimer) { LK.clearInterval(this.pulseTimer); } this.pulseTimer = LK.setInterval(function () { value += direction * self.options.speed; if (value >= self.options.max) { direction = -1; value = self.options.max; } else if (value <= self.options.min) { direction = 1; value = self.options.min; } self.updateGraphics(value); }, this.options.interval); } }, { key: "stopPulsating", value: function stopPulsating() { if (this.pulseTimer) { LK.clearInterval(this.pulseTimer); } this.resetGraphics(); } }, { key: "updateGraphics", value: function updateGraphics(value) { if (!this.graphics) { return; } if (typeof this.graphics.scale !== 'undefined') { this.graphics.scale = value; } else if (typeof this.graphics.scaleX !== 'undefined' && typeof this.graphics.scaleY !== 'undefined') { this.graphics.scaleX = value; this.graphics.scaleY = value; } } }, { key: "resetGraphics", value: function resetGraphics() { if (!this.graphics) { return; } if (typeof this.graphics.scale !== 'undefined') { this.graphics.scale = this.options.min; } else if (typeof this.graphics.scaleX !== 'undefined' && typeof this.graphics.scaleY !== 'undefined') { this.graphics.scaleX = this.options.min; this.graphics.scaleY = this.options.min; } } }]); }(); var ScalePulse = /*#__PURE__*/function (_BasePulse) { function ScalePulse(graphics) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, ScalePulse); return _callSuper(this, ScalePulse, [graphics, Object.assign({}, options, { min: options.minScale || 1.0, max: options.maxScale || 1.2 })]); } _inherits(ScalePulse, _BasePulse); return _createClass2(ScalePulse, [{ key: "updateGraphics", value: function updateGraphics(scale) { if (!this.graphics) { return; } if (typeof this.graphics.scale !== 'undefined') { this.graphics.scale = scale; } else if (typeof this.graphics.scaleX !== 'undefined' && typeof this.graphics.scaleY !== 'undefined') { this.graphics.scaleX = scale; this.graphics.scaleY = scale; } } }, { key: "resetGraphics", value: function resetGraphics() { this.updateGraphics(this.options.min); } }]); }(BasePulse); var BrightnessPulse = /*#__PURE__*/function (_BasePulse2) { function BrightnessPulse(graphics) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck2(this, BrightnessPulse); return _callSuper(this, BrightnessPulse, [graphics, Object.assign({}, options, { min: options.minBrightness || 1.0, max: options.maxBrightness || 2.0, speed: 0.05 })]); } _inherits(BrightnessPulse, _BasePulse2); return _createClass2(BrightnessPulse, [{ key: "updateGraphics", value: function updateGraphics(brightness) { if (!this.graphics || typeof this.graphics.brightness === 'undefined') { return; } this.graphics.brightness = brightness; } }, { key: "resetGraphics", value: function resetGraphics() { this.updateGraphics(this.options.min); } }]); }(BasePulse); var ReticlePulse = /*#__PURE__*/function (_ScalePulse) { function ReticlePulse(reticleGraphics) { _classCallCheck2(this, ReticlePulse); return _callSuper(this, ReticlePulse, [reticleGraphics, { minScale: 1.0, maxScale: 1.2, speed: 0.01, interval: 50 }]); } _inherits(ReticlePulse, _ScalePulse); return _createClass2(ReticlePulse); }(ScalePulse); var BirdEffects = /*#__PURE__*/function () { function BirdEffects(bird) { _classCallCheck2(this, BirdEffects); if (!bird || !bird.graphics) { return; } this.bird = bird; this.originalAlpha = bird.graphics.alpha || 1.0; this.active = false; this.pulseTimer = null; } return _createClass2(BirdEffects, [{ key: "startEffects", value: function startEffects() { if (!this.bird || !this.bird.graphics || this.active) { return; } this.active = true; this.bird.graphics.alpha = 0.8; } }, { key: "stopEffects", value: function stopEffects() { if (this.pulseTimer) { LK.clearInterval(this.pulseTimer); this.pulseTimer = null; } if (this.bird && this.bird.graphics) { this.bird.graphics.alpha = this.originalAlpha; this.bird.graphics.scale = 1; this.bird.graphics.scaleX = 1; this.bird.graphics.scaleY = 1; this.bird.graphics.brightness = 1; } this.active = false; this.bird = null; this.originalAlpha = null; } }]); }(); var Reticle = /*#__PURE__*/function (_GameObject9) { function Reticle() { var _this20; _classCallCheck2(this, Reticle); _this20 = _callSuper(this, Reticle, ['reticle1']); _this20.pulse = new ReticlePulse(_this20.graphics); _this20.pulse.startPulsating(); return _this20; } _inherits(Reticle, _GameObject9); return _createClass2(Reticle); }(GameObject); game.move = function (x, y) { if (!game.reticle && typeof Reticle !== 'undefined') { game.reticle = new Reticle(); if (!game.layerManager) { game.layerManager = new LayerManager(); } game.layerManager.addToLayer(game.reticle, LAYERS.RETICLE); } if (game.reticle) { game.reticle.x = x; game.reticle.y = y; } }; var scoreDisplay = game.mirror; // Initialize managers if not already present if (!game.layerManager) { game.layerManager = new LayerManager(); } var sun = new Sun(); sun.x = 480; sun.y = 680; game.layerManager.addToLayer(sun, LAYERS.SUN); var light1 = new Light(); light1.x = 510; light1.y = 1500; game.layerManager.addToLayer(light1, LAYERS.LIGHT1); light1.visible = true; var score = 0; game.scoreManager = new ScoreManager(); // Initial interval for UFO appearances between 10 to 20 seconds // Helper functions for game update function updateEntityPositions() { game.entityManager.update(); // Handle off-screen birds game.children.forEach(function (entity) { if (game.layerManager.isInLayer(entity, 'birds') && entity.y > 2732) { entity.y = -entity.height; entity.x = Math.random() * 2048; } }); } function handleCollisions() { var projectiles = game.layerManager.getLayerEntities(LAYERS.LASER) || []; var enemies = CollisionManager.getActiveEnemies([LAYERS.BIRD1, LAYERS.BIRD2, LAYERS.UFO1, LAYERS.UFO2]); if (!projectiles.length || !enemies.length) { return; } var gridSize = 200; var grid = new Map(); var processedCollisions = new Set(); var simultaneousCollisions = new Map(); enemies.forEach(function (enemy) { if (!(enemy !== null && enemy !== void 0 && enemy.active) || typeof enemy.x !== 'number' || typeof enemy.y !== 'number') { return; } var gridX = Math.floor(enemy.x / gridSize); var gridY = Math.floor(enemy.y / gridSize); var key = "".concat(gridX, ",").concat(gridY); if (!grid.has(key)) { grid.set(key, new Set()); } grid.get(key).add(enemy); var adjacentCells = [[-1, -1], [0, -1], [1, -1], [-1, 0], [1, 0], [-1, 1], [0, 1], [1, 1]]; adjacentCells.forEach(function (_ref4) { var _ref5 = _slicedToArray(_ref4, 2), dx = _ref5[0], dy = _ref5[1]; var adjKey = "".concat(gridX + dx, ",").concat(gridY + dy); if (!grid.has(adjKey)) { grid.set(adjKey, new Set()); } grid.get(adjKey).add(enemy); }); }); projectiles.forEach(function (laser) { if (!(laser !== null && laser !== void 0 && laser.active) || typeof laser.x !== 'number' || typeof laser.y !== 'number') { return; } var gridX = Math.floor(laser.x / gridSize); var gridY = Math.floor(laser.y / gridSize); var key = "".concat(gridX, ",").concat(gridY); var cellTargets = grid.get(key); if (!(cellTargets !== null && cellTargets !== void 0 && cellTargets.size)) { return; } var closestTarget = CollisionManager.findClosestTarget(laser, Array.from(cellTargets), processedCollisions); if (closestTarget) { processedCollisions.add(closestTarget); if (!simultaneousCollisions.has(laser)) { simultaneousCollisions.set(laser, []); } simultaneousCollisions.get(laser).push(closestTarget); } }); simultaneousCollisions.forEach(function (targets, laser) { targets.forEach(function (target) { if (target !== null && target !== void 0 && target.active && laser !== null && laser !== void 0 && laser.active) { handleCollisionPoints(laser, target); } }); }); return true; } var CollisionManager = /*#__PURE__*/function () { function CollisionManager() { _classCallCheck2(this, CollisionManager); this.quadrantMap = new Map(); this.cellSize = 100; } return _createClass2(CollisionManager, [{ key: "getActiveEnemies", value: function getActiveEnemies() { if (!this.quadrantMap) { return []; } var enemies = []; var _iterator = _createForOfIteratorHelper(this.quadrantMap.values()), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var quadrant = _step.value; if (Array.isArray(quadrant)) { enemies.push.apply(enemies, _toConsumableArray(quadrant.filter(function (enemy) { return enemy && enemy.active; }))); } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return enemies; } }, { key: "createQuadrantMap", value: function createQuadrantMap(enemies) { var _this21 = this; if (!Array.isArray(enemies)) { return; } this.quadrantMap.clear(); enemies.forEach(function (enemy) { if (!enemy || typeof enemy.x !== 'number' || typeof enemy.y !== 'number') { return; } var key = "".concat(Math.floor(enemy.x / _this21.cellSize), ",").concat(Math.floor(enemy.y / _this21.cellSize)); if (!_this21.quadrantMap.has(key)) { _this21.quadrantMap.set(key, []); } _this21.quadrantMap.get(key).push(enemy); }); } }], [{ key: "findClosestTarget", value: function findClosestTarget(laser, targets, processedCollisions) { var potentialHits = targets.filter(function (target) { return target && target.active && target.x !== undefined && target.y !== undefined && !processedCollisions.has(target) && AABBIntersect(laser, target); }); if (potentialHits.length > 0) { potentialHits.sort(function (a, b) { var distA = Math.pow(laser.x - a.x, 2) + Math.pow(laser.y - a.y, 2); var distB = Math.pow(laser.x - b.x, 2) + Math.pow(laser.y - b.y, 2); return distA - distB; }); return potentialHits[0]; } return null; } }]); }();
===================================================================
--- original.js
+++ change.js
an orange and white cat facing away from the camera. the cat is sitting straight up and looking up, ready to pounce. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
remove black box
fluffy translucent cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
bright sun with wincing cartoon face and a black eye. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
a goofy ufo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
red gaming reticle. Minimal. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
sunny day, hilly landscape. there is an alien invasion taking place in the distance. cities burning.
large AUTUMN SHADES tree with sparse bunches of leaves. branches are exposed, but the tree is tough and old.. true-color, realistic, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
glowing orange sphere. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
sideway view of a fighter jet. . . In-Game 2d asset. transparent background. horizontal. No shadows.
shiny purple and black attack ufo.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows