Institute of Computer Science
Courses.cs.ut.ee Institute of Computer Science University of Tartu
  1. Main page
  2. Teeme ise arvutimänge
ET
Log in

Teeme ise arvutimänge

  • Esileht
  • I RAAMAT
  • II RAAMAT
  • III RAAMAT
  • IV RAAMAT
  • V RAAMAT
  • VI RAAMAT

Graafika ja animatsioonid

Liikumine


Eelmisel lehel vaatasime põhjalikumalt, kuidas enda kontrolli alla võtta klahvivajutused ja kuidas vastavalt vajutusele saab koodis midagi muuta. Tegelikult on Pygames palju selliseid sündmuseid mida saab enda kontrolli alla võtta ja oma soovide järgi kohandada. Kõige tuntumad nendest on

  • KEYDOWN - vaatasime eelmisel lehel
  • KEYUP
  • QUIT
  • MOUSEMOTION
  • MOUSEBUTTONUP
  • MOUSEBUTTONDOWN
  • jne



Kogu nimekirja kõikvõimalikest kontrollsündmustest, näiteks kas või mängukonsoolidega ühinemise jaoks või videote kasutamiseks, leiab aadressilt: http://www.pygame.org/docs/ref/event.html

Kõikide nende nn pygame.event'te kasutamine käib täpselt sama moodi nagu vaatasime KEYDOWN sündmuste kontrolli juures.

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment