void Start() { abilities = GetComponent <EnemySpells>().ability; safeAbility = GetComponent <EnemySpells>().safeAbility; targets = FindObjectsOfType <Fighter>(); mover = GetComponent <Mover>(); onRailsMover = GetComponent <OnRailsMover>(); cooldown = GetComponent <CoolDown>(); channel = GetComponent <Channel>(); attackIndicator = GetComponent <AttackIndicator>(); attackReceiver = GetComponent <AttackReceiver>(); attackExecutor = GetComponent <AttackExecutor>(); enemyTarget = GetComponent <EnemyTarget>(); spline = GetComponent <splineMove>(); stateMachine = GetComponent <StateMachine>(); animationHandler = GetComponent <AnimationHandler>(); allEnemies = FindObjectsOfType <EnemyTarget>(); allActors = FindObjectsOfType <Fighter>(); allPushables = FindObjectsOfType <Pushable>(); combatController = FindObjectOfType <CombatController>(); cooldown.isOnCD = true; channel.isChanneling = false; channel.channel = 0f; //print("allPushables start count: " + allPushables.Length); //perform attack once will be used to check if the current attack is in progress }
void Awake() { cooldown = GetComponent <CoolDown>(); cooldown.isOnCD = false; art = this; health = actor.health; maxHealth = actor.health; strength = actor.armor; speed = actor.speed; evasion = actor.evasion; armor = actor.armor; zodiac = actor.zodiac; spellsEquipped = GetComponent <SpellsEquipped>(); abilities[0] = spellsEquipped.ability[0]; abilities[1] = spellsEquipped.ability[1]; abilities[2] = spellsEquipped.ability[2]; abilities[3] = spellsEquipped.ability[3]; animationHandler = GetComponent <AnimationHandler>(); combatController = FindObjectOfType <CombatController>(); mover = GetComponent <Mover>(); cooldown = GetComponent <CoolDown>(); channel = GetComponent <Channel>(); targetingManager = GetComponent <TargetingManager>(); attackExecutor = GetComponent <AttackExecutor>(); playerStats = GetComponent <PlayerStats>(); //materialRenderer = GetComponent<Renderer>(); savedAbility = null; }
private void Awake() { mover = GetComponent <Mover>(); coolDown = GetComponent <CoolDown>(); channel = GetComponent <Channel>(); combatController = FindObjectOfType <CombatController>(); deathHandler = GetComponent <DeathHandler>(); zodiac = enemy.zodiac; UpdateWingPosition(); speed = enemy.speed; strength = enemy.strength; evasion = enemy.evasion; armor = enemy.armor; health = enemy.health; maxHealth = enemy.health; counterAttack = enemy.counterAttack; }