|
|
@@ -1,6 +1,7 @@
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
+using static UnityEngine.GraphicsBuffer;
|
|
|
|
|
|
public class PlayerRope : MonoBehaviour
|
|
|
{
|
|
|
@@ -24,4 +25,12 @@ public class PlayerRope : MonoBehaviour
|
|
|
line.SetPosition(0, PlayerController.instance.transform.position + Vector3.up);
|
|
|
line.SetPosition(1, targetEnemy.transform.position + Vector3.up);
|
|
|
}
|
|
|
+
|
|
|
+ private void FixedUpdate()
|
|
|
+ {
|
|
|
+ if (!targetEnemy || targetEnemy.isDie)
|
|
|
+ {
|
|
|
+ gameObject.SetActive(false);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|