public void GenerateLevel(LevelInfo level) { DisableCurrentWallsAndClearList(); foreach (Wall wall in level.GameWalls) { GameWall childWall = wallPool.GetObject(); childWall.transform.SetParent(transform); childWall.SetParameters(wall); childWall.gameObject.SetActive(true); walls.Add(childWall); } levelName = level.Name; }
public Wall(GameWall gameWall) { Vector3 pos = gameWall.transform.position; Vector3 scale = gameWall.transform.localScale; PosX = pos.x; PosY = pos.y; PosZ = pos.z; ScaleX = scale.x; ScaleY = scale.y; ScaleZ = scale.z; IsDamaging = gameWall.IsDamaging; }
public void CreateLevel(LevelInfo level) { foreach (Wall wall in level.GameWalls) { GameWall childWall = Instantiate(wallPrefab, transform); childWall.SetParameters(wall); } levelName = level.Name; locations = new SpawnLocations(level.PointSpawns.Count); foreach (SpawnLocation location in level.PointSpawns) { locations.Add(location); } GetWalls(); }