|
@@ -24,20 +24,23 @@ public class FloatEffect : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
if (!isEnemy && other.gameObject.layer == 8)
|
|
if (!isEnemy && other.gameObject.layer == 8)
|
|
|
{
|
|
{
|
|
|
- GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
|
|
- ga.GetComponent<Enemy>().FloatStateOn();
|
|
|
|
|
|
|
+ Enemy ene = other.GetComponentInParent<Enemy>();
|
|
|
|
|
+ ene.FloatStateOn();
|
|
|
|
|
+ FloatData.eneIsFloating.Add(ene);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
else if(isEnemy && other.gameObject.layer == 7)
|
|
else if(isEnemy && other.gameObject.layer == 7)
|
|
|
{
|
|
{
|
|
|
- GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
|
|
- ga.GetComponent<Demonic>().FloatStateOn();
|
|
|
|
|
|
|
+ Demonic dem = other.GetComponentInParent<Demonic>();
|
|
|
|
|
+ dem.FloatStateOn();
|
|
|
|
|
+ FloatData.demIsFloating.Add(dem);
|
|
|
}
|
|
}
|
|
|
else if(isEnemy && other.gameObject.layer == 6)
|
|
else if(isEnemy && other.gameObject.layer == 6)
|
|
|
{
|
|
{
|
|
|
- GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
|
|
- ga.GetComponent<PlayerController>().lostMp = 0;
|
|
|
|
|
- ga.GetComponent<PlayerController>().soulCollector.enabled = false;
|
|
|
|
|
- ga.GetComponent<PlayerController>().FloatStateOn();
|
|
|
|
|
|
|
+ PlayerController pc = other.GetComponentInParent<PlayerController>();
|
|
|
|
|
+ pc.lostMp = 0;
|
|
|
|
|
+ pc.soulCollector.enabled = false;
|
|
|
|
|
+ pc.FloatStateOn();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|