public void CreateAreaOfEffect(List <Unit> unitsAlreadyHit, Team teamOfShooter, AbilityAffectedUnitType affectedUnitType, float duration) { UnitsAlreadyHit = unitsAlreadyHit; castingUnitTeam = teamOfShooter; this.affectedUnitType = affectedUnitType; this.duration = duration; }
private AutoAttackManager() { autoAttackEnabled = true; affectedUnitType = AbilityAffectedUnitType.ENEMIES; biggerAttackRange = 750 * StaticObjects.MultiplyingFactor;//TODO: try to figure out actual value }
public void CreateAreaOfEffect(Team castingUnitTeam, AbilityAffectedUnitType affectedUnitType, WaitForSeconds delayPerTick, int numberOfTicks, float radius, WaitForSeconds delayActivation = null) { this.castingUnitTeam = castingUnitTeam; this.affectedUnitType = affectedUnitType; this.delayPerTick = delayPerTick; this.numberOfTicks = numberOfTicks; this.radius = radius; this.delayActivation = delayActivation; }
public void ShootProjectile(Team castingUnitTeam, AbilityAffectedUnitType affectedUnitType, float speed, float range, bool isACriticalStrike = false, bool willMiss = false) { this.castingUnitTeam = castingUnitTeam; this.affectedUnitType = affectedUnitType; this.speed = speed; this.range = range; this.isACriticalStrike = isACriticalStrike; this.willMiss = willMiss; initialPosition = transform.position; StartCoroutine(ActivateAbilityEffect()); }
public void CreateAreaOfEffect(List <Unit> unitsAlreadyHit, Team teamOfShooter, AbilityAffectedUnitType affectedUnitType, float duration, bool collidersInChildren) { if (collidersInChildren) { this.collidersInChildren = collidersInChildren; foreach (AreaOfEffectCollider aoeCollider in GetComponentsInChildren <AreaOfEffectCollider>()) { aoeCollider.OnTriggerEnterInChild += OnTriggerEnterInChild; } } CreateAreaOfEffect(unitsAlreadyHit, teamOfShooter, affectedUnitType, duration); }
public static bool CheckIfTargetIsValid(Unit unitHit, AbilityAffectedUnitType affectedUnitType, Team castingUnitTeam) { TargetIsValid.castingUnitTeam = castingUnitTeam; switch (affectedUnitType) { case AbilityAffectedUnitType.ALLIES: return(UnitIsAnAlly(unitHit.Team)); case AbilityAffectedUnitType.ENEMIES: return(!UnitIsAnAlly(unitHit.Team)); case AbilityAffectedUnitType.CHARACTERS: return(UnitIsACharacter(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_CHARACTERS: return(UnitIsAnAllyCharacter(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_CHARACTERS: return(UnitIsAnEnemyCharacter(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.MINIONS: return(UnitIsAMinion(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_MINIONS: return(UnitIsAnAllyMinion(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_MINIONS: return(UnitIsAnEnemyMinion(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.PETS: return(UnitIsAPet(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_PETS: return(UnitIsAnAllyPet(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_PETS: return(UnitIsAnEnemyPet(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.MONSTERS: return(UnitIsAMonster(unitHit.UnitType)); case AbilityAffectedUnitType.LARGE_MONSTERS: return(UnitIsALargeMonster(unitHit.UnitType)); case AbilityAffectedUnitType.EPIC_MONSTERS: return(UnitIsAnEpicMonster(unitHit.UnitType)); case AbilityAffectedUnitType.STRUCTURES: return(UnitIsAStructure(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_STRUCTURES: return(UnitIsAnAllyStructure(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_STRUCTURES: return(UnitIsAnEnemyStructure(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.TURRETS: return(UnitIsATurret(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_TURRETS: return(UnitIsAnAllyTurret(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_TURRETS: return(UnitIsAnEnemyTurret(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.INHIBITORS: return(UnitIsAnInhibitor(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_INHIBITORS: return(UnitIsAnAllyInhibitor(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_INHIBITORS: return(UnitIsAnEnemyInhibitor(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.NEXUS: return(UnitIsANexus(unitHit.UnitType)); case AbilityAffectedUnitType.ALLY_NEXUS: return(UnitIsAnAllyNexus(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.ENEMY_NEXUS: return(UnitIsAnEnemyNexus(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.OBJECTIVES: return(UnitIsAnObjective(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.OBJECTIVES_AND_ENEMY_CHARACTERS: return(UnitIsAnObjectiveOrAnEnemyCharacter(unitHit.Team, unitHit.UnitType)); case AbilityAffectedUnitType.TERRAIN: return(UnitIsTerrain(unitHit.UnitType)); } return(false); }