void GetAttackerInfo(GameObject attacker) { attackerCurrAttpoint = entityStats.GetCurrAttackPoint(attacker); attackerDmg = entityStats.GetCurrAttackDmg(attacker); attackerRangeDmg = entityStats.GetCurrRangedAttackDmg(attacker); attackerCurrHealth = entityStats.GetCurrHealth(attacker); attackerRange = entityStats.GetCurrRange(attacker); attackerArmor = entityStats.GetCurrArmor(attacker); attackerArmorPiercing = entityStats.GetCurrArmorPiercing(attacker); }
public void HighlightPossAttack(GameObject entity, int selIndex) //TODO make attack rings smaller { if (entity == null || entityStats.GetCurrAttackPoint(entity) <= 0) { return; } //note: don't instantiate new List<int> right away and set it as entity.GetComponent<Entity>().validMovementPositions //for some reason reference is not kept of the original list and thus is not set entity.GetComponent <Entity>().validAttackPositions = GetCellIndexesRange(selIndex, entityStats.GetCurrRange(entity)); HashSet <int> positions = entity.GetComponent <Entity>().validAttackPositions; foreach (int position in positions) { hexGrid.cells[position].EnableHighlight(Color.red); } }