User prompt
Stop making the waves go up with time. Thewaves should go up when the cube assets are all dead. Round 1 have 5 cube assets spawn
User prompt
Change the wave system, so when the game starts, make the wave 1, and when wave equals 1 spawn 5 cube assets, when those cube assets die, make it wave 2
User prompt
Ok so, for wave 1 make 5 cube assets spawn . Only five and when you kill the 5 cube assets wave 2 starts
User prompt
It didnt work
User prompt
Those shoot assets should kill the cube assets when they touch
User prompt
It didnt work
User prompt
It did not work
User prompt
When the shoot asset touches a cube asset, the cube asset should dissapear
User prompt
Make the shoot asset deal 1 damage and the cubes have 1 health, so when the shoot asset touches the cube asset they both disapear
User prompt
Dont make the slime asset shoot them up it should shoot it to the right
User prompt
Make the slime asset shoot out the shoot asset once every second
User prompt
And make the wave text a lot bigger
User prompt
Dont increase the cubes speed based on the wave
User prompt
Good, now make a wave system and a wave text on the top left corner
User prompt
Good, but make them a bit slower
User prompt
Make it so the cubes always go the same speed
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: tween' in or related to this line: 'tween(self, {' Line Number: 25 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
The cube isnt spawning in
User prompt
And make it so when the cube asset spawns, the slowly starts moving towards the slime asset ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Now make it so the cube asset spawns from the cubestart asset
User prompt
Move the cubesstart asset to the right by a lot
User prompt
Add the cubestart asset to the game
User prompt
Move the slime asset down a little
User prompt
Move the slime asset up a lot
User prompt
Move the slime asset up a bit
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Create a new class for the cube asset var Cube = Container.expand(function () { var self = Container.call(this); // Attach the cube asset to the Cube class var cubeGraphics = self.attachAsset('Cube', { anchorX: 0.5, anchorY: 0.5 }); // Set the cube's speed self.speed = 5; // Update the cube's position every game tick self.update = function () { // Create a tween for the cube asset to move towards the slime asset tween(self, { x: slime.x, y: slime.y }, { duration: 5000 }); }; }); /**** * Initialize Game ****/ // Spawn the cube asset from the cubestart asset every 60 game ticks //<Assets used in the game will automatically appear here> var game = new LK.Game({ backgroundColor: 0x008000 //Init game with green background }); /**** * Game Code ****/ //<Assets used in the game will automatically appear here> // Spawn the cube asset from the cubestart asset every 60 game ticks // Add slime asset to the game screen, make it 2x bigger and move it to the left var slime = game.addChild(LK.getAsset('Slime', { anchorX: 0.5, anchorY: 0.5, x: 200, y: 1350, // Adjusted y position to move the slime down a little scaleX: 2, scaleY: 2 })); // Add menu asset to the game screen var menu = game.addChild(LK.getAsset('Menu', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 2766, scaleX: 25, scaleY: 25 })); // Add cubestart asset to the game screen var cubestart = game.addChild(LK.getAsset('Cubesstart', { anchorX: 0.5, anchorY: 0.5, x: 1800, // Moved to the right by a lot y: 1366, scaleX: 2, scaleY: 2 })); game.update = function () { // Spawn the cube asset from the cubestart asset every 60 game ticks if (LK.ticks % 60 == 0) { var newCube = new Cube(); newCube.x = cubestart.x; newCube.y = cubestart.y; game.addChild(newCube); } };
===================================================================
--- original.js
+++ change.js
@@ -1,5 +1,10 @@
/****
+* Plugins
+****/
+var tween = LK.import("@upit/tween.v1");
+
+/****
* Classes
****/
// Create a new class for the cube asset
var Cube = Container.expand(function () {
@@ -27,16 +32,17 @@
* Initialize Game
****/
// Spawn the cube asset from the cubestart asset every 60 game ticks
//<Assets used in the game will automatically appear here>
-//<Write imports for supported plugins here>
var game = new LK.Game({
backgroundColor: 0x008000 //Init game with green background
});
/****
* Game Code
****/
+//<Assets used in the game will automatically appear here>
+// Spawn the cube asset from the cubestart asset every 60 game ticks
// Add slime asset to the game screen, make it 2x bigger and move it to the left
var slime = game.addChild(LK.getAsset('Slime', {
anchorX: 0.5,
anchorY: 0.5,