User prompt
make 10 separate objects in assets and place them on the upper right edge of the frame.
User prompt
make 10 separate objects in assets and align them to the upper right edge of the frame.
User prompt
Make 10 separate objects in assets and align them to the upper right edge.
User prompt
Make 10 separate objects in assets and align them to the upper right edge.
User prompt
make the spaces between the objects smaller by 2 times and align on the right edge
User prompt
make the gaps between the objects smaller by a factor of 3.
User prompt
place 10 objects one by one in the bottom of the top edge of the screen.
User prompt
Fix Bug: 'TypeError: textGraphics.setText is not a function' in this line: 'textGraphics.setText('F=');' Line Number: 7
User prompt
the first time a red apple hits the players, display the text "F=".
User prompt
напиши на экране формулу тяготения
User prompt
write this text 'F=' on the screen at the top of the frame the first time a red apple hits the players
User prompt
Add red text 'F=' at the top of the frame when players are first hit by a red apple
User prompt
Add red 'F=' text at the top of the frame when players are first hit by a red apple
User prompt
уменьши текст и перемести вправо
User prompt
жирный шрифт для текста
User prompt
сделать текст красным
User prompt
v
User prompt
put the text "F=" at the top of the frame.
User prompt
center the formula in the center of the screen F++++++++
User prompt
center the formula in the center of the screen F=========
User prompt
center the formula in the center of the screen F________
User prompt
center the formula in the center of the screen F=G(Mm)/R^2
User prompt
display the formula on the screen F=G(Mm)/R^2
User prompt
show the letter F in the text box
User prompt
create a text box and place it at the top right of the screen
===================================================================
--- original.js
+++ change.js
@@ -1,13 +1,15 @@
/****
* Classes
****/
-// UpperRightObject class
-var UpperRightObject = Container.expand(function () {
+// UpperRightEdgeItem class
+var UpperRightEdgeItem = Container.expand(function () {
var self = Container.call(this);
- var objectGraphics = self.createAsset('upperRightObject', 'Object in upper right', 1, 0);
- self.x = 2048 - objectGraphics.width;
- self.y = 0;
+ var edgeGraphics = self.createAsset('upperRightEdgeItem', 'Upper right edge object', 1, 0);
+ self.setPosition = function () {
+ self.x = 2048 - self.width;
+ self.y = 0;
+ };
});
// EndGameItem class
var EndGameItem = Container.expand(function () {
var self = Container.call(this);
@@ -130,24 +132,24 @@
/****
* Initialize Game
****/
+// Initialize upper right edge items array
var game = new LK.Game({
backgroundColor: 0x000000 // Init game with black background
});
/****
* Game Code
****/
-// Initialize 10 UpperRightObjects
-var upperRightObjects = [];
+// Initialize upper right edge items array
+// Initialize second background
+var upperRightEdgeItems = [];
for (var i = 0; i < 10; i++) {
- var upperRightObject = game.addChild(new UpperRightObject());
- upperRightObject.y = i * upperRightObject.height;
- upperRightObjects.push(upperRightObject);
+ var upperRightEdgeItem = game.addChild(new UpperRightEdgeItem());
+ upperRightEdgeItem.setPosition();
+ upperRightEdgeItems.push(upperRightEdgeItem);
}
-
-// Initialize second background
var background2 = game.addChild(LK.getAsset('background2', 'Second background', 0, 0));
background2.width = 2048;
background2.height = 2732;
background2.x = 0;
grass
the fields of Britain, cartoon style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eureka moment, cartoon style, light, no people. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stars flying on an ellipse, cartoon style, side view , no people. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white "=" on a green apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white "F" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the "G" sign on the red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white " (M" on a red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white sign with a small "m" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white " /" on a green apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white "R" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green
a white " 2" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.