User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'createElement')' in or related to this line: 'var sparkleCountEl = document.createElement('div');' Line Number: 531
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
User prompt
debug all getCharmRadius
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1568
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'getCharmRadius')' in or related to this line: 'self.getCharmRadius = function () {' Line Number: 1514
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Game state 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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) { throw Error("Generator is already running"); } if (o === s) { if ("throw" === i) { throw a; } return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) { continue; } return u; } } if ("next" === n.method) { n.sent = n._sent = n.arg; } else if ("throw" === n.method) { if (o === h) { throw o = s, n.arg; } n.dispatchException(n.arg); } else { "return" === n.method && n.abrupt("return", n.arg); } o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) { continue; } return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) { return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; } var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) { return r.method = "throw", r.arg = i.arg, r.delegate = null, y; } var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) { return r.call(e); } if ("function" == typeof e.next) { return e; } if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) { if (n.call(e, o)) { return next.value = e[o], next.done = !1, next; } } return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) { r.push(n); } return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) { return next.value = t, next.done = !1, next; } } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) { for (var r in this) { "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); } } }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) { throw t.arg; } return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) { throw e; } var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) { return handle("end"); } if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) { return handle(i.catchLoc, !0); } if (this.prev < i.finallyLoc) { return handle(i.finallyLoc); } } else if (c) { if (this.prev < i.catchLoc) { return handle(i.catchLoc, !0); } } else { if (!u) { throw Error("try statement without catch or finally"); } if (this.prev < i.finallyLoc) { return handle(i.finallyLoc); } } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) { throw t.arg; } return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) { return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 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 _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); } function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } var sparkleCount = 500; var cats = []; var branches = []; var notifications = []; var room = null; var localParticipant = null; var sparkleInterval = null; // Helper functions var isoX = function isoX(x, y) { return (x - y) * 0.866; }; var isoY = function isoY(x, y, z) { return (x + y) * 0.5 - z; }; // DOM elements var sparkleCountEl = document.createElement('div'); sparkleCountEl.className = 'sparkle-count'; sparkleCountEl.textContent = "Sparkles: ".concat(sparkleCount); document.body.appendChild(sparkleCountEl); // Connect to LiveKit room function connectToRoom() { return _connectToRoom.apply(this, arguments); } // Initialize game function _connectToRoom() { _connectToRoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.prev = 1; room = new Room(); _context.next = 7; return room.connect('wss://your-livekit-server.com', 'cosmic-cat-room'); case 7: localParticipant = room.localParticipant; // Initialize game after connection initializeGame(); // Setup room event listeners room.on('dataReceived', handleData); _context.next = 19; break; case 15: _context.prev = 15; _context.t0 = _context["catch"](1); console.error('connection failed:', _context.t0); case 19: case "end": return _context.stop(); } } }, _callee, null, [[1, 15]]); })); return _connectToRoom.apply(this, arguments); } function initializeGame() { // Initialize branches branches = [{ id: 0, level: 1, catCapacity: 1, upgradeCost: 100, position: { x: 0, y: -50, z: 80 } }, { id: 1, level: 1, catCapacity: 1, upgradeCost: 100, position: { x: 50, y: 0, z: 80 } }, { id: 2, level: 1, catCapacity: 1, upgradeCost: 100, position: { x: 0, y: 50, z: 80 } }, { id: 3, level: 1, catCapacity: 1, upgradeCost: 100, position: { x: -50, y: 0, z: 80 } }]; // Initialize starter cat if (localParticipant) { cats = [{ id: 'cat-1', level: 1, sparkleRate: 1, upgradeCost: 50, position: { x: 0, y: -70, z: 20 }, owner: localParticipant.identity }]; } // Start sparkle generation sparkleInterval = setInterval(generateSparkles, 3000); // Create UI buttons createButtons(); } // Create game buttons function createButtons() { var buyCatBtn = document.createElement('button'); buyCatBtn.textContent = 'Buy Cat (50)'; buyCatBtn.addEventListener('click', buyCat); document.body.appendChild(buyCatBtn); branches.forEach(function (branch) { var btn = document.createElement('button'); btn.textContent = "Upgrade Branch ".concat(branch.id, " (").concat(branch.upgradeCost, ")"); btn.addEventListener('click', function () { return upgradeBranch(branch.id); }); document.body.appendChild(btn); }); } // Game mechanics function generateSparkles() { if (!localParticipant) { return; } var newSparkles = cats.map(function (cat) { if (cat.owner === localParticipant.identity) { return { id: "sparkle-".concat(Date.now(), "-").concat(Math.random().toString(36).substr(2, 9)), position: { x: cat.position.x + (Math.random() * 20 - 10), y: cat.position.y + (Math.random() * 20 - 10), z: cat.position.z }, value: cat.level * cat.sparkleRate, owner: localParticipant.identity }; } return null; }).filter(Boolean); sparkleCount += newSparkles.reduce(function (sum, s) { return sum + s.value; }, 0); updateUI(); // Broadcast sparkle generation if (room) { room.sendData(JSON.stringify({ type: 'sparkle_generated', data: newSparkles })); } } function buyCat() { if (sparkleCount < 50) { addNotification('Not enough sparkles! Need 50'); return; } sparkleCount -= 50; var newCat = { id: "cat-".concat(Date.now()), level: 1, sparkleRate: 1, upgradeCost: 50, position: { x: 0, y: 0, z: 0 }, owner: localParticipant.identity }; cats.push(newCat); updateUI(); // Broadcast new cat if (room) { room.sendData(JSON.stringify({ type: 'cat_purchased', data: newCat })); } } function upgradeBranch(branchId) { var branch = branches.find(function (b) { return b.id === branchId; }); if (!branch) { return; } if (sparkleCount < branch.upgradeCost) { addNotification("Not enough sparkles! Need ".concat(branch.upgradeCost)); return; } sparkleCount -= branch.upgradeCost; branches = branches.map(function (b) { if (b.id === branchId) { return _objectSpread(_objectSpread({}, b), {}, { level: b.level + 1, catCapacity: b.catCapacity + 1, upgradeCost: Math.floor(b.upgradeCost * 1.5) }); } return b; }); updateUI(); // Broadcast branch upgrade if (room) { room.sendData(JSON.stringify({ type: 'branch_upgraded', data: { branchId: branchId } })); } } function addNotification(message) { var newNotification = { id: Date.now(), message: message }; notifications.push(newNotification); showNotification(message); // Auto-remove notification setTimeout(function () { notifications = notifications.filter(function (n) { return n.id !== newNotification.id; }); }, 3000); } function showNotification(message) { var notificationEl = document.createElement('div'); notificationEl.className = 'notification'; notificationEl.textContent = message; document.body.appendChild(notificationEl); setTimeout(function () { notificationEl.remove(); }, 3000); } function updateUI() { sparkleCountEl.textContent = "Sparkles: ".concat(sparkleCount); } function handleData(data, participant) { try { var message = JSON.parse(data); switch (message.type) { case 'sparkle_generated': sparkleCount += message.data.reduce(function (sum, s) { return sum + s.value; }, 0); break; case 'cat_purchased': cats.push(message.data); break; case 'branch_upgraded': branches = branches.map(function (b) { if (b.id === message.data.branchId) { return _objectSpread(_objectSpread({}, b), {}, { level: b.level + 1, catCapacity: b.catCapacity + 1, upgradeCost: Math.floor(b.upgradeCost * 1.5) }); } return b; }); break; } updateUI(); } catch (e) { console.error('Error parsing message:', e); } } // Cleanup function cleanup() { if (sparkleInterval) { clearInterval(sparkleInterval); } if (room) { room.disconnect(); } } // Start the game connectToRoom(); // Cleanup on page unload window.addEventListener('beforeunload', cleanup);
===================================================================
--- original.js
+++ change.js
@@ -3,1522 +3,745 @@
****/
var tween = LK.import("@upit/tween.v1");
/****
-* Classes
-****/
-// Bird class to manage bird behavior
-var Bird = Container.expand(function () {
- var self = Container.call(this);
- var birdGraphics = self.attachAsset('bird', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.speed = Math.random() * 1.6 + 1;
- self.lastY = self.y;
- self.lastX = self.x;
- self.update = function () {
- self.y += self.speed;
- self.x += Math.sin(self.y / 100) * 6.5;
- if (self.lastY <= 2732 && self.y > 2732) {
- self.destroy();
- birds.splice(birds.indexOf(self), 1);
- return;
- }
- self.lastY = self.y;
- self.lastX = self.x;
- };
-});
-// Function to spawn birds
-// Branch asset
-// Bird1 class to represent the first kind of bird
-var Bird1 = Container.expand(function () {
- var self = Container.call(this);
- var birdGraphics = self.attachAsset('bird1-right', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.movement = new Bird1Movement(self, birdGraphics);
-});
-// Bird2 class to represent the second kind of bird
-var Bird2 = Container.expand(function () {
- var self = Container.call(this);
- var birdGraphics = self.attachAsset('bird2-right', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.movement = new Bird2Movement(self, birdGraphics);
-});
-// Cat class to manage cat behavior
-var Cat = Container.expand(function () {
- var self = Container.call(this);
- var catGraphics = self.attachAsset('cat', {
- anchorX: 0.5,
- anchorY: 1
- });
- self.charmRadius = 100;
- self.cooldown = false;
- self.update = function () {
- // Add any specific update logic for the cat here
- self.playIdleAnimation();
- // Add sleeping cat Zzz particles
- if (Math.random() < 0.05) {
- var zzz = new ZzzParticle();
- zzz.x = self.x;
- zzz.y = self.y - 50;
- game.addChild(zzz);
- }
- };
- self.playIdleAnimation = function () {
- // Add logic for random idle animations like tail swish or ear twitch
- };
- self.tryCharmBird = function () {
- if (!self.cooldown) {
- birds.forEach(function (bird) {
- if (Math.abs(bird.x - self.x) < self.getCharmRadius() && Math.abs(bird.y - self.y) < self.getCharmRadius()) {
- bird.handleCharmed();
- // Add charm effect particles
- var charmEffect = new CharmEffect();
- charmEffect.x = bird.x;
- charmEffect.y = bird.y;
- game.addChild(charmEffect);
- }
- });
- self.handleCharmCooldown();
- }
- };
- self.handleCharmCooldown = function () {
- self.cooldown = true;
- setTimeout(function () {
- self.cooldown = false;
- }, 3000);
- };
- self.getCharmRadius = function () {
- return self.charmRadius;
- };
-});
-var CatPlatform = Container.expand(function () {
- var self = Container.call(this);
- var platformGraphics = self.attachAsset('catPlatform', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
-// Cloud class to represent cloud behavior
-var Cloud = Container.expand(function () {
- var self = Container.call(this);
- var cloudGraphics = self.attachAsset('cloud', {
- anchorX: 0.5,
- anchorY: 0.5,
- alpha: 0.8 // Set default opacity to 80%
- });
- self.movement = new CloudMovement(self, cloudGraphics);
-});
-// CloudMovement class to handle cloud movement and fade effects
-var CloudMovement = Container.expand(function () {
- var self = Container.call(this);
- var cloudGraphics = self.attachAsset('cloud', {
- anchorX: 0.5,
- anchorY: 0.5,
- alpha: 0.8 // Set default opacity to 80%
- });
- self.speed = Math.random() * 0.55 + 0.25; // Adjust speed to range between 0.25 and 0.8
- self.hasAccelerated = false; // Track if the cloud has already accelerated
- self.direction = Math.random() < 0.5 ? 1 : -1; // Random direction: 1 for right, -1 for left
- self.lastX = self.x; // Track last X position for future checks
- self.lastIntersecting = false; // Initialize lastIntersecting for tracking changes on intersections
- self.update = function () {
- self.x += self.speed * self.direction;
- // If the cloud moves off-screen, reposition it to the opposite side
- if (self.lastX <= 2048 + self.width / 2 && self.x > 2048 + self.width / 2) {
- self.x = -self.width / 2;
- } else if (self.lastX >= -self.width / 2 && self.x < -self.width / 2) {
- self.x = 2048 + self.width / 2;
- }
- // Check for overlap with other clouds
- for (var i = 0; i < clouds.length; i++) {
- if (clouds[i] !== self && self.intersects(clouds[i])) {
- if (!self.hasAccelerated) {
- self.speed *= 1.5; // Increase speed by 50%
- self.hasAccelerated = true; // Mark as accelerated
- }
- break;
- } else if (self.hasAccelerated && !self.intersects(clouds[i])) {
- self.speed /= 1.5; // Reset speed to original
- self.hasAccelerated = false; // Reset acceleration state
- }
- }
- // Check if the cloud intersects with the sun
- if (!self.lastIntersecting && self.intersects(sun)) {
- self.speed *= 2; // Double the speed when touching the sun
- tween(cloudGraphics, {
- alpha: 0.5
- }, {
- duration: 3000,
- easing: tween.linear
- });
- } else if (self.lastIntersecting && !self.intersects(sun)) {
- self.speed /= 2; // Reset speed to original when not touching the sun
- tween(cloudGraphics, {
- alpha: 1.0
- }, {
- duration: 3000,
- easing: tween.linear
- });
- }
- self.lastIntersecting = self.intersects(sun);
- self.lastX = self.x; // Update lastX after movement
- };
-});
-// Collection beam for UFO sparkle collection
-var CollectionBeam = Container.expand(function () {
- var self = Container.call(this);
- var beamGraphics = self.attachAsset('beam', {
- anchorX: 0.5,
- anchorY: 0.5,
- alpha: 0.8
- });
- self.scale.y = 0.1; // Start thin
- self.height = 1000; // Long beam
- // Animation to grow the beam
- tween(self, {
- scaleY: 1.0
- }, {
- duration: 300,
- easing: tween.easeOutQuad,
- onFinish: function onFinish() {
- tween(self, {
- alpha: 0
- }, {
- duration: 200,
- onFinish: function onFinish() {
- self.destroy();
- }
- });
- }
- });
- self.update = function () {
- // Rotate slightly for visual effect
- self.rotation += 0.01;
- };
- // Play UFO sound when beam appears
- self.playSound = function () {
- LK.getSound('ufo1').play();
- };
- // Add sparkle collection particles
- self.addParticles = function () {
- var particles = new SparkleParticles();
- particles.x = self.x;
- particles.y = self.y;
- game.addChild(particles);
- };
- // Play UFO sound when beam appears
- self.playSound = function () {
- LK.getSound('ufo1').play();
- };
- // Add sparkle collection particles
- self.addParticles = function () {
- var particles = new SparkleParticles();
- particles.x = self.x;
- particles.y = self.y;
- game.addChild(particles);
- };
-});
-var CosmicTree = Container.expand(function () {
- var self = Container.call(this);
- var treeGraphics = self.attachAsset('cosmicTree', {
- anchorX: 0.5,
- anchorY: 1
- });
- self.pulse = new TreePulse(treeGraphics);
- self.pulse.startPulsating();
-});
-// GrassBack class to represent the grass image
-var GrassBack = Container.expand(function () {
- var self = Container.call(this);
- var grassGraphics = self.attachAsset('grass-back', {
- anchorX: 0.5,
- anchorY: 1
- });
- self.update = function () {
- // Add any specific update logic for the grass here
- // Example: Slightly move the grass to simulate wind effect
- self.x += Math.sin((LK.ticks + 100) / 90) * 0.15; // Swaying effect, increased speed
- };
- self.addChild(grassGraphics); // Add grass graphics to the container
- self.update = function () {
- // Add any specific update logic for the grass here
- // Example: Slightly move the grass to simulate wind effect
- self.x += Math.sin((LK.ticks + 100) / 90) * 0.15; // Swaying effect, increased speed
- };
-});
-// GrassFront class to represent the second grass image
-var GrassFront = Container.expand(function () {
- var self = Container.call(this);
- var grass2Graphics = self.attachAsset('grass-front', {
- anchorX: 0.5,
- anchorY: 1
- });
- self.lastX = self.x; // Initialize lastX for tracking changes on X
- self.addChild(grass2Graphics); // Add grass2 graphics to the container
- self.update = function () {
- // Add any specific update logic for the grass here
- // Example: Slightly move the grass to simulate wind effect
- self.x += Math.sin((LK.ticks + 50) / 100) * 0.125; // Swaying effect, reduced by 50%
- self.lastX = self.x; // Update lastX after movement
- };
-});
-// Jet class to represent a jet flying across the screen
-var Jet = Container.expand(function () {
- var self = Container.call(this);
- var jetGraphics = self.attachAsset('jet', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- // Add a label to the jet
- var jetLabel = new Text2('Jet', {
- size: 50,
- fill: 0xFFFFFF
- });
- jetLabel.anchor.set(0.5, 0.5); // Center the label on the jet
- jetLabel.y = -60; // Position the label above the jet
- self.addChild(jetLabel);
- // Add a label to the jet
- var jetLabel = new Text2('Jet', {
- size: 50,
- fill: 0xFFFFFF
- });
- jetLabel.anchor.set(0.5, 0.5); // Center the label on the jet
- jetLabel.y = -60; // Position the label above the jet
- self.addChild(jetLabel);
- self.speed = 10; // Set the speed of the jet
- self.direction = Math.random() < 0.5 ? 1 : -1; // Random direction: 1 for right, -1 for left
- self.lastX = self.x; // Track last X position for future checks
- self.x = Math.random() < 0.5 ? 2048 + self.width / 2 : -self.width / 2; // Start from either the far right or left edge of the screen
- self.update = function () {
- self.x += self.speed * self.direction;
- // If the jet moves off-screen, destroy it and set it to null
- if (self.lastX <= 2048 + self.width / 2 && self.x > 2048 + self.width / 2 || self.lastX >= -self.width / 2 && self.x < -self.width / 2) {
- self.destroy();
- game.jet = null;
- game.jetSoundPlayed = false; // Reset the flag when the jet is removed
- return; // Exit the update function
- }
- self.lastX = self.x; // Update lastX after movement
- };
-});
-// Laser class to represent a laser shot from the cat
-var Laser = Container.expand(function (startX, startY, targetX, targetY) {
- var self = Container.call(this);
- var laserGraphics = self.attachAsset('laser2', {
- anchorX: 0.5,
- anchorY: 0.5,
- brightness: 2.0 // Increase brightness by 200%
- });
- // Play the laser1 sound when the laser is created
- LK.getSound('laser1').play();
- // Calculate direction and speed
- var dx = targetX - startX;
- var dy = targetY - startY;
- var distance = Math.sqrt(dx * dx + dy * dy);
- var speed = 60; // Speed of the laser increased by 200%
- self.vx = dx / distance * speed;
- self.vy = dy / distance * speed;
- // Set initial position
- self.x = startX;
- self.y = startY;
- // Update function to move the laser
- self.update = function () {
- self.x += self.vx;
- self.y += self.vy;
- // Remove laser if it goes off-screen
- if (self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732) {
- self.destroy();
- }
- };
-});
-// Light1 class to represent a light object
-var Light1 = Container.expand(function () {
- var self = Container.call(this);
- var lightGraphics = self.attachAsset('light1', {
- anchorX: 0.5,
- anchorY: 0.5,
- alpha: 0.2 // Set transparency to 20%
- });
- self.x = 450, self.y = 450;
- self.update = function () {
- // Add any specific update logic for the light here
- };
- self.pulse = new Light1Pulse(lightGraphics);
- self.pulse.startPulsating();
-});
-// Mirror class to manage score display
-var Mirror = Container.expand(function () {
- var self = Container.call(this);
- var scoreGraphics = self.attachAsset('mirror1', {
- anchorX: 0.5,
- anchorY: 0.5,
- rotation: Math.PI / 14 // Rotate image right 15 degrees
- });
- var scoreText = new Text2('0', {
- size: 175,
- fill: 0x800080,
- font: "Courier New, Courier, monospace",
- // Segmented clock style font
- stroke: 0x00FF00,
- strokeThickness: 15,
- dropShadow: true,
- dropShadowColor: 0x000000,
- dropShadowBlur: 5,
- dropShadowAngle: Math.PI / 6,
- dropShadowDistance: 6
- });
- scoreText.y = 50; // Move score text up by 20px
- scoreText.x = -145; // Move score text left by 10px
- scoreText.rotation = Math.PI / 12; // Rotate score text right 15 degrees
- x = 100;
- y = 100;
- self.addChild(scoreText);
- self.updateScore = function (newScore) {
- scoreText.setText(newScore);
- };
-});
-var PurchaseButton = Container.expand(function () {
- var self = Container.call(this);
- var buttonGraphics = self.attachAsset('purchaseButton', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
-// Reticle class to manage reticle behavior
-var Reticle = Container.expand(function () {
- var self = Container.call(this);
- var reticleGraphics = self.attachAsset('reticle1', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.update = function () {
- // Add any specific update logic for the reticle here
- };
- // Start the pulsating effect for the reticle
- startPulsating(self);
-});
-// Sparkle class to manage sparkle behavior
-var Sparkle = Container.expand(function () {
- var self = Container.call(this);
- var sparkleGraphics = self.attachAsset('sparkle', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.update = function () {
- // Add floating animation logic here
- self.y += Math.sin(LK.ticks / 20) * 0.5;
- // Generate sparkle dust particles
- if (Math.random() < 0.1) {
- var dust = new SparkleDust();
- dust.x = self.x;
- dust.y = self.y;
- game.addChild(dust);
- }
- };
- self.handleCollection = function () {
- // Add collection state management here
- self.destroy();
- };
-});
-var SparkleCounter = Container.expand(function () {
- var self = Container.call(this);
- var counterGraphics = self.attachAsset('sparkleCounter', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
-// SparkleSystem class to manage sparkle generation and updates
-// Stack1 class to represent the stack1 image
-var Stack1 = Container.expand(function () {
- var self = Container.call(this);
- var stackGraphics = self.attachAsset('stack1', {
- anchorX: 0.5,
- anchorY: 0.5,
- rotation: Math.PI / -12
- });
- self.update = function () {
- // Add any specific update logic for stack1 here
- };
-});
-// ScoreManager class to manage score logic
-// Sun class to represent a sun in the top right corner
-var Sun = Container.expand(function () {
- var self = Container.call(this);
- var sunGraphics = self.attachAsset('sun', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.pulse = new SunPulse(sunGraphics);
- self.pulse.startPulsating();
-});
-// Function to create a pulsating effect
-// Tree class to represent a tree with a 9:16 aspect ratio
-var Tree = Container.expand(function () {
- var self = Container.call(this);
- var treeGraphics = self.attachAsset('tree', {
- anchorX: 0.5,
- anchorY: 1,
- antialias: true,
- // Apply antialias effect
- stroke: 0x000000,
- // Add a black stroke
- strokeThickness: 15 // Set stroke thickness to 15px
- });
- self.update = function () {
- // Add any specific update logic for the tree here
- };
-});
-var TreeBase = Container.expand(function () {
- var self = Container.call(this);
- var baseGraphics = self.attachAsset('treeBase', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
-// UFO class to manage UFO behavior
-var UFO = Container.expand(function () {
- var self = Container.call(this);
- var ufoGraphics = self.attachAsset('ufo', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.speed = 3.2;
- self.lastX = self.x;
- self.update = function () {
- self.x += self.speed;
- if (self.lastX <= 2048 + self.width / 2 && self.x > 2048 + self.width / 2 || self.lastX >= -self.width / 2 && self.x < -self.width / 2) {
- self.destroy();
- ufo = null;
- return;
- }
- self.lastX = self.x;
- };
- self.findNearestSparkle = function () {
- var nearest = null;
- var minDistance = Infinity;
- sparkles.forEach(function (sparkle) {
- var distance = Math.sqrt(Math.pow(sparkle.x - self.x, 2) + Math.pow(sparkle.y - self.y, 2));
- if (distance < minDistance) {
- minDistance = distance;
- nearest = sparkle;
- }
- });
- return nearest;
- };
- self.moveToSparkle = function () {
- var target = self.findNearestSparkle();
- if (target) {
- self.x += (target.x - self.x) * 0.05;
- self.y += (target.y - self.y) * 0.05;
- if (Math.abs(target.x - self.x) < 5 && Math.abs(target.y - self.y) < 5) {
- self.collectSparkle(target);
- }
- }
- };
- self.collectSparkle = function (sparkle) {
- sparkle.handleCollection();
- sparkles.splice(sparkles.indexOf(sparkle), 1);
- // Add collection beam effect
- var beam = new CollectionBeam();
- beam.x = self.x;
- beam.y = self.y;
- game.addChild(beam);
- };
-});
-
-/****
* Initialize Game
****/
-// UFOMovement class to handle UFO movement
-/****
-* Assets
-LK.init.shape('branch', {width:50, height:10, color:0x8b4513, shape:'box'})
-****/
-// Initialize clouds array
var game = new LK.Game({
- // No title, no description
- backgroundColor: 0x000000 // Black
+ backgroundColor: 0x000000
});
/****
* Game Code
****/
-var TreePulse = function TreePulse(treeGraphics) {
- this.treeGraphics = treeGraphics;
- this.startPulsating = function () {
- function pulsate() {
- tween(this.treeGraphics, {
- scaleX: 1.05,
- scaleY: 1.05
- }, {
- duration: 500,
- easing: tween.easeInOut,
- onFinish: function () {
- tween(this.treeGraphics, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: 500,
- easing: tween.easeInOut,
- onFinish: pulsate.bind(this)
- });
- }.bind(this)
- });
- }
- pulsate.call(this);
- };
-};
-var sparkleCounter = game.addChild(new SparkleCounter());
-sparkleCounter.x = 128;
-sparkleCounter.y = 64;
-var purchaseButton = game.addChild(new PurchaseButton());
-purchaseButton.x = 2048 - 128;
-purchaseButton.y = 64;
-var cosmicTree = game.addChild(new CosmicTree());
-cosmicTree.x = 2048 / 2;
-cosmicTree.y = 2732 - 500;
-var treeBase = game.addChild(new TreeBase());
-treeBase.x = 2048 / 2;
-treeBase.y = 2732 - 100;
-var platforms = [];
-for (var i = 0; i < 6; i++) {
- var angle = i / 6 * Math.PI * 2;
- var platform = new CatPlatform();
- platform.x = 2048 / 2 + Math.cos(angle) * 300;
- platform.y = 2732 - 100 + Math.sin(angle) * 300;
- platforms.push(platform);
- game.addChild(platform);
+// Game state
+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 initializeSoundSystem() {
- // Add logic to set up audio management
-}
-function loadGameState() {
- // Add logic to restore saved progress
-}
-function saveGameState() {
- // Add logic to store progress to localStorage
-}
-function updateUI() {
- // Add logic to keep display current
-}
-function handlePurchases() {
- // Add logic to manage resource spending
-}
-function createSparkle(x, y) {
- var sparkle = new Sparkle();
- sparkle.x = x;
- sparkle.y = y;
- sparkles.push(sparkle);
- game.addChild(sparkle);
-}
-function updateSparkles() {
- sparkles.forEach(function (sparkle) {
- sparkle.update();
- });
-}
-function spawnBirds() {
- for (var i = 0; i < 3; i++) {
- var bird = new Bird();
- bird.setRandomPosition();
- birds.push(bird);
- game.addChild(bird);
- }
-}
-// Function to spawn birds
-// BugFixer class to manage final testing and bug fixes
-// SunPulse class to handle the pulsating effect for Sun
-function spawnBird() {
- var bird = new Bird();
- bird.x = Math.random() * 2048;
- bird.y = -bird.height;
- bird.speed = 1 + Math.random() * 0.6;
- bird.lastIntersecting = false;
- birds.push(bird);
- game.addChild(bird);
-}
-// SparkleSystem class to manage sparkle generation and updates
-var SparkleSystem = function SparkleSystem() {
- this.sparkles = [];
- this.createSparkle = function (x, y) {
- var sparkle = new Sparkle();
- sparkle.x = x;
- sparkle.y = y;
- this.sparkles.push(sparkle);
- game.addChild(sparkle);
+function _regeneratorRuntime() {
+ "use strict";
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
+ _regeneratorRuntime = function _regeneratorRuntime() {
+ return e;
};
- this.updateSparkles = function () {
- this.sparkles.forEach(function (sparkle) {
- sparkle.update();
+ var t,
+ e = {},
+ r = Object.prototype,
+ n = r.hasOwnProperty,
+ o = Object.defineProperty || function (t, e, r) {
+ t[e] = r.value;
+ },
+ i = "function" == typeof Symbol ? Symbol : {},
+ a = i.iterator || "@@iterator",
+ c = i.asyncIterator || "@@asyncIterator",
+ u = i.toStringTag || "@@toStringTag";
+ function define(t, e, r) {
+ return Object.defineProperty(t, e, {
+ value: r,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }), t[e];
+ }
+ try {
+ define({}, "");
+ } catch (t) {
+ define = function define(t, e, r) {
+ return t[e] = r;
+ };
+ }
+ function wrap(t, e, r, n) {
+ var i = e && e.prototype instanceof Generator ? e : Generator,
+ a = Object.create(i.prototype),
+ c = new Context(n || []);
+ return o(a, "_invoke", {
+ value: makeInvokeMethod(t, r, c)
+ }), a;
+ }
+ function tryCatch(t, e, r) {
+ try {
+ return {
+ type: "normal",
+ arg: t.call(e, r)
+ };
+ } catch (t) {
+ return {
+ type: "throw",
+ arg: t
+ };
+ }
+ }
+ e.wrap = wrap;
+ var h = "suspendedStart",
+ l = "suspendedYield",
+ f = "executing",
+ s = "completed",
+ y = {};
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+ var p = {};
+ define(p, a, function () {
+ return this;
+ });
+ var d = Object.getPrototypeOf,
+ v = d && d(d(values([])));
+ v && v !== r && n.call(v, a) && (p = v);
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
+ function defineIteratorMethods(t) {
+ ["next", "throw", "return"].forEach(function (e) {
+ define(t, e, function (t) {
+ return this._invoke(e, t);
+ });
});
- };
-};
-var IdleProgressionSystem = function IdleProgressionSystem() {
- this.progress = 0;
- this.update = function () {
- this.progress += 0.1;
- if (this.progress >= 100) {
- this.progress = 0;
- // Trigger some idle reward or event
- console.log("Idle reward triggered!");
+ }
+ function AsyncIterator(t, e) {
+ function invoke(r, o, i, a) {
+ var c = tryCatch(t[r], t, o);
+ if ("throw" !== c.type) {
+ var u = c.arg,
+ h = u.value;
+ return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
+ invoke("next", t, i, a);
+ }, function (t) {
+ invoke("throw", t, i, a);
+ }) : e.resolve(h).then(function (t) {
+ u.value = t, i(u);
+ }, function (t) {
+ return invoke("throw", t, i, a);
+ });
+ }
+ a(c.arg);
}
- };
-};
-var SparkleSystem = function SparkleSystem() {
- this.sparkles = [];
- this.createSparkle = function (x, y) {
- var sparkle = new Sparkle();
- sparkle.x = x;
- sparkle.y = y;
- this.sparkles.push(sparkle);
- game.addChild(sparkle);
- };
- this.updateSparkles = function () {
- this.sparkles.forEach(function (sparkle) {
- sparkle.update();
+ var r;
+ o(this, "_invoke", {
+ value: function value(t, n) {
+ function callInvokeWithMethodAndArg() {
+ return new e(function (e, r) {
+ invoke(t, n, e, r);
+ });
+ }
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
+ }
});
- };
-};
-var UFOCollection = function UFOCollection(ufo, sparkles) {
- this.ufo = ufo;
- this.sparkles = sparkles;
- this.findNearestSparkle = function () {
- var nearest = null;
- var minDistance = Infinity;
- this.sparkles.forEach(function (sparkle) {
- var distance = Math.sqrt(Math.pow(sparkle.x - this.ufo.x, 2) + Math.pow(sparkle.y - this.ufo.y, 2));
- if (distance < minDistance) {
- minDistance = distance;
- nearest = sparkle;
+ }
+ function makeInvokeMethod(e, r, n) {
+ var o = h;
+ return function (i, a) {
+ if (o === f) {
+ throw Error("Generator is already running");
}
- }.bind(this));
- return nearest;
- };
- this.moveToSparkle = function () {
- var target = this.findNearestSparkle();
- if (target) {
- this.ufo.x += (target.x - this.ufo.x) * 0.05;
- this.ufo.y += (target.y - this.ufo.y) * 0.05;
- if (Math.abs(target.x - this.ufo.x) < 5 && Math.abs(target.y - this.ufo.y) < 5) {
- this.collectSparkle(target);
+ if (o === s) {
+ if ("throw" === i) {
+ throw a;
+ }
+ return {
+ value: t,
+ done: !0
+ };
}
- }
- };
- this.collectSparkle = function (sparkle) {
- sparkle.handleCollection();
- this.sparkles.splice(this.sparkles.indexOf(sparkle), 1);
- };
-};
-var CatCharmMechanics = function CatCharmMechanics(cat, birds) {
- this.cat = cat;
- this.birds = birds;
- this.charmRadius = 100;
- this.cooldown = false;
- this.tryCharmBird = function () {
- if (!this.cooldown) {
- this.birds.forEach(function (bird) {
- if (Math.abs(bird.x - this.cat.x) < this.charmRadius && Math.abs(bird.y - this.cat.y) < this.charmRadius) {
- bird.handleCharmed();
+ for (n.method = i, n.arg = a;;) {
+ var c = n.delegate;
+ if (c) {
+ var u = maybeInvokeDelegate(c, n);
+ if (u) {
+ if (u === y) {
+ continue;
+ }
+ return u;
+ }
}
- }.bind(this));
- this.handleCharmCooldown();
- }
- };
- this.handleCharmCooldown = function () {
- this.cooldown = true;
- setTimeout(function () {
- this.cooldown = false;
- }.bind(this), 3000);
- };
-};
-var BirdMovement = function BirdMovement(bird, birdGraphics) {
- this.bird = bird;
- this.birdGraphics = birdGraphics;
- this.bird.speed = Math.random() * 1.6 + 1;
- this.bird.lastY = this.bird.y;
- this.bird.lastX = this.bird.x;
- this.bird.update = function () {
- this.y += this.speed;
- this.x += Math.sin(this.y / 100) * 6.5;
- if (this.lastY <= 2732 && this.y > 2732) {
- this.destroy();
- birds.splice(birds.indexOf(this.bird), 1);
- return;
- }
- if (this.birdGraphics) {
- if (this.lastX <= this.x) {
- this.birdGraphics.texture = LK.getAsset('bird-right', {}).texture;
- } else if (this.lastX > this.x) {
- this.birdGraphics.texture = LK.getAsset('bird-left', {}).texture;
+ if ("next" === n.method) {
+ n.sent = n._sent = n.arg;
+ } else if ("throw" === n.method) {
+ if (o === h) {
+ throw o = s, n.arg;
+ }
+ n.dispatchException(n.arg);
+ } else {
+ "return" === n.method && n.abrupt("return", n.arg);
+ }
+ o = f;
+ var p = tryCatch(e, r, n);
+ if ("normal" === p.type) {
+ if (o = n.done ? s : l, p.arg === y) {
+ continue;
+ }
+ return {
+ value: p.arg,
+ done: n.done
+ };
+ }
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
}
- this.lastX = this.x;
+ };
+ }
+ function maybeInvokeDelegate(e, r) {
+ var n = r.method,
+ o = e.iterator[n];
+ if (o === t) {
+ return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
}
- this.lastY = this.y;
- };
-};
-var BugFixer = function BugFixer() {
- this.fixBugs = function () {
- // Add bug fixing logic here
- };
-};
-// PerformanceOptimizer class to manage performance and memory usage
-var PerformanceOptimizer = function PerformanceOptimizer() {
- this.optimize = function () {
- // Add optimization logic here
- };
-};
-// EconomySystem class to manage gameplay mechanics and economy
-var EconomySystem = function EconomySystem() {
- this.balanceMechanics = function () {
- // Add balancing logic here
- };
-};
-// AnimationSystem class to manage animations and visual feedback
-var AnimationSystem = function AnimationSystem() {
- this.playIdleAnimation = function (character) {
- // Add idle animation logic here
- };
- this.playFlightAnimation = function (bird) {
- // Add flight animation logic here
- };
- this.playBeamEffect = function (ufo) {
- // Add beam effect logic here
- };
-};
-// SoundSystem class to manage sound effects and music
-var SoundSystem = function SoundSystem() {
- this.initializeSoundSystem = function () {
- // Add sound system initialization logic here
- };
-};
-// SaveLoadSystem class to manage game state saving and loading
-var SaveLoadSystem = function SaveLoadSystem() {
- this.saveGameState = function () {
- // Add save logic here
- };
- this.loadGameState = function () {
- // Add load logic here
- };
-};
-// PurchaseSystem class to manage purchases and upgrades
-var PurchaseSystem = function PurchaseSystem() {
- this.handlePurchases = function () {
- // Add purchase logic here
- };
- this.updateUI = function () {
- // Add UI update logic here
- };
-};
-// CharmMechanics class to manage charm mechanics
-var CharmMechanics = function CharmMechanics() {
- this.tryCharmBird = function (cat, birds) {
- // Add charm logic here
- };
- this.getCharmRadius = function () {
- return 100; // Example radius
- };
- this.handleCharmCooldown = function () {
- // Add cooldown management here
- };
-};
-// ParticleSystem class to manage particle effects
-var ParticleSystem = function ParticleSystem() {
- this.createSparkleDust = function (x, y) {
- // Add sparkle dust generation logic here
- };
- this.createBeamEffect = function (x, y) {
- // Add beam effect logic here
- };
-};
-// IdleProgression class to manage idle progression mechanics
-var IdleProgression = function IdleProgression() {
- this.progress = 0;
- this.update = function () {
- // Add idle progression logic here
- };
-};
-var SunPulse = function SunPulse(sunGraphics) {
- this.sunGraphics = sunGraphics;
- this.startPulsating = function () {
- function pulsate() {
- tween(this.sunGraphics, {
- scaleX: 1.1,
- scaleY: 1.1
- }, {
- duration: 1000,
- easing: tween.easeInOut,
- onFinish: function () {
- tween(this.sunGraphics, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: 1000,
- easing: tween.easeInOut,
- onFinish: pulsate.bind(this)
- });
- }.bind(this)
- });
+ var i = tryCatch(o, e.iterator, r.arg);
+ if ("throw" === i.type) {
+ return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
}
- pulsate.call(this);
- };
-};
-// Light1Pulse class to handle the pulsating effect for Light1
-var Light1Pulse = function Light1Pulse(lightGraphics) {
- this.lightGraphics = lightGraphics;
- this.startPulsating = function () {
- function pulsate() {
- tween(this.lightGraphics, {
- scaleX: 1.6,
- scaleY: 1.6
- }, {
- duration: 1500,
- easing: tween.easeInOut,
- onFinish: function () {
- tween(this.lightGraphics, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: 1500,
- easing: tween.easeInOut,
- onFinish: pulsate.bind(this)
- });
- }.bind(this)
- });
- }
- pulsate.call(this);
- };
-};
-var bird2; // Define bird2 variable in the global scope
-// Bird2Effects class to handle effects and animations for Bird2
-// Function to create a pulsating effect
-function startPulsating(target) {
- var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 888;
- function pulsate() {
- tween(target, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: duration,
- easing: tween.easeInOut,
- onFinish: function onFinish() {
- tween(target, {
- scaleX: 1.0,
- scaleY: 1.0
- }, {
- duration: duration,
- easing: tween.easeInOut,
- onFinish: pulsate
- });
- }
- });
+ var a = i.arg;
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
}
- pulsate();
-}
-// UFOSound class to manage UFO sound effects
-// UFOMovement class to handle UFO movement
-var UFOMovement = function UFOMovement(ufo, ufoGraphics) {
- this.ufo = ufo;
- this.ufoGraphics = ufoGraphics;
- this.ufo.speed = 3.2; // Decrease speed by 20%
- this.ufo.direction = Math.random() < 0.5 ? 1 : -1; // Random direction: 1 for right, -1 for left
- this.ufo.lastX = this.ufo.x; // Track last X position for future checks
- this.ufo.update = function () {
- this.x += this.speed * this.direction;
- this.y = 100 + Math.sin(this.x / 100) * 250; // Slow down the wave pattern by 50%
- // Stop playing ufo1 sound after UFO leaves the screen
- if (this.lastX <= 2048 + this.width / 2 && this.x > 2048 + this.width / 2 || this.lastX >= -this.width / 2 && this.x < -this.width / 2) {
- this.destroy(); // Destroy the UFO when it moves off-screen
- ufo = null;
- LK.getSound('ufo1').stop();
- return; // Exit the update function
+ function pushTryEntry(t) {
+ var e = {
+ tryLoc: t[0]
+ };
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
+ }
+ function resetTryEntry(t) {
+ var e = t.completion || {};
+ e.type = "normal", delete e.arg, t.completion = e;
+ }
+ function Context(t) {
+ this.tryEntries = [{
+ tryLoc: "root"
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
+ }
+ function values(e) {
+ if (e || "" === e) {
+ var r = e[a];
+ if (r) {
+ return r.call(e);
+ }
+ if ("function" == typeof e.next) {
+ return e;
+ }
+ if (!isNaN(e.length)) {
+ var o = -1,
+ i = function next() {
+ for (; ++o < e.length;) {
+ if (n.call(e, o)) {
+ return next.value = e[o], next.done = !1, next;
+ }
+ }
+ return next.value = t, next.done = !0, next;
+ };
+ return i.next = i;
+ }
}
- this.lastX = this.x; // Update lastX after movement
- };
-};
-var UFOSound = function UFOSound() {
- this.play = function () {
- LK.getSound('ufo1').play();
- };
-};
-// BackgroundMusic class to manage background music
-var BackgroundMusic = function BackgroundMusic() {
- this.play = function () {
- LK.playMusic('bgm1', {
- loop: true,
- fade: {
- start: 0,
- end: 1,
- duration: 4000
- },
- onEnd: onBgm1End
+ throw new TypeError(_typeof(e) + " is not iterable");
+ }
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
+ value: GeneratorFunctionPrototype,
+ configurable: !0
+ }), o(GeneratorFunctionPrototype, "constructor", {
+ value: GeneratorFunction,
+ configurable: !0
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
+ var e = "function" == typeof t && t.constructor;
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
+ }, e.mark = function (t) {
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
+ }, e.awrap = function (t) {
+ return {
+ __await: t
+ };
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
+ return this;
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
+ void 0 === i && (i = Promise);
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
+ return t.done ? t.value : a.next();
});
- };
-};
-// LaserSound class to manage laser sound effects
-var LaserSound = function LaserSound() {
- this.play = function () {
- LK.getSound('laser1').play();
- };
-};
-var Bird1Movement = function Bird1Movement(bird, birdGraphics) {
- this.bird = bird;
- this.birdGraphics = birdGraphics;
- this.bird.speed = Math.random() * 1.6 + 1;
- this.bird.lastY = this.bird.y; // Initialize lastY for tracking changes on Y
- this.bird.lastX = this.bird.x; // Initialize lastX for tracking changes on X
- this.bird.update = function () {
- this.y += this.speed;
- this.x += Math.sin(this.y / 100) * 6.5; // Increase the swooping motion of the bird's movement by 30%
- // Check if the bird has moved off-screen
- if (this.lastY <= 2732 && this.y > 2732) {
- this.destroy(); // Destroy the bird when it moves off-screen
- birds.splice(birds.indexOf(this.bird), 1); // Remove bird from the array
- return; // Exit the update function
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
+ return this;
+ }), define(g, "toString", function () {
+ return "[object Generator]";
+ }), e.keys = function (t) {
+ var e = Object(t),
+ r = [];
+ for (var n in e) {
+ r.push(n);
}
- if (this.birdGraphics) {
- if (this.lastX <= this.x) {
- this.birdGraphics.texture = LK.getAsset('bird1-right', {}).texture;
- } else if (this.lastX > this.x) {
- this.birdGraphics.texture = LK.getAsset('bird1-left', {}).texture;
+ return r.reverse(), function next() {
+ for (; r.length;) {
+ var t = r.pop();
+ if (t in e) {
+ return next.value = t, next.done = !1, next;
+ }
}
- this.lastX = this.x; // Update lastX after movement
- }
- this.lastY = this.y; // Update lastY after movement
- };
-};
-var Bird2Movement = function Bird2Movement(bird, birdGraphics) {
- this.bird = bird;
- this.birdGraphics = birdGraphics;
- this.bird.speed = Math.random() * 1.6 + 1;
- this.bird.lastY = this.bird.y; // Initialize lastY for tracking changes on Y
- this.bird.lastX = this.bird.x; // Initialize lastX for tracking changes on X
- this.bird.update = function () {
- this.y += this.speed;
- this.x += Math.sin(this.y / 100) * 6.5; // Increase the swooping motion of the bird's movement by 30%
- if (this.birdGraphics) {
- if (this.lastX <= this.x) {
- this.birdGraphics.texture = LK.getAsset('bird2-right', {}).texture;
- } else if (this.lastX > this.x) {
- this.birdGraphics.texture = LK.getAsset('bird2-left', {}).texture;
+ return next.done = !0, next;
+ };
+ }, e.values = values, Context.prototype = {
+ constructor: Context,
+ reset: function reset(e) {
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) {
+ for (var r in this) {
+ "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
+ }
}
- this.lastX = this.x; // Update lastX after movement
- }
- // Check if the bird has moved off-screen
- if (this.lastY <= 2732 && this.y > 2732) {
- this.destroy(); // Destroy the bird when it moves off-screen
- birds.splice(birds.indexOf(this.bird), 1); // Remove bird from the array
- return; // Exit the update function
- }
- this.lastY = this.y; // Update lastY after movement
- };
-};
-var CloudMovement = function CloudMovement(cloud, cloudGraphics) {
- this.cloud = cloud;
- this.cloudGraphics = cloudGraphics;
- this.cloud.speed = Math.random() * 0.55 + 0.25; // Adjust speed to range between 0.25 and 0.8
- this.cloud.hasAccelerated = false; // Track if the cloud has already accelerated
- this.cloud.direction = Math.random() < 0.5 ? 1 : -1; // Random direction: 1 for right, -1 for left
- this.cloud.lastX = this.cloud.x; // Track last X position for future checks
- this.cloud.lastIntersecting = false; // Initialize lastIntersecting for tracking changes on intersections
- this.cloud.update = function () {
- this.x += this.speed * this.direction;
- // If the cloud moves off-screen, reposition it to the opposite side
- if (this.lastX <= 2048 + this.width / 2 && this.x > 2048 + this.width / 2 || this.lastX >= -this.width / 2 && this.x < -this.width / 2) {
- this.destroy(); // Destroy the cloud when it moves off-screen
- clouds.splice(clouds.indexOf(this.cloud), 1); // Remove cloud from the array
- return; // Exit the update function
- }
- // Check for overlap with other clouds
- for (var i = 0; i < clouds.length; i++) {
- if (clouds[i] !== this && this.intersects(clouds[i])) {
- if (!this.hasAccelerated) {
- this.speed *= 1.5; // Increase speed by 50%
- this.hasAccelerated = true; // Mark as accelerated
+ },
+ stop: function stop() {
+ this.done = !0;
+ var t = this.tryEntries[0].completion;
+ if ("throw" === t.type) {
+ throw t.arg;
+ }
+ return this.rval;
+ },
+ dispatchException: function dispatchException(e) {
+ if (this.done) {
+ throw e;
+ }
+ var r = this;
+ function handle(n, o) {
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
+ }
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
+ var i = this.tryEntries[o],
+ a = i.completion;
+ if ("root" === i.tryLoc) {
+ return handle("end");
}
- break;
- } else if (this.hasAccelerated && !this.intersects(clouds[i])) {
- this.speed /= 1.5; // Reset speed to original
- this.hasAccelerated = false; // Reset acceleration state
+ if (i.tryLoc <= this.prev) {
+ var c = n.call(i, "catchLoc"),
+ u = n.call(i, "finallyLoc");
+ if (c && u) {
+ if (this.prev < i.catchLoc) {
+ return handle(i.catchLoc, !0);
+ }
+ if (this.prev < i.finallyLoc) {
+ return handle(i.finallyLoc);
+ }
+ } else if (c) {
+ if (this.prev < i.catchLoc) {
+ return handle(i.catchLoc, !0);
+ }
+ } else {
+ if (!u) {
+ throw Error("try statement without catch or finally");
+ }
+ if (this.prev < i.finallyLoc) {
+ return handle(i.finallyLoc);
+ }
+ }
+ }
}
- }
- // Check if the cloud intersects with the sun
- if (!this.lastIntersecting && this.intersects(sun)) {
- this.speed *= 2; // Double the speed when touching the sun
- if (this.cloudGraphics) {
- tween(this.cloudGraphics, {
- alpha: 0.5
- }, {
- duration: 3000,
- easing: tween.linear
- });
+ },
+ abrupt: function abrupt(t, e) {
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
+ var o = this.tryEntries[r];
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+ var i = o;
+ break;
+ }
}
- } else if (this.lastIntersecting && !this.intersects(sun)) {
- this.speed /= 2; // Reset speed to original when not touching the sun
- if (this.cloudGraphics) {
- tween(this.cloudGraphics, {
- alpha: 1.0
- }, {
- duration: 3000,
- easing: tween.linear
- });
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
+ var a = i ? i.completion : {};
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
+ },
+ complete: function complete(t, e) {
+ if ("throw" === t.type) {
+ throw t.arg;
}
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
+ },
+ finish: function finish(t) {
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+ var r = this.tryEntries[e];
+ if (r.finallyLoc === t) {
+ return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
+ }
+ }
+ },
+ "catch": function _catch(t) {
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+ var r = this.tryEntries[e];
+ if (r.tryLoc === t) {
+ var n = r.completion;
+ if ("throw" === n.type) {
+ var o = n.arg;
+ resetTryEntry(r);
+ }
+ return o;
+ }
+ }
+ throw Error("illegal catch attempt");
+ },
+ delegateYield: function delegateYield(e, r, n) {
+ return this.delegate = {
+ iterator: values(e),
+ resultName: r,
+ nextLoc: n
+ }, "next" === this.method && (this.arg = t), y;
}
- this.lastIntersecting = this.intersects(sun);
- this.lastX = this.x; // Update lastX after movement
- };
-};
-var Bird2Effects = function Bird2Effects(bird) {
- this.bird = bird;
- this.applyEffects = function () {
- // Add any specific effects or animations for Bird2 here
- };
-};
-// Bird1Effects class to handle effects and animations for Bird1
-var Bird1Effects = function Bird1Effects(bird) {
- this.bird = bird;
- this.applyEffects = function () {
- // Add any specific effects or animations for Bird1 here
- };
-};
-var background = LK.getAsset('background', {
- anchorX: 0.5,
- anchorY: 0.5
-});
-background.x = 2048 / 2;
-background.y = 2732 / 2 - 100;
-game.addChild(background);
-// ScoreManager class to manage score logic
-var ScoreManager = function ScoreManager() {
- var self = this;
- self.score = 0;
- self.addScore = function (points) {
- self.score += points;
- return self.score;
- };
- self.resetScore = function () {
- self.score = 0;
- };
- self.getScore = function () {
- return self.score;
- };
-};
-var ScoreManager = function ScoreManager() {
- var self = this;
- self.score = 0;
- self.addScore = function (points) {
- self.score += points;
- return self.score;
- };
- self.resetScore = function () {
- self.score = 0;
- };
- self.getScore = function () {
- return self.score;
- };
-};
-var birds = [];
-game.down = function (x, y, obj) {
- // Check if tap is on the tree
- if (tree.containsPoint({
- x: x,
- y: y
- })) {
- // Trigger sparkle burst effect
- sparkleSystem.createSparkle(x, y);
- // Add tree tap burst effect
- var burstEffect = new TreeTapBurst();
- burstEffect.x = x;
- burstEffect.y = y;
- game.addChild(burstEffect);
+ }, e;
+}
+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);
}
- if (!game.reticle) {
- game.reticle = game.addChild(new Reticle());
- if (game.children.includes(game.reticle)) {
- game.setChildIndex(game.reticle, 7); // Set reticle to be rendered after the tree
- }
+ 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));
+ });
}
- game.reticle.x = x;
- game.reticle.y = y;
- var laser = new Laser(cat.x - 140, cat.y - 440, x, y); // laser starting point
- game.addChild(laser);
- if (game.children.includes(laser) && game.children.includes(game.reticle)) {
- game.setChildIndex(laser, game.getChildIndex(game.reticle) + 1); // Ensure laser is rendered after the reticle
+ 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 _toPropertyKey(t) {
+ var i = _toPrimitive(t, "string");
+ return "symbol" == _typeof(i) ? i : i + "";
+}
+function _toPrimitive(t, r) {
+ if ("object" != _typeof(t) || !t) {
+ return t;
}
- // Add sparkle burst effect on tree tap
- if (tree.containsPoint({
- x: x,
- y: y
- })) {
- for (var i = 0; i < 5; i++) {
- sparkleSystem.createSparkle(x + Math.random() * 100 - 50, y + Math.random() * 100 - 50);
+ 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.");
}
-};
-var VOLUME_BGM1 = 0.02;
-var VOLUME_BREEZE1 = 0.02;
-var VOLUME_CRICKET1 = 0.02;
-var VOLUME_FROG1 = 0.02;
-var VOLUME_SONGBIRD1 = 0.02;
-var VOLUME_UFO1 = 0.02;
-var VOLUME_WINGS1 = 0.02;
-game.move = function (x, y, obj) {
- if (!game.reticle) {
- game.reticle = game.addChild(new Reticle());
- }
- if (obj.event) {
- var x = obj.event.x;
- var y = obj.event.y;
- }
- game.reticle.x = x;
- game.reticle.y = y;
-};
-// Add a sun to the game in the top left corner
-var sun = game.addChild(new Sun());
-sun.x = 480;
-sun.y = 680;
-// Ensure sun is added to the game before setting its index
-if (game.children.includes(sun)) {
- game.setChildIndex(sun, 1); // Set sun to be rendered after the background
+ return ("string" === r ? String : Number)(t);
}
-var light1 = game.addChild(new Light1());
-light1.x = 530; // Move light1 right by 50px
-light1.y = 1500; // Move light1 down by 210px
-// Ensure light1 is added to the game before setting its index
-if (game.children.includes(light1)) {
- game.setChildIndex(light1, 2); // Set light1 to be rendered after the sun
-}
-// Function to add a UFO to the game
-function addUFO() {
- var ufo = new UFO();
- game.addChild(ufo);
- // Ensure UFO is added to the game before setting its index
- if (game.children.includes(ufo) && game.children.includes(clouds[0])) {
- game.setChildIndex(ufo, game.getChildIndex(clouds[0]) + 1); // Set UFO to be rendered after the first cloud
+function asyncGeneratorStep(n, t, e, r, o, a, c) {
+ try {
+ var i = n[a](c),
+ u = i.value;
+ } catch (n) {
+ return void e(n);
}
- ufo.x = Math.random() < 0.5 ? 2048 + ufo.width / 2 : -ufo.width / 2; // Start from either the far right or left edge of the screen
- ufo.y = Math.random() * (2732 / 2 - ufo.height); // Random initial y position within the top half of the screen
- ufo.customUpdate = function () {
- ufo.update();
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
+}
+function _asyncToGenerator(n) {
+ return function () {
+ var t = this,
+ e = arguments;
+ return new Promise(function (r, o) {
+ var a = n.apply(t, e);
+ function _next(n) {
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
+ }
+ function _throw(n) {
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
+ }
+ _next(void 0);
+ });
};
- // Removed ufo sound playing at startup
- return ufo;
}
-// Initialize clouds array
-var clouds = [];
-for (var i = 0; i < 4; i++) {
- // Add 3 clouds for variety
- var cloud = new Cloud();
- cloud.x = Math.random() * 2048;
- cloud.y = Math.random() * (2732 / 2); // Position clouds in the upper half of the screen
- clouds.push(cloud);
- game.addChild(cloud);
- // Ensure cloud is added to the game before setting its index
- if (game.children.includes(cloud)) {
- game.setChildIndex(cloud, 2); // Set clouds to be rendered after the sun
- }
+var sparkleCount = 500;
+var cats = [];
+var branches = [];
+var notifications = [];
+var room = null;
+var localParticipant = null;
+var sparkleInterval = null;
+// Helper functions
+var isoX = function isoX(x, y) {
+ return (x - y) * 0.866;
+};
+var isoY = function isoY(x, y, z) {
+ return (x + y) * 0.5 - z;
+};
+// DOM elements
+var sparkleCountEl = document.createElement('div');
+sparkleCountEl.className = 'sparkle-count';
+sparkleCountEl.textContent = "Sparkles: ".concat(sparkleCount);
+document.body.appendChild(sparkleCountEl);
+// Connect to LiveKit room
+function connectToRoom() {
+ return _connectToRoom.apply(this, arguments);
+} // Initialize game
+function _connectToRoom() {
+ _connectToRoom = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ _context.prev = 1;
+ room = new Room();
+ _context.next = 7;
+ return room.connect('wss://your-livekit-server.com', 'cosmic-cat-room');
+ case 7:
+ localParticipant = room.localParticipant;
+ // Initialize game after connection
+ initializeGame();
+ // Setup room event listeners
+ room.on('dataReceived', handleData);
+ _context.next = 19;
+ break;
+ case 15:
+ _context.prev = 15;
+ _context.t0 = _context["catch"](1);
+ console.error('connection failed:', _context.t0);
+ case 19:
+ case "end":
+ return _context.stop();
+ }
+ }
+ }, _callee, null, [[1, 15]]);
+ }));
+ return _connectToRoom.apply(this, arguments);
}
-var bird1; // Define bird1 variable in the global scope
-// Initialize birds
-spawnBird1();
-spawnBird2();
-spawnBird2();
-// Initialize a timer to add a UFO at a random time between 20 and 30 seconds
-var ufo; // Define the ufo variable in the global scope
-var laser; // Define the laser variable in the global scope
-var ufoTimer = LK.setTimeout(function () {
- addUFO();
- // Reset the timer for the UFO to reappear between 10-20 seconds
- ufoTimer = LK.setTimeout(arguments.callee, Math.random() * 10000 + 10000);
-}, Math.random() * 10000 + 10000); // Initial interval for UFO appearances between 10 to 20 seconds
-game.update = function () {
- for (var i = 0; i < clouds.length; i++) {
- clouds[i].update();
- }
- // Add a jet to the game
- if (!game.jet) {
- var jet = new Jet();
- jet.x = Math.random() < 0.5 ? 2048 + jet.width / 2 : -jet.width / 2; // Start from either the far right or left edge of the screen
- jet.y = Math.random() * (2732 - jet.height); // Random initial y position within the screen height
- game.addChild(jet);
- if (game.children.includes(jet)) {
- game.setChildIndex(jet, game.children.length - 1); // Bring the jet to the front by setting its index to the highest value
+function initializeGame() {
+ // Initialize branches
+ branches = [{
+ id: 0,
+ level: 1,
+ catCapacity: 1,
+ upgradeCost: 100,
+ position: {
+ x: 0,
+ y: -50,
+ z: 80
}
- game.jet = jet;
- if (!game.jetSoundPlayed) {
- LK.getSound('jetSound').play(); // Play jet sound when it appears
- game.jetSoundPlayed = true; // Ensure it only plays once
+ }, {
+ id: 1,
+ level: 1,
+ catCapacity: 1,
+ upgradeCost: 100,
+ position: {
+ x: 50,
+ y: 0,
+ z: 80
}
- }
- // Update jet
- if (game.jet) {
- game.jet.update();
- if (game.jet.lastX <= 2048 + game.jet.width / 2 && game.jet.x > 2048 + game.jet.width / 2 || game.jet.lastX >= -game.jet.width / 2 && game.jet.x < -game.jet.width / 2) {
- game.jet.destroy();
- game.jet = null;
- game.jetSoundPlayed = false; // Reset the flag when the jet is removed
- // Set a timer to respawn the jet between 10-20 seconds
- LK.setTimeout(function () {
- var jet = new Jet();
- jet.x = Math.random() < 0.5 ? 2048 + jet.width / 2 : -jet.width / 2; // Start from either the far right or left edge of the screen
- jet.y = Math.random() * (2732 - jet.height); // Random initial y position within the screen height
- game.addChild(jet);
- game.jet = jet;
- if (!game.jetSoundPlayed) {
- LK.getSound('jetSound').play(); // Play jet sound when it appears
- game.jetSoundPlayed = true; // Ensure it only plays once
- }
- }, Math.random() * 10000 + 10000); // Random time between 10-20 seconds
+ }, {
+ id: 2,
+ level: 1,
+ catCapacity: 1,
+ upgradeCost: 100,
+ position: {
+ x: 0,
+ y: 50,
+ z: 80
}
+ }, {
+ id: 3,
+ level: 1,
+ catCapacity: 1,
+ upgradeCost: 100,
+ position: {
+ x: -50,
+ y: 0,
+ z: 80
+ }
+ }];
+ // Initialize starter cat
+ if (localParticipant) {
+ cats = [{
+ id: 'cat-1',
+ level: 1,
+ sparkleRate: 1,
+ upgradeCost: 50,
+ position: {
+ x: 0,
+ y: -70,
+ z: 20
+ },
+ owner: localParticipant.identity
+ }];
}
- if (ufo) {
- ufo.customUpdate();
- // Update each laser
- game.children.forEach(function (child) {
- if (child instanceof Laser) {
- child.update();
- // Check for intersections with birds and UFO
- birds.forEach(function (bird) {
- if (!child.lastIntersecting && child.intersects(bird)) {
- if (bird instanceof Bird1) {
- score += 5;
- } else if (bird instanceof Bird2 || bird instanceof Bird3) {
- score += 1;
- }
- scoreDisplay.updateScore(score); // Update the score display
- bird.destroy(); // Remove the bird when hit by a laser
- birds.splice(birds.indexOf(bird), 1); // Remove bird from the array
- child.destroy();
- }
- child.lastIntersecting = birds.some(function (bird) {
- return child.intersects(bird);
- });
- });
- if (ufo && !child.lastIntersecting && child.intersects(ufo)) {
- score += 25;
- score.updateScore(score);
- child.destroy();
- }
- child.lastIntersecting = birds.some(function (bird) {
- return child.intersects(bird);
- }) || ufo && child.intersects(ufo);
- }
+ // Start sparkle generation
+ sparkleInterval = setInterval(generateSparkles, 3000);
+ // Create UI buttons
+ createButtons();
+}
+// Create game buttons
+function createButtons() {
+ var buyCatBtn = document.createElement('button');
+ buyCatBtn.textContent = 'Buy Cat (50)';
+ buyCatBtn.addEventListener('click', buyCat);
+ document.body.appendChild(buyCatBtn);
+ branches.forEach(function (branch) {
+ var btn = document.createElement('button');
+ btn.textContent = "Upgrade Branch ".concat(branch.id, " (").concat(branch.upgradeCost, ")");
+ btn.addEventListener('click', function () {
+ return upgradeBranch(branch.id);
});
- // Check for intersections between UFO and birds
- birds.forEach(function (bird) {
- if (!ufo.lastIntersecting && ufo.intersects(bird)) {
- bird.destroy(); // Remove the bird when touched by the UFO
- birds.splice(birds.indexOf(bird), 1); // Remove bird from the array
- LK.getSound('electro').play(); // Play the 'electro' sound
- }
- ufo.lastIntersecting = birds.some(function (bird) {
- return ufo.intersects(bird);
- });
- });
- if (ufo.lastX <= 2048 + ufo.width / 2 && ufo.x > 2048 + ufo.width / 2 || ufo.lastX >= -ufo.width / 2 && ufo.x < -ufo.width / 2) {
- // Destroy the UFO and set it to null
- ufo.destroy();
- ufo = null;
- // Start a timer for the UFO to reappear between 30-50 seconds
- ufoTimer = LK.setTimeout(function () {
- ufo = addUFO();
- }, Math.random() * 20000 + 30000);
- } else {}
- ufo.lastX = ufo.x; // Update lastX for the UFO
+ document.body.appendChild(btn);
+ });
+}
+// Game mechanics
+function generateSparkles() {
+ if (!localParticipant) {
+ return;
}
- // Removed auto-targeting update function
-};
-// Function to spawn a third kind of bird
-function spawnBird1() {
- var bird1 = new Bird1();
- bird1.x = Math.random() * 2048;
- bird1.y = -bird1.height;
- bird1.speed = 1 + Math.random() * 0.6;
- bird1.lastIntersecting = false;
- bird1.type = 'bird1'; // Specific property for Bird1
- bird1.color = 0x746130; // Specific color for Bird1
- LK.setTimeout(function () {
- game.addChild(bird1);
- // Ensure bird1 is added to the game before setting its index
- if (game.children.includes(bird1)) {
- if (game.children.includes(bird1) && game.children.includes(tree)) {
- game.setChildIndex(bird1, game.getChildIndex(tree)); // Set Bird1 to be rendered before tree
- }
+ var newSparkles = cats.map(function (cat) {
+ if (cat.owner === localParticipant.identity) {
+ return {
+ id: "sparkle-".concat(Date.now(), "-").concat(Math.random().toString(36).substr(2, 9)),
+ position: {
+ x: cat.position.x + (Math.random() * 20 - 10),
+ y: cat.position.y + (Math.random() * 20 - 10),
+ z: cat.position.z
+ },
+ value: cat.level * cat.sparkleRate,
+ owner: localParticipant.identity
+ };
}
- birds.push(bird1);
- }, 2000);
+ return null;
+ }).filter(Boolean);
+ sparkleCount += newSparkles.reduce(function (sum, s) {
+ return sum + s.value;
+ }, 0);
+ updateUI();
+ // Broadcast sparkle generation
+ if (room) {
+ room.sendData(JSON.stringify({
+ type: 'sparkle_generated',
+ data: newSparkles
+ }));
+ }
}
-function spawnBird2() {
- var bird = new Bird2();
- bird.y = Math.random() * (2732 / 2); // Random initial y position in the top half
- bird.x = Math.random() < 0.5 ? 0 : 2048; // Start from either the left or right side
- bird.speed = 1 + Math.random() * 0.6;
- bird.lastIntersecting = false;
- bird.type = 'bird2'; // Specific property for Bird2
- bird.color = 0xFFFFFF; // Specific color for Bird2
- LK.setTimeout(function () {
- game.addChild(bird);
- // Ensure bird is added to the game before setting its index
- if (game.children.includes(bird)) {
- game.setChildIndex(bird, game.getChildIndex(stack1) + 1); // Set Bird2 to be rendered after stack1
- }
- birds.push(bird);
- }, 2000);
+function buyCat() {
+ if (sparkleCount < 50) {
+ addNotification('Not enough sparkles! Need 50');
+ return;
+ }
+ sparkleCount -= 50;
+ var newCat = {
+ id: "cat-".concat(Date.now()),
+ level: 1,
+ sparkleRate: 1,
+ upgradeCost: 50,
+ position: {
+ x: 0,
+ y: 0,
+ z: 0
+ },
+ owner: localParticipant.identity
+ };
+ cats.push(newCat);
+ updateUI();
+ // Broadcast new cat
+ if (room) {
+ room.sendData(JSON.stringify({
+ type: 'cat_purchased',
+ data: newCat
+ }));
+ }
}
-// Ensure there are always 3 birds on screen
-game.update = function () {
- // Update each bird
- birds.forEach(function (bird) {
- bird.update();
- // Check if the bird has moved off-screen
- if (bird.lastY <= 2732 && bird.y > 2732) {
- bird.y = -bird.height; // Respawn the bird at the top
- bird.x = Math.random() * 2048; // Randomize the x position
- bird.speed = 1 + Math.random() * 0.6; // Reset speed for new bird
+function upgradeBranch(branchId) {
+ var branch = branches.find(function (b) {
+ return b.id === branchId;
+ });
+ if (!branch) {
+ return;
+ }
+ if (sparkleCount < branch.upgradeCost) {
+ addNotification("Not enough sparkles! Need ".concat(branch.upgradeCost));
+ return;
+ }
+ sparkleCount -= branch.upgradeCost;
+ branches = branches.map(function (b) {
+ if (b.id === branchId) {
+ return _objectSpread(_objectSpread({}, b), {}, {
+ level: b.level + 1,
+ catCapacity: b.catCapacity + 1,
+ upgradeCost: Math.floor(b.upgradeCost * 1.5)
+ });
}
+ return b;
});
-};
-// Add a tree to the game
-var tree = game.addChild(new Tree());
-tree.x = 2048 / 2 + 600; // Move the tree 500px to the right
-tree.y = 2500; // Position the tree on the grass
-// Ensure tree is added to the game before setting its index
-if (game.children.includes(tree) && game.children.includes(bird1)) {
- game.setChildIndex(tree, game.getChildIndex(bird1) + 1); // Set tree to be rendered after bird1
+ updateUI();
+ // Broadcast branch upgrade
+ if (room) {
+ room.sendData(JSON.stringify({
+ type: 'branch_upgraded',
+ data: {
+ branchId: branchId
+ }
+ }));
+ }
}
-var score = 0;
-// Add stack1 image to the game
-var stack1 = game.addChild(new Stack1());
-stack1.x = 1650; // Move 500px to the right
-stack1.y = 2300; // Move down by 800px
-// Ensure stack1 is added to the game before setting its index
-if (game.children.includes(stack1) && game.children.includes(tree)) {
- game.setChildIndex(stack1, game.getChildIndex(tree) + 1); // Set stack1 to be rendered after tree
+function addNotification(message) {
+ var newNotification = {
+ id: Date.now(),
+ message: message
+ };
+ notifications.push(newNotification);
+ showNotification(message);
+ // Auto-remove notification
+ setTimeout(function () {
+ notifications = notifications.filter(function (n) {
+ return n.id !== newNotification.id;
+ });
+ }, 3000);
}
-// Add the grass floor to the game
-var grassBack = new GrassBack();
-grassBack.x = 1020;
-grassBack.y = 2735; // Position grassBack at the bottom
-game.addChild(grassBack);
-// Ensure grassBack is added to the game before setting its index
-if (game.children.includes(grassBack)) {
- game.setChildIndex(grassBack, 5); // Set grassBack to be rendered after Bird3
+function showNotification(message) {
+ var notificationEl = document.createElement('div');
+ notificationEl.className = 'notification';
+ notificationEl.textContent = message;
+ document.body.appendChild(notificationEl);
+ setTimeout(function () {
+ notificationEl.remove();
+ }, 3000);
}
-var grassFront = new GrassFront();
-grassFront.x = 1020;
-grassFront.y = 2785; // Position grassFront at the bottom, moved down by 50px
-game.addChild(grassFront);
-// Ensure grassFront is added to the game before setting its index
-if (game.children.includes(grassFront) && game.children.includes(bird2)) {
- game.setChildIndex(grassFront, game.getChildIndex(bird2) + 1); // Set grassFront to be rendered after bird2
+function updateUI() {
+ sparkleCountEl.textContent = "Sparkles: ".concat(sparkleCount);
}
-var mirror = new Mirror();
-mirror.x = 2048 / 2 + 400; // Move the score display 400px to the right
-mirror.y = 2732 - 185 - 80 - 390; // Move the score display up by an additional 80px
-game.addChild(mirror);
-// Ensure mirror is added to the game before setting its index
-if (game.children.includes(mirror) && game.children.includes(stack1)) {
- game.setChildIndex(mirror, game.getChildIndex(stack1) + 1); // Set mirror to be rendered after stack1
+function handleData(data, participant) {
+ try {
+ var message = JSON.parse(data);
+ switch (message.type) {
+ case 'sparkle_generated':
+ sparkleCount += message.data.reduce(function (sum, s) {
+ return sum + s.value;
+ }, 0);
+ break;
+ case 'cat_purchased':
+ cats.push(message.data);
+ break;
+ case 'branch_upgraded':
+ branches = branches.map(function (b) {
+ if (b.id === message.data.branchId) {
+ return _objectSpread(_objectSpread({}, b), {}, {
+ level: b.level + 1,
+ catCapacity: b.catCapacity + 1,
+ upgradeCost: Math.floor(b.upgradeCost * 1.5)
+ });
+ }
+ return b;
+ });
+ break;
+ }
+ updateUI();
+ } catch (e) {
+ console.error('Error parsing message:', e);
+ }
}
-// Ensure laser is added to the game before setting mirror's index
-if (game.children.includes(laser) && game.children.includes(mirror)) {
- game.setChildIndex(mirror, game.getChildIndex(laser) + 1); // Set mirror to be rendered after the laser
-}
-// Function to handle bgm1 end event
-function onBgm1End() {
- // Set a timer to replay bgm1 after 50-80 seconds
- var bgmTimer = LK.setTimeout(function () {
- LK.playMusic('bgm1', {
- loop: true,
- fade: {
- start: 0,
- end: 1,
- duration: 4000
- },
- onEnd: onBgm1End
- });
- }, Math.random() * 30000 + 50000);
-}
-;
-// Add the cat to the game
-var cat = game.addChild(new Cat());
-cat.x = 230; // Move the cat 20px to the left
-cat.y = 2732; // Position the cat at the bottom of the screen
-// Ensure cat is added to the game before setting its index
-if (game.children.includes(cat)) {
- game.setChildIndex(cat, game.children.length - 1); // Bring the cat to the front by setting its index to the highest value
-}
-// Play bgm1 once on load and set a timer to replay it every 20-50 seconds
-LK.playMusic('bgm1', {
- loop: false,
- // Play once
- fade: {
- start: 0,
- end: 0.02,
- // Set to the lowest volume
- duration: 4000
- },
- onEnd: function onEnd() {
- // Set a timer to replay bgm1 every 20-50 seconds
- LK.setTimeout(function () {
- LK.playMusic('bgm1', {
- loop: false,
- // Play once
- fade: {
- start: 0,
- end: 0.5,
- // Set to the lowest volume
- duration: 4000
- },
- onEnd: onEnd // Set the onEnd function to replay bgm1
- });
- }, Math.random() * 30000 + 20000); // Random time between 20-50 seconds
+// Cleanup
+function cleanup() {
+ if (sparkleInterval) {
+ clearInterval(sparkleInterval);
}
-});
-// Initialize a timer to play the wings1 sound at a random time between 10 and 30 seconds
-var wingsTimer = LK.setTimeout(function () {
- LK.getSound('wings1').play();
- wingsTimer = LK.setTimeout(arguments.callee, Math.random() * 20000 + 10000);
-}, Math.random() * 20000 + 10000);
-// Create an array for all sounds except ufo1, including all birdsong sounds
-var sounds = ['cricket1', 'frog1', 'wings1', 'songbird1'];
-var currentAmbientSound = null;
-// Initialize random timers for each sound to play between 30-50 seconds
-sounds.forEach(function (soundId) {
- var sound = LK.getSound(soundId);
- var ambientSoundTimer = LK.setTimeout(function () {
- if (currentAmbientSound) {
- currentAmbientSound.stop(); // Stop the currently playing ambient sound
- }
- sound.play();
- currentAmbientSound = sound; // Set the current ambient sound
- // Set a timeout to reset the current ambient sound after it finishes playing
- LK.setTimeout(function () {
- currentAmbientSound = null;
- }, sound.duration * 1000); // Convert duration from seconds to milliseconds
- // Reset the timer to play the sound again between 30-50 seconds, plus an additional 5 seconds
- ambientSoundTimer = LK.setTimeout(arguments.callee, Math.random() * 20000 + 30000 + 5000);
- }, Math.random() * 20000 + 30000);
-});
-self.getCharmRadius = function () {
- return self.charmRadius;
-};
-self.playIdleAnimation = function () {
- // Add logic for random idle animations like tail swish or ear twitch
-};
-self.setRandomPosition = function () {
- self.x = Math.random() * 2048;
- self.y = -self.height;
-};
-self.handleCharmed = function () {
- // Add logic to manage charmed state and rewards
-};
-self.playFlightAnimation = function () {
- // Add logic to control flight animations
-};
-self.playBeamEffect = function () {
- // Add logic to show collection beam
-};
\ No newline at end of file
+ if (room) {
+ room.disconnect();
+ }
+}
+// Start the game
+connectToRoom();
+// Cleanup on page unload
+window.addEventListener('beforeunload', cleanup);
\ No newline at end of file
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