Added the ghost realm
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Fruitomation.Game
|
|||||||
};
|
};
|
||||||
|
|
||||||
item.transform.position = OutputLocation.position;
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
|
||||||
}, TriggerType.Enter);
|
}, TriggerType.Enter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace Fruitomation.Game
|
|||||||
};
|
};
|
||||||
|
|
||||||
item.transform.position = OutputLocation.position;
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
|
||||||
}, TriggerType.Enter);
|
}, TriggerType.Enter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Fruitomation.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
item.transform.position = OutputLocation.position;
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
|
||||||
}, TriggerType.Enter);
|
}, TriggerType.Enter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Fruitomation.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
item.transform.position = OutputLocation.position;
|
item.transform.position = OutputLocation.position;
|
||||||
|
item.SendToTheGhostRealm();
|
||||||
|
|
||||||
}, TriggerType.Enter);
|
}, TriggerType.Enter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using System.Numerics;
|
|
||||||
using Fruitomation.Global;
|
|
||||||
using PashaBibko.Pacore.Attributes;
|
using PashaBibko.Pacore.Attributes;
|
||||||
|
using Fruitomation.Global;
|
||||||
|
using System.Collections;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
using Vector3 = UnityEngine.Vector3;
|
using Vector3 = UnityEngine.Vector3;
|
||||||
|
|
||||||
namespace Fruitomation.Game.Items
|
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)
|
public void InitBehaviour(Canvas canvas, ItemType startType)
|
||||||
{
|
{
|
||||||
RectTransform = transform.GetComponent<RectTransform>();
|
RectTransform = transform.GetComponent<RectTransform>();
|
||||||
|
|||||||
Reference in New Issue
Block a user