Ejemplo n.º 1
0
        public void UpdateRangedAttack(GameManager gm)
        {
            if (TargetedDirection == Vector3Int.zero)
            {
                //not currently targeting
                return;
            }

            ClearRangedAttackIndicators();
            Vector3Int pos = Vector3Int.FloorToInt(this.transform.position) + TargetedDirection;

            while (gm.Passable(pos, true))
            {
                var indicator = Instantiate(RangedAttackIndicatorUI, pos, Quaternion.identity);
                RangedAttackIndicatorOverlays.Add(indicator);
                pos = pos + TargetedDirection;
            }
            TargetTile(pos);
        }