public override async UniTask ProcessAsync(GActor[] inputParams)
    {
        Vector2Int  targetLocation = inputParams[0].location;
        VFXObserver vfxObserver    = new VFXObserver();

        vfxObserver.eEnterTile.AddListener((x) =>
        {
            if (x != 0)
            {
                Vector2Int loc = (targetLocation - owner.location).Normalized() * x + owner.location;
                ElementSystem.ApplyElementAtAsync(loc, element);
            }
        });
        await Shoot(targetLocation, vfxObserver);

        await ElementSystem.ApplyElementAtAsync(GridManager.instance.GetCircleRange(targetLocation, affectRange), element, damage);
    }
    public async override UniTask ProcessAsync(GChess target)
    {
        Vector2Int  targetLocation = target.location;
        VFXObserver vfxObserver    = new VFXObserver();

        vfxObserver.eEnterTile.AddListener((x) =>
        {
            if (x != 0)
            {
                Vector2Int loc = (targetLocation - owner.location).Normalized() * x + owner.location;
                ElementSystem.ApplyElementAtAsync(loc, element);
            }
        });
        await Shoot(targetLocation, vfxObserver);

        target.AddModifier(CreateInstance <Damp>(), owner);
        await ElementSystem.ApplyElementAtAsync(targetLocation, element);
    }
Example #3
0
 protected async virtual UniTask Shoot(Vector2Int location, VFXObserver vfxObserver = null)
 {
     skillVFX.SetTarget(location);
     skillVFX.SetObserver(vfxObserver);
     await skillVFX.CreateProjectileParticle();
 }
Example #4
0
 public void SetObserver(VFXObserver observer)
 {
     vfXObserver = observer;
 }