From b034e681380b64eaeaa22ce6a81e9143bb23cbd5 Mon Sep 17 00:00:00 2001 From: Sosch Date: Tue, 11 Nov 2014 14:25:46 +0100 Subject: [PATCH] =?UTF-8?q?Shop=20=C3=BCberarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- res/images/shopTest01.png | Bin 0 -> 1121 bytes res/images/shopTest02.png | Bin 0 -> 1436 bytes .../spacescooter/entity/Player.java | 6 +-- .../spacescooter/entity/PlayerStatus.java | 11 ---- .../spacescooter/entity/StaticValue.java | 18 +++++++ .../spacescooter/gui/Credits.java | 1 - .../spacescooter/gui/ShopOffer.java | 51 ++++++++++++++++++ .../spacescooter/gui/ShopOfferValue.java | 13 +++++ .../spacescooter/screen/ShopScreen.java | 51 ++++++++++++------ 9 files changed, 121 insertions(+), 30 deletions(-) create mode 100644 res/images/shopTest01.png create mode 100644 res/images/shopTest02.png delete mode 100644 src/de/teamteamteam/spacescooter/entity/PlayerStatus.java create mode 100644 src/de/teamteamteam/spacescooter/entity/StaticValue.java create mode 100644 src/de/teamteamteam/spacescooter/gui/ShopOffer.java create mode 100644 src/de/teamteamteam/spacescooter/gui/ShopOfferValue.java diff --git a/res/images/shopTest01.png b/res/images/shopTest01.png new file mode 100644 index 0000000000000000000000000000000000000000..964d920c46f39825350e231b74a632df6ab39164 GIT binary patch literal 1121 zcmV-n1fKheP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^+{ z3p)^LVR2Fb000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000BLNkl(1DxQ%Gk}x_;fS;n z2{~|y5{Po}Dg>n9gLmyX+4gjCn40m}>+#xQNl9bb(S_rE?Gwv+dPdw@1P_iW9^ zlCAw$2q^nN2RH$4+xI5v*qRqW7nmSCL5Z6P(8{Q90$%|i znFAeQpFk`01Fq)^(~2(bSNkP6NTWm?M2MUMPk@Oza2NOy!5xKd-Mk5JN?5T{0e!%Z|A%LDLRqPF-xk3vqF+q5a620xc z4txWA0bC{ELqCwclR>Z(PBph19GIVn6ng}G*CQ<{T4fyA5>GxpFq(pmj%X5Z?~aRz+2 z0Gc9Yo^Km@6B4yrxmYm)w?RL+Xpwb=NZzFJRS3LsacAjrq4eWC{i_`KzeSfh@M|p% zJM}JK)%MrShK2o7)@a1q^8h$@z?ase2PG!rm%93Y&$i4Xmy(@S zV|ir1fLHT3)Z4RImWt06wtE`7^uwHQfy#*qZCM=Z5Kct=q9!c05{Y nB*$y^90R`qkC$3cW5oXgN;AV3<+V7R00000NkvXXu0mjfE0Fy1 literal 0 HcmV?d00001 diff --git a/res/images/shopTest02.png b/res/images/shopTest02.png new file mode 100644 index 0000000000000000000000000000000000000000..a548428dc184e3ba9334e23f6ebf51722cf513fb GIT binary patch literal 1436 zcmV;N1!MY&P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^+{ z3p)au*Z>*;000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000E{Nkl&!6vsd3y*sbG8QLMCZ)hr+@*`p)F_aQh6ILYRj(>mzcDgh%x^ST@U6`o< zfF`Uk`~kWG7Q}?aB57bjC=dvYhyzm%)6)0o>wWjQnD@q^KZaHzoaAoayXV*UoO^!2 z=4b-A4Cp%Na(-vSWcvN|N?u7b-K$P3zyk0#Q0c=`$?wF#pm?$%h}K2t3X2Tmfz(oEBe3`|0XMK!Gwa2880tf@XRIcwdaXF}QP(pc)i6 zT`oj=com@n97x+K3lA1hs};@k7xCnhIvoTO;C_zKnqKb*J_Du@7Emg{-mn%1lb=j7 zGBrY$W~fzFw3lB6L5zqW_%x@R%zQUP@;FI>I|z#?gTOTKHE?6S90-9a;H{2)2&0ht zdv#YoR+rkLn%LChtdq4M^^AuJ48c&KbJymyalR2Gtz>^8t4Bwd{O6>2vK2TEj26l# zKb>U!)Hq=+#AQyhXBjSaxaHL+OEc_}#SeU0!k6-`<7G{x8(2#e4>en@{Te& z5>?<`U<~C3%AB9)@EGv17}*^ThkpH7-Sv2mO)O|faX;n7e|3smc9_sm-BYDhDQVn{ zHGUMEY$+SUQ9=0$__IJ@5I8V?x zmzS5$DIg500V7i*)DG3el#SS=6Z02&zAh4(ViSug8>t)~_ND>8&r9eS z(8=U9Pd4HIlh83FwPa~ld>zZ{&Ab8L>8XWIt%|cwikSZ|-37mbvktYYbShW{H~`?S zbYhm6kaW@lJD`F$yD&G&w;^OOOu z<`YViwo{tZO@g67!&-<5jbzJNrzmX#i7s-!;Fo-CZ1wTI$26y#lD1Rw$!Hq5U6`~B zIFUY0x3{jgh?}uS6OmN+RK+cIdOfnqP$-xI!=~~OOrzWf4%pa6bJymGn=#QuM0HP<4I{DA^KWLDJu^$vN&s#FUy3h3 zh%XP+sWSli-2PBJxumL#C?u_f#`y-r2ZsSPj6zJsh-SKea!SX08(VE%ZP7T_kjD8& zp&W!o5xJz9KFsq<{1w*k0!{$K05-PdNN990l5M-Ui5NkQ;04~QV?x8g)&bgg@|bsE z@71t?c4EI?FDSB;Vk}Qu$==3=MlgJEm~=kf=vXd|3yn_9SC8dMzvl4#V&e1&@YN<3 z6Az$gG5G`dyx(H-+E+7Pw4913;1!{W)fSMo~#bvu^)b<+wkx1kbAu5+xZ90>aWV0) { this.menuPoint--; - this.player.setPosition(this.player.getX(), 259+(this.menuPoint*100)); + this.player.setPosition(50, this.player.getY()); + this.player.setPosition(this.player.getX(), 159+(this.menuPoint*100)); } }else if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) && !this.keyPressed && this.animationStatus == 0) { this.keyPressed = true; + /////////////////////////////////////////////////////////////// switch (this.menuPoint) { case 0: - if(Credits.getCredits() >= 5){ - PlayerStatus.ShootDamage += 5; + if(Credits.getCredits() >= 5 && schaden.getGekauft() < schaden.getMax()){ + schaden.buy(); + StaticValue.ShootDamage += 5; + StaticValue.schaden++; Credits.setCredits(Credits.getCredits() - 5); + System.out.println(schaden.getGekauft()); } break; case 1: - if(Credits.getCredits() >= 10){ - PlayerStatus.HealthPoints += 10; + if(Credits.getCredits() >= 10 && schild.getGekauft() < schild.getMax()){ + schild.buy(); + StaticValue.ShieldPoints += 10; + StaticValue.schild++; Credits.setCredits(Credits.getCredits() - 10); } break; case 2: + if(Credits.getCredits() >= 10 && leben.getGekauft() < leben.getMax()){ + leben.buy(); + StaticValue.HealthPoints += 10; + StaticValue.leben++; + Credits.setCredits(Credits.getCredits() - 10); + } + break; + case 3: this.animationStatus = 1; break; }