Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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
        }
Exemplo n.º 3
0
 private static bool Attack(UnitOrder order)
 {
     return(AttackExecutor.Execute(order));
 }