示例#1
0
 void Awake()
 {
     instance     = this;
     activePeople = new List <PersonBehavior> ();
     spawnTimers  = new List <float> ();
     spawnPoints  = SpawnPointManager.GetPath();
     peopleLayer  = LayerMask.NameToLayer("People");
     peopleParent = new GameObject("People Instances").transform;
 }
示例#2
0
    void SaveFile(string location)

    {
        Debug.Log("location " + location);

        PathSample[] patrol = PatrolPathManager.GetPath();
        PathSample[] hero   = HeroPathManager.GetPath();
        PathSample[] spawns = SpawnPointManager.GetPath();

        Debug.Log("patrol" + patrol);
//
        string patrol_json = JsonUtility.ToJson(patrol);
        string hero_json   = JsonUtility.ToJson(hero);
        string spawns_json = JsonUtility.ToJson(spawns);

        Debug.Log("location " + spawns_json);
        File.WriteAllText(System.IO.Path.Combine(location, "tmp.txt"), spawns_json);
    }