예제 #1
0
파일: Townv2.cs 프로젝트: Xenation/ProcGen
        public static Townv2 CreateNew(TownGen gen, Transform parent, Vector3 position, GameObject debug)
        {
            GameObject go = new GameObject("Town");

            go.transform.SetParent(parent);
            go.transform.position = position;
            if (debug != null)
            {
                Instantiate(debug, go.transform).transform.localPosition = Vector3.zero;
            }
            Townv2 town = go.AddComponent <Townv2>();

            town.Init(gen);
            return(town);
        }
예제 #2
0
파일: Townv2.cs 프로젝트: Xenation/ProcGen
 private void Init(TownGen gen)
 {
     generator = gen;
 }