Added the ghost realm

This commit is contained in:
2026-04-27 20:46:34 +01:00
parent 0c22708642
commit 3943f4d1a5
5 changed files with 20 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ namespace Fruitomation.Game
};
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
}, TriggerType.Enter);
}

View File

@@ -33,6 +33,7 @@ namespace Fruitomation.Game
};
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
}, TriggerType.Enter);
}

View File

@@ -20,6 +20,7 @@ namespace Fruitomation.Game
}
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
}, TriggerType.Enter);
}

View File

@@ -20,6 +20,7 @@ namespace Fruitomation.Game
}
item.transform.position = OutputLocation.position;
item.SendToTheGhostRealm();
}, TriggerType.Enter);
}

View File

@@ -1,7 +1,8 @@
using System.Numerics;
using Fruitomation.Global;
using PashaBibko.Pacore.Attributes;
using Fruitomation.Global;
using System.Collections;
using UnityEngine;
using Vector3 = UnityEngine.Vector3;
namespace Fruitomation.Game.Items
@@ -33,6 +34,19 @@ namespace Fruitomation.Game.Items
}
}
private IEnumerator SendToGhostRealmInternal()
{
CurrentChild.SetActive(false);
Body2D.Sleep();
yield return new WaitForSeconds(0.5f);
CurrentChild.SetActive(true);
Body2D.WakeUp();
}
public void SendToTheGhostRealm() => StartCoroutine(SendToGhostRealmInternal());
public void InitBehaviour(Canvas canvas, ItemType startType)
{
RectTransform = transform.GetComponent<RectTransform>();