EnemySlotsManager - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

This class will manage all available enemy slots on every Tiki, with functionallity to get a Tiki to attack.

  • Struct FSlots2D
 - TArray<bool> Slots

 - This struct contains an array with all slots from a Tiki, free or not.
  • Properties:

ArrayOfTikis

 - TArray<ATK_Player*>

 - Default: empty

 - Every Tiki must include itself on this array by calling AddTiki functionallity, either directly or by calling AddTikiToSlotsManager on [GameInstance](https://github.com/gamedevmaster/gamedevmaster-g21819/wiki/GameInstance).

ArrayOfArrayFreeSlots

 - TArray<FSlots2D>

 - Default: empty

 - Array with every free slots per Tiki. this will be initialized on function AddTiki after adding the Tiki to the previous array.
  • Functionallity:

AddTiki

 - Input:
   ATK_Player* New Tiki To Add

 - Adds a Tiki to the array of possible targets and initialize all its free slots.

GetFreeTikiToAttack

 - Input: 
   int Slots Required

 - Output: 
   ATK_Player* Enemy Target To Attack

 - Gets all free slots from all Tikis, and compare them with the required slots of the enemy. Returns the first match with enough free slots or none if there is no Tiki with enough free slots.



* TODO: define aggro system and possible targeting system (close / far distance, weak / strong target, etc).


⚠️ **GitHub.com Fallback** ⚠️