using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.TextCore.Text;
using static UnityEditor.Progress;

public class Rivet : Character
{
    public CharacterRope ropes;
    public GameObject ropePrefab;

    public void ShortenRopes()
    {

    }

    public void BindingRopes(List<Enemy> enemies)
    {
        for (int i = 0; i < enemies.Count; i++)
        {
            if (enemies[i].rope)
            {
                enemies[i].rope.gameObject.SetActive(false);
                enemies[i].rope = null;
            }
            GameObject ropeObj = PoolManager.Instantiate(ropePrefab);
            CharacterRope rope = ropeObj.GetComponent<CharacterRope>();
            rope.BeLink(enemies[i], this);
        }
        PlayersInput.instance[0].sprintLinkTrigger.linkedEnemyDic.Clear();
        PlayersInput.instance[0].sprintLinkTrigger.linkedEnemy.Clear();
    }
}
