Example #1
0
    private IEnumerator EntityLife()
    {
        yield return(delaySpread);

        varusREntitiesCurrentlySpreading.Remove(this);

        List <Varus_R_Entity> varusREntitiesToSpawn = new List <Varus_R_Entity>();

        foreach (Unit unitAffectedByTether in unitsAffectedByTethers)
        {
            Varus_R_Entity varusREntity = SetupNextEntity(unitAffectedByTether);
            varusREntitiesToSpawn.Add(varusREntity);
            alreadyAffectedUnits.Add(unitAffectedByTether);
        }
        for (int i = 0; i < varusREntitiesToSpawn.Count; i++)
        {
            varusREntitiesToSpawn[i].SetupEntity(ability, unitsAffectedByTethers[i], varusW, alreadyAffectedUnits, varusREntitiesCurrentlySpreading);
        }
        foreach (Varus_R_Entity varusREntity in varusREntitiesToSpawn)
        {
            varusREntity.StartEntityLife();
        }

        Destroy(gameObject);
    }
Example #2
0
    protected override void OnProjectileHit(AbilityEffect projectile, Unit unitHit, bool isACriticalStrike, bool willMiss)
    {
        if (effectType == AbilityEffectType.SINGLE_TARGET)
        {
            Destroy(projectile.gameObject);
        }

        Varus_R_Entity varusREntity = Instantiate(entityPrefab, Vector3.right * unitHit.transform.position.x + Vector3.forward * unitHit.transform.position.z, Quaternion.identity).GetComponent <Varus_R_Entity>();

        varusREntity.SetupEntity(this, unitHit, varusW, new List <Unit>()
        {
            unitHit
        }, new List <Varus_R_Entity>());
        varusREntity.StartEntityLife();
    }