From 86cd71cc50502840a01ed4e75221f3ebacf48277 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Mon, 21 Jan 2019 23:43:13 +0100 Subject: [PATCH] Added killing --- __pycache__/events.cpython-37.pyc | Bin 2358 -> 2569 bytes __pycache__/sprites.cpython-37.pyc | Bin 3815 -> 4306 bytes events.py | 5 +++++ mygame.py | 6 +++++- sprites.py | 7 +++++-- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/__pycache__/events.cpython-37.pyc b/__pycache__/events.cpython-37.pyc index f7649adf2b7c3e952242087ef772e25b12d578c4..29bdf93551847c695028384ad485a9d6d58e7456 100644 GIT binary patch delta 754 zcmZ{hPis>_5Wsid-_1*26O*QxY9$73`dSqe|CB0HNkFX!BQ$sjLTKG*n(|1Wn-@W` zc&HbTVXuPi-IE2cDtPl7ybs|A(2Fy9C3taRelt5eJ3BM`CI5cbZMd$(aD9Dv@9F2U zTY?Yc>h0&gw#yGwN37#at#prdGAQoUGc&ca!Vu;=*2xJ=*r-nlE>fuT!VziI1(6Xh z>RB-(vZ#v!Hkp?jfBFIW;}`G~;Iz7|UZ@=4pd;%II{?&nqEF_UG{IGY zS6XFCy-HX|{O>LQr9X(eJ6i)0`0@z`4rv$+EO3A$ImiZGpHusMZQ~4@v3Z~V3O}iq z{E1vZZ_@r6Su|^Ti;yNvx-XM8Ek-ufFTS`$6U*TXTtfi^49&q;PqfA@UgSD2@WNk; CG@I`L delta 513 zcmYL_%}PQ+6vywm>2>batG7%+vk&bNGp*FWb@^e`4m7jXi%z{>YgaEtqtldK_cJWXl(q=D{;3v%oe4B1e1sSx6|q?< zS1lhDizl|;%>7;#)08knun2KNf-o!JJ<-rSg;RtDLWGc%-=1WAiNYvhnUE%|5Hg4q zh^&mWIBYwP3bMf>=&s8qV|U5}fYR26$`yR4dNj1?kpq@6b5x}8Uu0Zbx*0vjgO>Bz zpn(Alr`V*Vpv>#}O~>LY?rp8r6j$wA%q|V>Rf_QD@8&Gi`EXclhoCEBT5x1 zhj8M6RQv)74}io2@Dd#N$c5Knrp9I86y=g^?2h42ZjkO&MK zPy-)M>lb3~L{WN_>L?lnLfylRiJf2OGC)7|hsmp5MXG$Sm>23+ho6nl9e-aUTe*gdg delta 101 zcmcbl_*|CHiIWINDOW_WIDTH or self.rect.top>WINDOW_HEIGHT: + self.kill() class Hitbox(pygame.sprite.Sprite): def __init__(self, x, y, w, h): - self.size=vec(w, h) + self.size=pygame.Surface((x,y)) self.rect=self.size.get_rect() - self.rect.center=vec(x,y) \ No newline at end of file + self.rect.center=vec(x,y) + print(self.rect.center) \ No newline at end of file