|
@@ -30,13 +30,48 @@ |
|
|
|
|
|
|
|
|
direction = 1 |
|
|
direction = 1 |
|
|
|
|
|
|
|
|
|
|
|
moving = False |
|
|
|
|
|
falling = True |
|
|
|
|
|
|
|
|
Repeat |
|
|
Repeat |
|
|
Pos nizikaX, nizikaY |
|
|
|
|
|
GCopy SCREEN_NIZIKA, 0, NIZIKA_HEIGHT * (frame \ 24), NIZIKA_WIDTH, NIZIKA_HEIGHT |
|
|
|
|
|
|
|
|
If GetKey2 (KEY_MOUSE_L) { |
|
|
|
|
|
If moving { |
|
|
|
|
|
nizikaX = LimitF (mouseX - offsetX, -NIZIKA_LEFT, gInfo_dispX - NIZIKA_RIGHT) |
|
|
|
|
|
nizikaY = LimitF (mouseY - offsetY, Null, gInfo_dispY - NIZIKA_BASE) |
|
|
|
|
|
} |
|
|
|
|
|
Else { |
|
|
|
|
|
moving = True |
|
|
|
|
|
|
|
|
|
|
|
offsetX = Double (mouseX - nizikaX) |
|
|
|
|
|
offsetY = Double (mouseY - nizikaY) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Else: If moving { |
|
|
|
|
|
moving = False |
|
|
|
|
|
falling = True |
|
|
|
|
|
|
|
|
|
|
|
fallVel = 0. |
|
|
|
|
|
} |
|
|
|
|
|
Else: If falling { |
|
|
|
|
|
nizikaY = LimitF (nizikaY + fallVel, Null, gInfo_dispY - NIZIKA_BASE) |
|
|
|
|
|
fallVel += 9.8 |
|
|
|
|
|
|
|
|
|
|
|
If nizikaY >= gInfo_dispY - NIZIKA_BASE { |
|
|
|
|
|
falling = False |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ReDraw False |
|
|
|
|
|
Color COLOUR_LIME |
|
|
|
|
|
BoxF |
|
|
|
|
|
|
|
|
|
|
|
Pos nizikaX, nizikaY |
|
|
|
|
|
GCopy SCREEN_NIZIKA, IIf (direction < 0, NIZIKA_WIDTH, 0), NIZIKA_HEIGHT * (frame \ 24), NIZIKA_WIDTH, NIZIKA_HEIGHT |
|
|
|
|
|
ReDraw True |
|
|
|
|
|
|
|
|
nizikaX += direction * 4 |
|
|
nizikaX += direction * 4 |
|
|
|
|
|
|
|
|
If nizikaX >= NIZIKA_WIDTH { |
|
|
|
|
|
|
|
|
If (nizikaX >= gInfo_dispX - NIZIKA_RIGHT) || (nizikaX < -NIZIKA_LEFT) { |
|
|
direction = -direction |
|
|
direction = -direction |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|