Ejemplo n.º 1
0
    protected void SetupAfterAttackDelay(Unit target, GameObject basicAttackPrefab)
    {
        BasicAttackCycle.LockBasicAttack();
        AttackIsInQueue = false;
        ((Champion)unit).OrientationManager.StopTargetRotation();

        ProjectileUnitTargeted projectile = (Instantiate(basicAttackPrefab, transform.position, transform.rotation)).GetComponent <ProjectileUnitTargeted>();

        projectile.ShootProjectile(unit.Team, target, speed, AttackIsCritical.CheckIfAttackIsCritical(unit.StatsManager.CriticalStrikeChance.GetTotal()));
        if (empoweringAbilityWasActiveOnBasicAttackCast)
        {
            projectile.OnAbilityEffectHit += BasicAttackHit;
        }
        else
        {
            projectile.OnAbilityEffectHit += base.BasicAttackHit;
        }
    }
Ejemplo n.º 2
0
 protected void Awake()
 {
     BasicAttackCycle = gameObject.AddComponent <BasicAttackCycle>();
 }