Tactics Movement Tutorial (Cont.) - Turn Manager
January 3rd, 2019
Turn Manager - Tactics
Turn Management
Youtube - Unity Tutorial - Tactics Movement - Part 5By: Game Programming Academy
This part of the tactics game tutorials focused on creating the turn manager. An NPC character was created to represent another team. Even though there are only two units, the tutorial design deals with entire teams. The turnManager used static variables and methods because it should be very accessible and will act as a sort of global since there should only ever be one.
TERMINOLOGY
Subscriber Pattern: the tutorial mentions using this method to add units to the turn manager queue. This was tied to the idea that when a unit comes "online", it should be able to add itself to the proper list in dictionary.
Dictionary: more uses of this in turnManager system, so I still need to look into this to see how they work.
NOTES
Will need to add method to remove unit from queue when it is defeated, which will then also lead into another method that will be needed for dealing with what happens when an entire team is defeated.
There was a method named “EndTurn” in the TurnManager script and the TacticsMove script. I am not sure if this is a bad practice or something that is generally done without consequence.
PROBLEMS
My units could move through each other or even on to the same space. Going back to tutorial video “Tactics Movement – Part 2” I saw there was an adjacencyList.Clear(); command I was missing in my Tile Reset method. Adding this back in fixed the issue. I wasn’t sure if this was removed later in the tutorial by the tutorial itself for bug testing when player movement was buggy. After checking video "Tactics Movement - Part 4" in the debugging segment, this does not appear to be the case, so it does seem that I just missed that line of code the first time.
Comments
Post a Comment