Exemplo n.º 1
0
        static bool Prefix(EAIManager __instance, EntityAlive ___entity)
        {
            IEnumerator DelayThenRun(EntityAlive entity)
            {
                yield return(entityWait); //saves allocation/gc

                if (entity != null && entity.IsSleeper && entity.IsAlive())
                {
                    //Log.Warning("Spawning scout...");
                    GameManager.Instance.World.aiDirector.GetComponent <AIDirectorChunkEventComponent>() //could cache this
                    .SpawnScouts(entity.position);
                }
            }

            GameManager.Instance.StartCoroutine(DelayThenRun(___entity));
            return(true);
        }
Exemplo n.º 2
0
 public static bool Prefix(EAIManager __instance, EntityAlive ___entity)
 {
     return(!SphereII_InertEntity.IsInert(___entity));
 }