Re: Ответ: Lib_game (Game API Support)
Вложений: 1
Цитата:
Обновите Lib_sensor, добавлено свойство int pointer_state() 1 - нажато, 0 - не нажато. Понадобилось вот )) |
Re: Lib_game (Game API Support)
Вложений: 1
я добавил давно. вылажую
функция pointer_is_pressed нажато возвращает 1 ненажато возвращает ноль |
Ответ: Lib_game (Game API Support)
Че-то я не вкурю, как пользоваться функцией sprite.set_position(i,j,k:integer) и вообще для чего она нужна. Объясните плиз :)
|
Ответ: Lib_game (Game API Support)
По-моему, эта функция устанавливает элемент спрайта с инднксом i в точку с x=j, y=k.
|
Ответ: Lib_game (Game API Support)
А как сделать, чтобы у разных спрайтов были одинаковые картинки, например если на экране несколько одинаковых врагов. Не загружать же для каждого одно и то же изображение?
|
Ответ: Lib_game (Game API Support)
Похоже, в этой библиотеке нужно загружать изображение для каждого спрайта.
|
Ответ: Lib_game (Game API Support)
хм, действительно есть функция создания спрайта на основе уже готового, добавлю сегодня.
|
Ответ: Lib_game (Game API Support)
Обновил библиотеку. Сообщение №8.
|
Ответ: Lib_game (Game API Support)
Sorry for writing in English but I dont speak in Russian.I use google translator to read this forum :)
I have tried to use the touch-screen functions of the library game and I just dragged the other works do not work. game.pointer_pressed_x only return 0, always. game.pointer_dragged_x work well. I have tried to use lib_sensor and lib_game at the same time but neither works. only works if I use lib_sensor alone. thanks! |
Ответ: Lib_game (Game API Support)
sorry, sensor functions not fully tested.
download updated version from the post #8 of this section. sensor lib not necessary any more. |
Ответ: Lib_game (Game API Support)
Hi Pilgrim
Now run ok! thanks! but lib_game dont have pointer_state function. How do I know if the pointer is pressing the screen? The problem is that pointer_pressed_x and pointer_pressed_y hold their values but I dont pressing the screen. Does any alternative to solve the problem? thanks Lite example code: program pointerExample; uses game; var px:integer; py:integer; rx:integer; ry:integer; fin:integer; begin game.init; game.show; game.set_clip(0,0,240,100); repeat px:=game.pointer_pressed_x; py:=game.pointer_pressed_y; rx:=game.pointer_released_x; ry:=game.pointer_released_y; setcolor(100,100,100); fillrect(0,0,200,100); setcolor(0,0,0); drawText('Pressed X:'+px, 1, 10); drawText('Pressed Y:'+py,1,30); drawText('Released X:'+rx, 50, 10); drawText('Released Y:'+ry,50,30); refresh; delay(10); until fin=1 end. |
Ответ: Lib_game (Game API Support)
Вложений: 1
Try to use Lib_sensor. You can download this lib below.
List of new functions:
Here some examples: PHP код:
PHP код:
|
Ответ: Lib_game (Game API Support)
odd, он хочет эту функцию при работе с Game API, а там другой Canvas на экране. Добавлю через часик.
updated. :) |
Ответ: Lib_game (Game API Support)
thanks Odd! but I need use lib_game and lib_game+lib_sensor dont work.
Pilgrim, Do you update the game library? I would very happy! :) |
Ответ: Lib_game (Game API Support)
Oh! you had updated! thanks!
|
Часовой пояс GMT +4, время: 04:50. |
vBulletin® Version 3.6.5.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot