add: now using coroutines for demons
This commit is contained in:
@@ -48,6 +48,9 @@ namespace DevourClient.Helpers
|
||||
public static GoatBehaviour[] GoatsAndRats;
|
||||
public static SurvivalInteractable[] SurvivalInteractables;
|
||||
public static KeyBehaviour[] Keys;
|
||||
public static SurvivalDemonBehaviour[] Demons;
|
||||
public static SpiderBehaviour[] Spiders;
|
||||
public static GhostBehaviour[] Ghosts;
|
||||
|
||||
public static IEnumerator GetLocalPlayer()
|
||||
{
|
||||
@@ -115,5 +118,38 @@ namespace DevourClient.Helpers
|
||||
yield return new WaitForSeconds(5f);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator GetDemons()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
Demons = SurvivalDemonBehaviour.FindObjectsOfType<SurvivalDemonBehaviour>();
|
||||
|
||||
// Wait 5 seconds before caching objects again.
|
||||
yield return new WaitForSeconds(5f);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator GetSpiders()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
Spiders = SpiderBehaviour.FindObjectsOfType<SpiderBehaviour>();
|
||||
|
||||
// Wait 5 seconds before caching objects again.
|
||||
yield return new WaitForSeconds(5f);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerator GetGhosts()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
Ghosts = GhostBehaviour.FindObjectsOfType<GhostBehaviour>();
|
||||
|
||||
// Wait 5 seconds before caching objects again.
|
||||
yield return new WaitForSeconds(5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,9 @@ namespace DevourClient
|
||||
MelonCoroutines.Start(Helpers.Entities.GetGoatsAndRats());
|
||||
MelonCoroutines.Start(Helpers.Entities.GetSurvivalInteractables());
|
||||
MelonCoroutines.Start(Helpers.Entities.GetKeys());
|
||||
MelonCoroutines.Start(Helpers.Entities.GetDemons());
|
||||
MelonCoroutines.Start(Helpers.Entities.GetSpiders());
|
||||
MelonCoroutines.Start(Helpers.Entities.GetGhosts());
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
@@ -276,7 +279,7 @@ namespace DevourClient
|
||||
|
||||
if (this.demon_esp)
|
||||
{
|
||||
foreach (SurvivalDemonBehaviour demon in UnityEngine.Object.FindObjectsOfType<SurvivalDemonBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<SurvivalDemonBehaviour>)
|
||||
foreach (SurvivalDemonBehaviour demon in Helpers.Entities.Demons)
|
||||
{
|
||||
if (demon != null)
|
||||
{
|
||||
@@ -305,7 +308,7 @@ namespace DevourClient
|
||||
}
|
||||
}
|
||||
|
||||
foreach (SpiderBehaviour spider in UnityEngine.Object.FindObjectsOfType<SpiderBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<SpiderBehaviour>)
|
||||
foreach (SpiderBehaviour spider in Helpers.Entities.Spiders)
|
||||
{
|
||||
if (spider != null)
|
||||
{
|
||||
@@ -334,7 +337,7 @@ namespace DevourClient
|
||||
}
|
||||
}
|
||||
|
||||
foreach (GhostBehaviour ghost in UnityEngine.Object.FindObjectsOfType<GhostBehaviour>() as UnhollowerBaseLib.Il2CppReferenceArray<GhostBehaviour>)
|
||||
foreach (GhostBehaviour ghost in Helpers.Entities.Ghosts)
|
||||
{
|
||||
if (ghost != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user