Log In  


-- karakterin konumu
x = 64
y = 64

-- kalbin konumu
hx = flr(rnd(120))
hy = flr(rnd(120))

-- skor
score = 0

function _update()
    -- karakter hareketi
    if btn(0) then x -= 1 end -- sol
    if btn(1) then x += 1 end -- sağ
    if btn(2) then y -= 1 end -- yukarı
    if btn(3) then y += 1 end -- aşağı

    -- kalple çarpışma kontrolü
    if abs(x - hx) < 8 and abs(y - hy) < 8 then
        score += 1
        hx = flr(rnd(120))
        hy = flr(rnd(120))
    end
end

function _draw()
    cls()

    -- karakter sprite 1
    spr(1, x, y)

    -- kalp sprite 0
    spr(0, hx, hy)

    -- skor yazısı
    print("kalpler: "..score, 2, 2, 7)

    -- sevgi mesajı
    if score >= 20 then
        print("seni seviyorum <3", 30, 60, 8)
    end
end
1



[Please log in to post a comment]