But as I was saying, the fairly big chunk of work :
After a few days of
CommandReceptor
The command receptor has a function which takes arguments representing the buttons current states and then submits them to a list called inputList, this function then checks how many moves are stored in the list and if it's above moveCache then the oldest entry is deleted (this means there is a speed limit that the sequences need to be input by).
// stores commands public void ParseCommands(float horiz, float vert, bool xButt, bool sqrButt, bool triButt, bool oButt) { List
From there it runs a sequence which cross references every entry in the inputList by every possible sequence which is stored in list possMoves. This checks to see if there are matches and if it does; increments a sequence counter & removed all moves from the possMoves list that don't match the current sequence. If the sequence counter reaches the length of the move, the move is performed, the inputList is wiped and the possMoves list is reset. The information on the move is sent back to PlayerControls and is dealt with from there.
// runs though arrays of moves to check if there is appropriate sequence void MoveCheck() { for (int i = 0; i < inputList.Count; i ++) { bool shouldExit = false; // exits function if finished move for (int j = 0; j < possMoves.Count; j ++) { if (ArrayCheck(inputList[i], possMoves[j][possMoveCount])) { possMoveCount ++; if (possMoveCount >= possMoves[j].Count) { possMoveCount = 0; // clears how far you are in sequence PerformMove(j); // does move using number of list as array inputList.Clear(); // clears moves archive shouldExit = true; // stop function break; } CleanPossMoves(j,possMoveCount); // also tells the sequence } } if (shouldExit) // exits function if condition met { break; // exits from main loop } } MakePossMoves(); possMoveCount = 0; }So at the moment I have the ability for directional moves & directional combinations. I think all I really need now in terms of the combo system is to develop a state mechanism that allows combos by performing moves based on what the last move was and how long ago it was performed. I still regrettably don't have a tablet and so can't really create any more assets to work with (at least neater than a shaky stick figure or silhouette) but when I make any headway I'll be sure to update the blog.
So yeah, that's my post Christmas update and expect to see more in 2015, Happy New Year guys.
P.S: I decided to make a github repository for this project so people could see the code if they were interested https://github.com/IzaacBarratt/tempremental.