juego ana

Python
namespace SpriteKind {
    export const Obstacle = SpriteKind.create()
    export const Ground = SpriteKind.create()
}
sprites.onOverlap(SpriteKind.Player, SpriteKind.Obstacle, function (sprite, otherSprite) {
    game.reset()
})
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    if (hero.y >= 106) {
        hero.vy = -145
    }
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
    info.changeScoreBy(1)
    sprites.destroy(otherSprite)
})
let block: Sprite = null
let coin: Sprite = null
let flor: Sprite = null
let ground: Sprite = null
let hero: Sprite = null
info.setScore(0)
scene.setBackgroundColor(15)
game.splash("Untitled")
hero = sprites.create(img`
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    66666666666666666666
    `, SpriteKind.Player)
hero.setPosition(28, 108)
hero.ay = 360
for (let i = 0; i <= 10; i++) {
    ground = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 
        e e e e e e e e e e e e e e e e 
        e e e e e e e e e e e e e e e e 
        e e e e e e e e e e e e e e e e 
        e e e e e e e e e e e e e e e e 
        `, SpriteKind.Ground)
    ground.setFlag(SpriteFlag.Ghost, true)
    ground.z = -10
    ground.x = i * 16 + 8
    ground.top = 108
}
game.onUpdate(function () {
    if (hero.y > 108) {
        hero.y = 108
        hero.vy = 0
    }
})
game.onUpdateInterval(1500, function () {
    flor = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        `, SpriteKind.Food)
    flor.setPosition(170, 80)
    flor.setVelocity(-90, 0)
})
game.onUpdateInterval(500, function () {
    coin = sprites.create(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        `, SpriteKind.Food)
    coin.setPosition(170, 80)
    coin.setVelocity(-90, 80)
    coin.setImage(img`
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . c c c c . . . . . . 
        . . . . . c c c c c c . . . . . 
        . . . . . c c 6 c c c . . . . . 
        . . . . . c c b b c c c . . . . 
        . . . . . c c 6 6 c c 8 . . . . 
        . . . . . c 6 c c c c c . . . . 
        . . . . . c c c c c c . . . . . 
        . . . . . c c c . c c . . . . . 
        . . . . . c c c c c c . . . . . 
        . . . . . c c c c c . . . . . . 
        . . . . . . . c . . . . . . . . 
        . . . . . . . c . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        . . . . . . . . . . . . . . . . 
        `)
})
game.onUpdateInterval(1200, function () {
    block = sprites.createProjectile(img`
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        6 6 6 6 6 6 
        `, -90, 0, SpriteKind.Obstacle)
    block.setPosition(scene.screenWidth(), 108)
})
anariveracartagenovaGrand anariveracartagenova
Sign in to react
1
Uploaded Aug 31, 2026