BrentAureli/SuperMario

Mario can grow multiple times

Opened this issue · 5 comments

If you get the first mushroom at the beginning of the level and get the second one at the end of the level without being hit by an enemy, mario grows 2 times.

Hello @BrentAureli
The following patch should solve the problem :

Index: core/src/com/brentaureli/mariobros/Sprites/Mario.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/src/com/brentaureli/mariobros/Sprites/Mario.java   (date 1445566359000)
+++ core/src/com/brentaureli/mariobros/Sprites/Mario.java   (revision )
@@ -200,10 +200,12 @@
     }

     public void grow(){
+        if( !isBig() ) { // @SuperMario#3
-        runGrowAnimation = true;
-        marioIsBig = true;
-        timeToDefineBigMario = true;
-        setBounds(getX(), getY(), getWidth(), getHeight() * 2);
+            runGrowAnimation = true;
+            marioIsBig = true;
+            timeToDefineBigMario = true;
+            setBounds(getX(), getY(), getWidth(), getHeight() * 2);
+        } // @SuperMario#3
         MarioBros.manager.get("audio/sounds/powerup.wav", Sound.class).play();
     }

Regards,
M

Hey M! Thanks so much for the issue reports! There is currently many issues that could be resolved however the series has been completed. I didn't polish off the code because the major points had already been discussed during the series and all future videos would have just been review. See final video here: https://www.youtube.com/watch?v=EIYIh_WXqNw

If you would like to make any changes/fixes yourself please feel free to submit a pull request! I'll accept it!

Hello @BrentAureli,
Thanks for you answer.
I already watched your video but i thought that there was still room for improvment so i reported some of the bugs i noticed.
I'll gladly contribute back but i don't feel really confortable with git.
Do you know a good video tutorial ?
Regards,
M

Im not sure of a good video tutorial but this may help!
https://www.atlassian.com/git/tutorials/syncing/git-pull

Hello @BrentAureli ,

I think this issue is fixed.

Regards,
M