New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5 Shields #54
5 Shields #54
Conversation
should display and update whenever anyone clicks fire, but doesn't. something wrong with ShieldSystem
shield go brrr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good job overall! Love the shield sprite btw.
I still have issues with #50 where the states doesn't match each other making it a little bit difficult to test the shield logic so I didn't quite get to see if the shield is being destroyed correctly or not. I did however try my best to give some feedbacks for improvement :)
Hopefully after merging the PR #55 should fix the shooting bug as well.
@@ -6,6 +6,12 @@ import com.badlogic.ashley.core.Component | |||
class ShieldComponent: Component { | |||
|
|||
var shield = 0 | |||
var position = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since InputHandler.playerShieldPosition
is a thing, you can just use it to draw the shield just like what we've have with the ufos.
If this is however intentional that the shield is planned to still exist after being placed and not shot on that round, as well as that we can trigger/place multiple shields then ignore this :)
(if it is planned like so, then the firebase data needs to be reworked, as the data as of now only allows for 1 shield to be available at a time)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having a position value in ShieldComponent makes it easier to check position in ShieldSystem without having to check whether the ShieldComponent is left or right, so that's why we've implemented it that way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, if it is only used for that, then shieldComponent.player would suffice.
It is okay, a small fix / code cleanup in the future can be done. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good!
Wow this is a masterpiece... who wrote this?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and everything seems to be working fine! (other than the old #50 bug tho :P)
LGTM!
Created functionality for shields - each player may create one during the game, and place it in a spot of their choice. It protects against one shot, and once it's destroyed you can't get it back.
Fixes #5