Day 3
xmzhang1 on 2017/02/21 22:30
of xmzhang
— edited on 2017/02/21 22:58
Thank Buffalo974 giving me an award, I do not know whether due to showing off my graphics, and now my code come errors. I use a lot of hassattr() to do the bool judge in my state machine, It would be OK if just run it only once, but I keep each state during the game running, so when next time flip the state, all the variables still works. It is an annoy thing for me, I tried to use del to delete them and finally I rewrite them. And also in my game, if the player press button B, there will be bomb effect, all the enemy bullet would turn into coins, then fly to the player. Normally, all bullet turns into coin, so there is no bullet, the player won't die, but it is not, I thought maybe the collision detection is before my bomb effect, so the player dies, and I just add a invincible state to player when bomb, just remove the player's hit box. well, The bug still happens, maybe 1/100 chance, the player dies, all the bullet coin fly to the player dead place. It is quite wired, I added a lot of print in my code, and nothing wrong. OK, I think I should just keep it for it is not always happen :) I will go on doing my bosses, I just finish boss 1, there is still 2,3,4,5 waiting for me. Time is limited. Come on!