It's been two weeks since I updated and I can't say that I'm a busy person since I have weekend off and I work only on weekdays. I was coding in Java last week and the change in language helped me relaxed a bit on coding in C# and when I came back it really felt easier to see the small things. A change in perspective is always good.
Enough ranting though, I try to update the work every night but I end up sleeping. Here's some updates on my Combat [Battle System] I've been working. First some images.
I've added some GUI elements to show to the player what's happening. Every time an attack is done a timer activates that signifies the amount of time that the player is allowed to be able to chain another attack thus getting it recorded into a list of attacks performed.
The idea of the mechanic is to chain a number of attacks and press an activation button that will activate a skill as the image shows. On the update, the player is now able to activate skills by chaining attacks. The images show buttons for XBOX 360 controller because I'm using an XBOX joystick controller but the button presses are applicable on any joystick controller.
How It Works
How the mechanic works is that every time the player presses a button to perform an attack, this button is added to a list. The list is cleared when - 1. The player did not chain an attack when the timer runs out or 2. When the player presses the skill activation button.
If the player presses the skill activation button, the buttons stored in the list is compared to a button list needed by a skill. A player skill handler script contains a list of skills and each of these skills has a list of buttons that works as an ID for when it is compared to the stored list of buttons pressed.
Every skill in the game inherits from a base class called "Skill" which has an activate skill function that is overridden by the skills that inherits from it. The class diagram shows the inheritance. Since the skills inherits from a base class they also have the member variables of the base class such as the button list needed to activate each skill.
To add the skills into the list of handled skills, I first need to add it as a component to the player and then add the skill onto the list in the player skill handler script. I apologize to the one reading this if the explanations are not so clear but if you want to see a much more clearer view then I have a repository for this project found here: https://github.com/mrfriedfish/combatgameplaydemo
The scripts are under Assets/Scripts. Some more updates that I had is the addition of a few animations for Mini. On the next update, I'm aiming to have a playable level where the player can walk around, gather some skill points and learn some skills by defeating enemies. Here's a video of the current update.