示例#1
0
        private IEnumerator SetupSceneCoroutine()
        {
            while (!NetworkLevelLoader.Instance.AllPlayerDoneLoading || !NetworkLevelLoader.Instance.IsOverallLoadingDone)
            {
                yield return(null);
            }

            // enemies
            foreach (var character in CharacterManager.Instance.Characters.Values.Where(x => x.IsAI))
            {
                MarkerScript.AddMarker(character.gameObject, MarkerScript.Types.Enemy);
            }

            // gatherables
            foreach (var loot in Resources.FindObjectsOfTypeAll <SelfFilledItemContainer>())
            {
                MarkerScript.AddMarker(loot.gameObject, MarkerScript.Types.Loot);
            }

            // npc
            foreach (var npc in Resources.FindObjectsOfTypeAll <SNPC>())
            {
                MarkerScript.AddMarker(npc.gameObject, MarkerScript.Types.NPC);
            }
        }
示例#2
0
        private static void OnSettingChanged(object _, EventArgs __)
        {
            foreach (var script in MinimapScript.Instances)
            {
                script?.ApplyFromConfig();
            }

            MarkerScript.ApplyConfigToInstances();
        }
示例#3
0
            public static void Postfix(Character __instance)
            {
                if (__instance.GetComponent <CharacterAI>())
                {
                    return;
                }

                MarkerScript.AddMarker(__instance.gameObject, MarkerScript.Types.Player);
            }
示例#4
0
        public static void OnSettingsApplied()
        {
            foreach (var script in MinimapScript.Instances)
            {
                script?.ApplyFromConfig();
            }

            MarkerScript.ApplyConfigToInstances();
        }