public void addFloor(StageSection section, string textureName, int i, int j) { StagePanel panel = getPanel(section, StageLocation.Floor); Texture2D texture = lhg.Assets.loadTexture(textureName); Rectangle3D textureExtents = getTextureExtents(panel, texture, i, j, 0); SimpleSprite3D sprite = new SimpleSprite3D(lhg, texture, textureExtents); panel.addSprite(sprite); }
private void createSection(StageSection section) { switch (section) { case StageSection.Left: leftBackground = new StagePanel(lhg, section, StageLocation.Background, cellSize, leftWidth, backgroundHeight); leftFloor = new StagePanel(lhg, section, StageLocation.Floor, cellSize, leftWidth, floorHeight); break; case StageSection.Center: centerBackground = new StagePanel(lhg, section, StageLocation.Background, cellSize, centerWidth, backgroundHeight); centerFloor = new StagePanel(lhg, section, StageLocation.Floor, cellSize, centerWidth, floorHeight); break; case StageSection.Right: rightBackground = new StagePanel(lhg, section, StageLocation.Background, cellSize, centerWidth, backgroundHeight); rightFloor = new StagePanel(lhg, section, StageLocation.Floor, cellSize, centerWidth, floorHeight); break; } }
private StagePanel getPanel(StageSection section, StageLocation location) { switch (section) { case StageSection.Left: if (location == StageLocation.Background) { return(leftBackground); } else { return(leftFloor); } case StageSection.Center: if (location == StageLocation.Background) { return(centerBackground); } else { return(centerFloor); } case StageSection.Right: if (location == StageLocation.Background) { return(rightBackground); } else { return(rightFloor); } } return(null); }
public void PlaceSectionInActiveList(string key, StageSection section) { sectionsActive.Add(key, section); }