Brightsign BrightScript 3.0 Reference Manual Instrukcja Użytkownika Strona 68

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 75
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 67
63
Function gbStartX() As Integer
return cint(m.text_field.GetWidth()/2)
End Function
Function gbStartY() As Integer
return cint(m.text_field.GetHeight()/2)
End Function
Function gbEventLoop() As Void
tick_count=0
while true
msg=wait(250, m.buttons) ' wait for a button, or 250ms (1/4 a second) timeout
if type(msg)="roGpioButton" then
if msg.GetInt()=1 m.snake.TurnNorth()
if msg.GetInt()=2 m.snake.TurnSouth()
if msg.GetInt()=3 m.snake.TurnEast()
if msg.GetInt()=4 m.snake.TurnWest()
else 'here if time out happened, move snake forward
tick_count=tick_count+1
if tick_count=6 then
tick_count=0
if m.snake.MakeLonger(m.text_field) then return
else
Przeglądanie stron 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 74 75

Komentarze do niniejszej Instrukcji

Brak uwag