Beispiel #1
0
        internal bool Loaded()
        {
            var objects = Zone.Scene.Scene.GetRootGameObjects();

            foreach (var obj in objects)
            {
                if (Properties = obj.GetComponent <MapProperties>())
                {
                    break;
                }
            }

            if (Properties != null)
            {
                ComponentHelper.GetComponentsInScene(Zone.Scene.Index, Npcs, true);
                Pathfinding = Properties.GetComponent <Pathfinding>();
                Properties.AddConnections(Connections);
                Properties.AddSpawnPoints(SpawnPoints);

                return(true);
            }
            else
            {
                Debug.LogErrorFormat(_missingMapPropertiesError, Zone.name);
                return(false);
            }
        }