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

        await Shoot(targetLocation);

        await ElementSystem.ApplyElementAtAsync(GridManager.instance.GetCircleRange(targetLocation, affectRange), element, damage);
    }
Пример #2
0
    async public override UniTask ProcessAsync(GActor[] inputParams)
    {
        GChess     target    = inputParams[0] as GChess;
        Vector2Int direction = target.location - owner.location;
        await ElementSystem.ApplyElementAtAsync(target.location, element, damage);

        await target.PushTowardAsync(direction, 1);
    }
Пример #3
0
    async public override UniTask ProcessAsync()
    {
        await ElementSystem.ApplyElementAtAsync(owner.location + direction, element, damage);

        GChess chess = GridManager.instance.GetChess(owner.location + direction);;

        Debug.Log(chess ? chess.ToString(): "Empty");
    }
 // Use this for initialization
 void Start()
 {
     playerControl = transform.root.GetComponent <CharacterController2D>();
     playerHealth  = transform.root.GetComponent <PlayerHealthManager>();
     shoot         = transform.GetComponentInChildren <FireBullet>();
     attack        = transform.GetComponentInChildren <AttackScript>();
     chargeAttack  = transform.GetComponentInChildren <PlayerChargeMelee>();
     element       = transform.root.GetComponent <ElementSystem>();
 }
    async public override UniTask ProcessAsync()
    {
        Vector2Int[] range          = GetAffectRange();
        Vector2Int   targetLocation = range[range.Length - 1];

        await Shoot(targetLocation);

        await ElementSystem.ApplyElementAtAsync(range, element, damage);
    }
    async public override UniTask ProcessAsync()
    {
        if (direction == Vector2Int.zero)
        {
            return;
        }
        Vector2Int targetLocation = owner.location + direction;

        await Shoot(targetLocation);

        await ElementSystem.ApplyElementAtAsync(targetLocation, element, damage);
    }
    void Awake()
    {
        anim          = transform.root.gameObject.GetComponent <Animator>();
        hitbox        = GetComponent <BoxCollider2D>();
        playerControl = transform.root.GetComponent <CharacterController2D>();
        effect        = GetComponent <SpriteRenderer> ();

        animMelee = GetComponent <Animator>();
        element   = transform.root.GetComponent <ElementSystem>();

        anim.SetBool("isAttacking", false);
        hitbox.enabled = false;
    }
Пример #8
0
    async public override UniTask ProcessAsync()
    {
        Vector2Int[] range          = GetAffectRange();
        Vector2Int   targetLocation = range[range.Length - 1];

        await Shoot(targetLocation);

        await ElementSystem.ApplyElementAtAsync(GridManager.instance.GetCircleRange(targetLocation, affectRange), element, damage);

        if (willLockTarget)
        {
            ReleaseLock();
        }
    }
Пример #9
0
    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);
    }
Пример #10
0
    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);
    }
Пример #11
0
 public override void OnPassFloor(GFloor floor)
 {
     base.OnPassFloor(floor);
     ElementSystem.ApplyElementAtAsync(floor.location, Element.Water);
 }
 // Use this for initialization
 void Start()
 {
     anim    = GetComponent <Animator>();
     element = GameObject.Find("Player Character").GetComponent <ElementSystem>();
 }
Пример #13
0
 private void Start()
 {
     elementSystem = FindObjectOfType <ElementSystem>();
 }
Пример #14
0
 void Start()
 {
     element = GameObject.Find("Player Character").GetComponent <ElementSystem>();
 }
 void Awake()
 {
     anim    = transform.root.gameObject.GetComponent <Animator>();
     player  = transform.root.GetComponent <CharacterController2D>();
     element = transform.root.GetComponent <ElementSystem>();
 }
Пример #16
0
 void Start()
 {
     anim    = transform.root.gameObject.GetComponent <Animator>();
     player  = transform.root.GetComponent <PlayerControl2D>();
     element = transform.root.GetComponent <ElementSystem>();
 }
Пример #17
0
 public override void OnDeath()
 {
     _ = ElementSystem.ApplyElementAtAsync(GridManager.instance.GetCircleRange(owner.location, affectRange), element, damage);
 }