ItHadToComeToThis Posted January 9, 2020 Share Posted January 9, 2020 So, my combat system is coming along nicely and I am currently at the point of adding in the action bar. The flow of logic at the minute is thusly : Press gesture -> HUD picks up gesture and darkens the texture on the appropriate slot -> HUD sends message to attached attack telling it to start -> the attached attack sends a message to the HUD checking that the player has enough mana and has the correct attack type -> If they do the HUD sends a message back to the attached attack and instructs it to start -> the HUD then activates a cool down timer preventing you from using that slot / attack again until the timer runs out -> Slot lights back up What I would usually do is also add a cool down timer and use/prevent variable to the attached attack as well. Thus the HUD and the attached attack would both be running some kind of use prevention and cool down timer. But, is this necessary?. It is something I have always done and I am now wondering whether I am just writing needless code if the HUD is already handling the cool down. The only disadvantage to not including it is in theory someone could detach the attack and then re attach it to another slot and use it straight away. However, with the way I have the action slots setup it would be a pain as they would have to detach more than one thing to place it in another slot. The slots do not auto re arrange themselves if you detach something as a player might detach by accident and want their bar setup in a specific way. What do you think? Link to comment Share on other sites More sharing options...
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now