Esempio n. 1
0
        private void checkForImageChange()
        {
            int       num = myStory.Position;
            Bitmap    currentMiddleCharacterImage = myStory.MiddleCharacterPicture[num];
            Bitmap    currentBackgroundImage      = myStory.BackgroundPicture[num];
            Occurance currentOccurence            = myStory.StoryOccurances[num];



            //update images
            if (currentMiddleCharacterImage != null)
            {
                middleCharacterBoxImage.Image = currentMiddleCharacterImage;
            }

            if (currentBackgroundImage != null)
            {
                backgroundImage.Image = currentBackgroundImage;
            }


            //check for events

            if (eventBoxActive == true)
            {
                occuranceSwitch(false);
            }
            else if (currentOccurence != null && currentOccurence.Occured == false)
            {
                eventOutputLbl.Text = currentOccurence.Name + "\n" + currentOccurence.Description;
                occuranceSwitch(true);
                currentOccurence.Occured = true;
            }
        }
Esempio n. 2
0
        //checks for story changes. This includes but is not limited to images.
        private void checkForImageChange()
        {
            int       num = myStory.Position;
            Bitmap    currentMiddleCharacterImage = myStory.MiddleCharacterPicture[num];
            Bitmap    currentBackgroundImage      = myStory.BackgroundPicture[num];
            Occurance currentOccurence            = myStory.StoryOccurances[num];

            //combined Foreground Image
            Bitmap currentForegroundImage = myStory.ForegroundPicture[num];

            //Boolean currentForegroundImageOn = myStory.ForegroundPictureOn[num];

            //update images
            if (currentMiddleCharacterImage != null)
            {
                middleCharacterBoxImage.Visible = true;
                middleCharacterBoxImage.Image   = currentMiddleCharacterImage;
            }
            else
            {
                middleCharacterBoxImage.Visible = false;
            }

            if (currentBackgroundImage != null)
            {
                backgroundImage.Image = currentBackgroundImage;
            }

            if (currentForegroundImage != null)
            {
                foregroundImage.Visible = true;
                foregroundImage.Image   = currentForegroundImage;
            }
            else
            {
                foregroundImage.Visible = false;
            }

            //check for events

            if (eventBoxActive == true)
            {
                occuranceSwitch(false);
            }
            else if (currentOccurence != null && currentOccurence.Occured == false)
            {
                eventAlertPanel.BringToFront();
                eventOutputLbl.Text = currentOccurence.Name + "\n" + currentOccurence.Description;
                occuranceSwitch(true);
                currentOccurence.Occured = true;
            }
            if (myStory.Position == myStory.TextEndPosition - 1 && myStory.HasChoices == true)
            {
                showMultipleChoiceRoutes();
                nextStory = allStories[storySelection];
            }

            //check for  button change
            checkButtonColor();
        }
Esempio n. 3
0
        public void findItem(int storyLocation, Item myItem, string myDescription = null)
        {
            string name        = "You found " + myItem.Name;
            string description = myDescription + "\n" + myItem.Description;
            Bitmap image       = myItem.Image;

            Occurance output = new Occurance(name, description, image);

            addOccurance(storyLocation, output);
        }
Esempio n. 4
0
        public void findItem(int storyLocation, Item myItem, string myDescription = null)
        {
            string name        = "You found " + myItem.Name;
            string description = myDescription + "\n" + myItem.Description;
            Bitmap image       = myItem.Image;

            //update image here if image exists in database
            //if (item.Image != null)
            //{
            //   eventAlertPanel.Visible = true;
            //}



            Occurance output = new Occurance(name, description, image);

            addOccurance(storyLocation, output);
        }
Esempio n. 5
0
        public void updateImageArraySizes()
        {
            int sum = text.Count;

            if (HasChoices == true)
            {
                sum += 1;
            }

            Minigames = new Minigame[sum];
            MiddleCharacterPicture = new Bitmap[sum];
            BackgroundPicture      = new Bitmap[sum];
            ForegroundPicture      = new Bitmap[sum];
            StoryOccurances        = new Occurance[sum];
            TextEndPosition        = sum;

            //Choices Array should be set to 3 locations
            Choices = new Choice[3];
        }
Esempio n. 6
0
 public void addOccurance(int storyLocation, Occurance myOccurance)
 {
     StoryOccurances[storyLocation] = myOccurance;
 }
Esempio n. 7
0
 public void updateImageArraySizes()
 {
     MiddleCharacterPicture = new Bitmap[text.Count];
     BackgroundPicture      = new Bitmap[text.Count];
     StoryOccurances        = new Occurance[text.Count];
 }