From 82241a5a7189e66cf537617242ea8e75ce097972 Mon Sep 17 00:00:00 2001 From: Alisa95 Date: Wed, 1 Jun 2022 21:55:46 +0200 Subject: [PATCH] Nacharbeiten HA6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Logger ergänzt --- .DS_Store | Bin 0 -> 6148 bytes prog2-codebase/GameProject/bin/.gitignore | 8 ++++++++ spaceinvaders/.DS_Store | Bin 0 -> 6148 bytes spaceinvaders/GameProject/.DS_Store | Bin 0 -> 6148 bytes spaceinvaders/GameProject/bin/.gitignore | 7 +++++++ spaceinvaders/GameProject/bin/log4j2.xml | 2 +- spaceinvaders/GameProject/lib/.DS_Store | Bin 0 -> 6148 bytes spaceinvaders/GameProject/src/log4j2.xml | 2 +- .../src/playground/LevelMovingHitObjects.java | 7 +++++-- 9 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 .DS_Store create mode 100644 prog2-codebase/GameProject/bin/.gitignore create mode 100644 spaceinvaders/.DS_Store create mode 100644 spaceinvaders/GameProject/.DS_Store create mode 100644 spaceinvaders/GameProject/lib/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..68e168fc8fce8a14676df4a5668d99b4ce8e1cc4 GIT binary patch literal 6148 zcmeHK%}T>S5T0$TCKRCuMUM+!3)Wu{FCpp+7}0}DO-#^W%$BAH@U&uG{d7RnZ zic;-Ou`&a*-)43uyZdd}$pC=x`|%b)0{|RU!itN{7eeEtQ&O>(Dx%QuNFaqA1`t9# z<;{k_$N-()G8E9kGrNV4=a)biifCALqD)2T^%8ZmwCJ^3ucA_|Ei5iMOHSRn4(`=3 z=!Lz0;fLKzdOA}oizfXrI!}{fyRmYl@?MzcNmmD?ae^*a7ik`=p|ARRThrgBUNJMk4E!(ybU#Q`LeFAp zP+uL`=n??2hGs3;r&@wyq(#qSX%I(Hgb777p~99J!i1w;T0hTXY0!j&u*HY4GYeax z2t7N#Uut&{o)6$Q~E*bB$R_;hfH7JxWo zIE?e?C5X)f#9lZiGD5SY5|e7xVp!4{ZNQd=AjZ#1g zoGNgg%ca-TIIp#h{z&(nZ@L@jLE#YPm>A`l g3opkvk(7DO=iKjwV`9)54?0ml1Fnlq3jDVMM;ZJTpa1{> literal 0 HcmV?d00001 diff --git a/spaceinvaders/GameProject/.DS_Store b/spaceinvaders/GameProject/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2209be34c2b7d09e949e1cf94a4a25f075ee956e GIT binary patch literal 6148 zcmeHKQA@)x5KioL9Yg4YqK^Sz2hPn2!xHpTA7;_k7HZ(+z$_l~hm8K2jYyomyBcFtc3}N&h zPK@oZ1Mb~o35!`67GL+D#QC({{@@!{ZF8$`*X^c#=ReBAp9a%e?giNmjxME4!b%Uq zt9V=tot-n8PJ=idXDT3$#^7>$9jB2jJUL6FT*dm@U^nc>(Ak^MJH3|Z_WFyKnD;yF zmN@R7EEWxW_u%mKV)&Fir}9;^$$@Mo+XgFm1H~ls;%8|h(+8MAZ;RzDW1}b^B_V9N zTA&IfBnF59Vt^P}CkD(dU^mw(Y08xtAO?QK0GkH-1xT}$RVt^P} zW&mqn5C`x7bNFRe7WvABI%0qr_^%A`+Q1)pke#_(zvYQ{t$=n94F&y5R6syqdIZ1# h&yjs))OLY7__+p4jkpTVt8hSi2q;3RBL;qfflrE+P0j!S literal 0 HcmV?d00001 diff --git a/spaceinvaders/GameProject/bin/.gitignore b/spaceinvaders/GameProject/bin/.gitignore index 61c497a..aa21310 100644 --- a/spaceinvaders/GameProject/bin/.gitignore +++ b/spaceinvaders/GameProject/bin/.gitignore @@ -1 +1,8 @@ +/base/ +/collider/ +/controller/ +/gameobjects/ +/log4j2.xml /playground/ +/rendering/ +/ui/ diff --git a/spaceinvaders/GameProject/bin/log4j2.xml b/spaceinvaders/GameProject/bin/log4j2.xml index f21f70a..63b0589 100644 --- a/spaceinvaders/GameProject/bin/log4j2.xml +++ b/spaceinvaders/GameProject/bin/log4j2.xml @@ -20,7 +20,7 @@ - + diff --git a/spaceinvaders/GameProject/lib/.DS_Store b/spaceinvaders/GameProject/lib/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..777e75827fd59949f7f0905695fcb57423c040ab GIT binary patch literal 6148 zcmeH~O-{o=427Sei%M*|YnO8YkV-kgsA^Bp3qV^0R1rZ!-Dk(O`}_kUN@2+Y*^=jF z9DAaCi#P@#%j13yOaP4Os`$`lXnJ3LU>6Y)DxGIM;}O?r(Bf&3eLkSIQ#{~}zU$TB z;lQ(Qaf3M)To>GJ@q*X=`>xrxZFBy>j3$93kOY!I5=a8S642gD8(+ERngo(S68IvZ z--kk1t)ZQ(eLA?<2tXY%Y{qMwC8$LM)Ee5kGC~tCrFyBvh#_9ic!|6k+PQi;B!&-( zCreByVo&G!#nK_wHPmjsf)zak)`)n>KiD@AV|yqxyh uLcgbf8gnh3i?w2^wPJ3x70 - + diff --git a/spaceinvaders/GameProject/src/playground/LevelMovingHitObjects.java b/spaceinvaders/GameProject/src/playground/LevelMovingHitObjects.java index 0d3b1e4..09c1d01 100644 --- a/spaceinvaders/GameProject/src/playground/LevelMovingHitObjects.java +++ b/spaceinvaders/GameProject/src/playground/LevelMovingHitObjects.java @@ -26,7 +26,7 @@ public class LevelMovingHitObjects extends SpaceInvadersLevel { @Override public void prepareLevel(String id) { super.prepareLevel(id); - + Logger.trace("Creating and adding two RectObjects with Collider"); blueBox = new RectObject("fly_enemy1", this, 300, 300, 75, 40, 40, 40, Color.BLUE); this.addObject(blueBox); ReboundController boxControl = new ReboundController(); @@ -40,15 +40,18 @@ public class LevelMovingHitObjects extends SpaceInvadersLevel { greenBox.addController(boxControl_2); RectCollider colliderGreen = new RectCollider("ColliderGreen", greenBox, 40, 40); greenBox.addCollider(colliderGreen); + Logger.debug("successfully finished prepareLevel with two RectObjects"); } @Override void actionIfEgoCollidesWithEnemy(GameObject enemy, GameObject ego) { - super.actionIfEgoCollidesWithEnemy(enemy, ego); if(enemy.id.contains("fly")) { this.lost = true; Playground.setGlobalFlag("egoLives", 0); Logger.info("ego hit a letal RectObject. Game ends NOW"); + } else { + Logger.debug("ego hit one of the other aliens, calling parent class code"); + super.actionIfEgoCollidesWithEnemy(enemy, ego); HighscoreManager.writeHSToFile((Integer) Playground.getGlobalFlag("points"), (Integer) Playground.getGlobalFlag("highscore"));