SuperMario icon indicating copy to clipboard operation
SuperMario copied to clipboard

Mario can grow multiple times

Open mlemaudit opened this issue 9 years ago • 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.

mlemaudit avatar Oct 31 '15 12:10 mlemaudit

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

mlemaudit avatar Oct 31 '15 12:10 mlemaudit

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!

BrentAureli avatar Nov 03 '15 02:11 BrentAureli

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

mlemaudit avatar Nov 08 '15 16:11 mlemaudit

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

BrentAureli avatar Nov 12 '15 16:11 BrentAureli

Hello @BrentAureli ,

I think this issue is fixed.

Regards, M

mlemaudit avatar Feb 01 '16 20:02 mlemaudit