|
|
@@ -17,13 +17,18 @@ public class Spirits_Float : MonoBehaviour
|
|
|
body = transform.parent.parent.parent.gameObject;
|
|
|
origPos = body.transform.position;
|
|
|
curHeight = origPos.y;
|
|
|
+ Invoke("disappear", 0.2f);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void disappear()
|
|
|
+ {
|
|
|
+ GetComponent<Collider>().enabled = false;
|
|
|
}
|
|
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
{
|
|
|
if (other.gameObject.layer == 8)
|
|
|
{
|
|
|
- print(1);
|
|
|
GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
ga.GetComponent<Enemy>().FloatStateOn();
|
|
|
}
|