public virtual void Setup(AP_Room r, DD_GenObstacle g, GiveEnemy e) { obstacleGenerator = g; enemyGenerator = e; room = r; rows = r.GetSize() - 3; // -3 accomodates an inset such that objects are generated at least 1 unit away from the room's walls columns = rows; }
protected Vector3 offset = Vector2.zero; // offset of pouplating objects to match big room public override void Setup(AP_Room r, DD_GenObstacle g, GiveEnemy e) { obstacleGenerator = g; enemyGenerator = e; room = r; int newSize = 2 * r.GetSize() - 4; // to get inset from sides of new large room rows = newSize; //r.GetSize () - 3; columns = rows; float offsetMod = r.GetSize() / 2f; Debug.Log("OFFSET MOD FOR LARGE ROOM IS " + offsetMod); offset = new Vector2(offsetMod, offsetMod); if (FindObjectsOfType <AP_BigRoomPopulator> ().Length == 1) { handleBoss = true; } }