Code edit (3 edits merged)
Please save this source code
User prompt
увеличить скорость вращения (360 градусов) на 100
User prompt
если происходит вращение на 360 градусов и в этот момент нажимается button_bot, то button_bot не срабатывает
User prompt
player.rotation -= Math.PI / 2; изменить на 80 градусов
User prompt
когда отжимается кнопка button_bot, персонаж разворачивается обратно на 80 градусов по часовой стрелке
User prompt
повернуть игрока на 80 градусов против часовой стрелки, когда нажата кнопка Button_bot и игрок находится в радиусе 15 пикселей от первоначального положения
User prompt
повернуть игрока на 70 градусов против часовой стрелки, когда нажата кнопка Button_bot и игрок находится в радиусе 15 пикселей от первоначального положения
User prompt
повернуть игрока на 90 градусов против часовой стрелки, когда нажата кнопка Button_bot и игрок находится в радиусе 15 пикселей от первоначального положения
User prompt
повернуть игрока на 90 градусов против часовой стрелки, когда нажата кнопка Button_bot и игрок находится в первоначальном положении
User prompt
повернуть игрока на 90 градусов против часовой стрелки, когда нажата кнопка Button_bot
User prompt
если нажать на bottun_bot, то игрок повернется на 90 градусов против часовой стрелки. Когда отпустить нажатие, то игрок повернется обратно
User prompt
изменить положение персонажа, повернуть по часовой стрелки на 15 градусов
Code edit (1 edits merged)
Please save this source code
User prompt
убрать поворот на 90 градусов
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 204
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 204
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 204
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 204
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 203
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'up')' in or related to this line: 'self.up = function (x, y, obj) {' Line Number: 199
User prompt
Добавить тоже самое, только из double jump
User prompt
добавить поворот на 70 градусов против часовой стрелки, когда персонаж приземляется во время полета с зажатой кнопкой BUTTON_BOT
User prompt
исправить ошибку, когда происходит поворот по часовой стрелке
User prompt
Отслеживать положение игрока и если он в первоначальном положении, то поворачивать на 70 градусов против часовой стрелки, если зажата кнопка button_bot
User prompt
Отслеживать положение игрока и если он в первоначальном положении, то поворачивать на 70 градусов против часовой стрелки
===================================================================
--- original.js
+++ change.js
@@ -13,44 +13,27 @@
anchorY: 0.5
});
// Add down event to set landing duration to 100 during jump or double jump
self.down = function (x, y, obj) {
- if (!player.inAir && !player.doubleJump) {
- player.rotation -= Math.PI / 2.571; // Rotate 70 degrees counter-clockwise
- } else if (player.inAir || player.doubleJump) {
- tween(player, {
- y: 2732 / 2 - 250
- }, {
- duration: 100,
- onFinish: function onFinish() {
- player.inAir = false;
- player.doubleJump = false;
- player.y = 2732 / 2 - 250;
- }
- });
- }
if (player.inAir || player.doubleJump) {
- player.rotation -= Math.PI / 2.571; // Rotate 70 degrees counter-clockwise
tween(player, {
y: 2732 / 2 - 250
}, {
duration: 100,
onFinish: function onFinish() {
player.inAir = false;
player.doubleJump = false;
player.y = 2732 / 2 - 250;
- if (player.doubleJump) {
- player.rotation -= Math.PI / 2.571; // Rotate 70 degrees counter-clockwise on landing during double jump
- }
}
});
+ } else {
+ // Rotate player 90 degrees counterclockwise
+ player.rotation -= Math.PI / 2;
}
};
- // Add up event to reset rotation
+ // Add up event to rotate player back to original position
self.up = function (x, y, obj) {
- if (!player.inAir && !player.doubleJump) {
- player.rotation += Math.PI / 2.571; // Rotate back 70 degrees clockwise
- }
+ player.rotation += Math.PI / 2;
};
});
// Create a button top class
var ButtonTop = Container.expand(function () {
@@ -207,5 +190,9 @@
if (gameStarted) {
player.x += Math.sin(LK.ticks / 0.5) * 3;
player.y += Math.cos(LK.ticks / 0.5) * 3;
}
+};
+self.up = function (x, y, obj) {
+ // Rotate player back to original position
+ player.rotation += Math.PI / 2;
};
\ No newline at end of file
создать мультяшного сидячего персонажа. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
snowball. 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
Алмаз, мультяшный. 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
Ufo (летающая тарелка). Мультяшная. 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
Мультяшный рыбак зимой сидит рыбачит. 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
Куст в снегу мультяшный. 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
Рука белая. Иконка. 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
снежинка. мультяшная. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
text: New Record! Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows