Ejemplo n.º 1
0
        private Hallway CreateHallway(HallwayPoints points)
        {
            GameObject go = new GameObject(string.Format("Hallway {0}", hallwayCount++));

            go.transform.SetParent(hallwayHolder.transform);
            Hallway h = go.AddComponent <Hallway>();

            h.Generate(points, hallwayWidth);
            hallways.Add(h);
            return(h);
        }
Ejemplo n.º 2
0
        public void Generate(HallwayPoints points, int width)
        {
            this.points = points;
            col1        = this.gameObject.AddComponent <BoxCollider2D>();

            this.width = width;


            //GenerateHallwayTiles();

            this.transform.position = points.midPoint;
        }