Skip to content

Instantly share code, notes, and snippets.

@Ironclad0 Ironclad0/all files of the game Secret
Last active Feb 24, 2018

Embed
What would you like to do?
For Scott.
private void changeBackground()
{
//creating and adding images to a fiture list from which pictures to the main screen will be taken.
List<Bitmap> Images = new List<Bitmap>();
Images.Add(Properties.Resources.cave);
Images.Add(Properties.Resources.city);
Images.Add(Properties.Resources.death_Gate);
Images.Add(Properties.Resources.Fog);
Images.Add(Properties.Resources.castle);
Images.Add(Properties.Resources.library);
Images.Add(Properties.Resources.ruins);
Images.Add(Properties.Resources.swamp);
Images.Add(Properties.Resources.finile_gate);
if (_player.CurrentLocation.ID == 1)
{
pbMainPicture.BackgroundImage = Images[0];
}
else if (_player.CurrentLocation.ID == 2)
{
pbMainPicture.BackgroundImage = Images[1];
}
else if (_player.CurrentLocation.ID == 3)
{
pbMainPicture.BackgroundImage = Images[2];
}
else if (_player.CurrentLocation.ID == 4)
{
pbMainPicture.BackgroundImage = Images[3];
}
else if (_player.CurrentLocation.ID == 5)
{
pbMainPicture.BackgroundImage = Images[4];
}
else if (_player.CurrentLocation.ID == 6)
{
pbMainPicture.BackgroundImage = Images[5];
}
else if (_player.CurrentLocation.ID == 7)
{
pbMainPicture.BackgroundImage = Images[6];
}
else if (_player.CurrentLocation.ID == 8)
{
pbMainPicture.BackgroundImage = Images[7];
}
else if (_player.CurrentLocation.ID == 9)
pbMainPicture.BackgroundImage = Images[8];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.