Adding Event Handlers



Download 189,5 Kb.
bet1/4
Sana31.12.2021
Hajmi189,5 Kb.
#225920
  1   2   3   4
Bog'liq
Adding Event Handlers

Adding Event Handlers

So far we have seen how basic animation may be achieved in the first part of this work. We have seen how to plan and create a sprite along with applying good principles of object oriented design.


The next thing that we will look at is how to add some interaction to the animation.
As things stand the saucer just sits there with some flashing lights.

What we want to happen eventually is that the user presses keys on the keyboard and something happens.


Ultimately there are four things we want to happen.


  1. The user presses the up arrow and the saucer accelerates via thrust from its base.

  2. The user presses the left arrow moving the saucer to the left

  3. The user presses the right arrow moving the saucer to the right

  4. The user presses the down arrow turning off the engines and allowing gravity to take the ship down

Download 189,5 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish