Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public MainWindow()
- {
- InitializeComponent();
- }
- Label pickupcoin = new Label();
- public void Start(object sender, RoutedEventArgs e) {
- bool startGame = true;
- if (startGame) {
- startButton.Visibility = Visibility.Hidden;
- Story.Text = "You have Entered a Room n pick a door";
- option1.Content = "Door 1";
- option2.Content = "Door 2";
- option1.Click += new RoutedEventHandler(walkThruDoorOne);
- option2.Click += new RoutedEventHandler(walkThruDoorTwo);
- }
- }
- public void walkThruDoorOne(object sender, RoutedEventArgs e) {
- Label pickupcoin = new Label();
- Story.Text = "You have walked throuh a door n that leads you outside n you can turn around or n keep walking";
- option2.IsEnabled = false;
- pickupcoin.Margin = new Thickness(100, 10, 0, 100);
- top.Children.Add(pickupcoin);
- pickupcoin.Content = "$5";
- pickupcoin.MouseDoubleClick += new MouseButtonEventHandler(pickupCoin);
- Story.Text = "Turn Around or keep wakling ?";
- }
- public void pickupCoin(object sender, MouseEventArgs e) {
- currency.Content = "5";
- option1.IsEnabled = true;
- option2.IsEnabled = true;
- option1.Content = "Turn around";
- option2.Content = "Keep walking";
- Story.Text = "You have picked up $5";
- option1.Click += new RoutedEventHandler(turnAround);
- option2.Click += new RoutedEventHandler(keepWaling);
- }
- public void turnAround(object sender, RoutedEventArgs e) {
- Story.Text = "There is a monster n use your five dollars to power up";
- //This is the mouse event that needs to be overridden or something //
- pickupcoin.MouseDoubleClick += new MouseButtonEventHandler(powerUp);
- }
- public void powerUp(object sender, MouseEventArgs e) {
- Story.Text = "You now have an ability to punch";
- option1.IsEnabled = false;
- option2.IsEnabled = false;
- Label getPunch = new Label();
- top.Children.Add(getPunch);
- getPunch.Margin = new Thickness(20, 20, 20, 20);
- getPunch.Content = "POWER PUNCH";
- getPunch.MouseDoubleClick += new MouseButtonEventHandler(getPunches);
- }
- public void getPunches(object sender, MouseButtonEventArgs e) {
- Story.Text = "Punch monser or die";
- option1.IsEnabled = true;
- option2.IsEnabled = true;
- option1.Click += new RoutedEventHandler(punchMonster);
- option2.Click += new RoutedEventHandler(die);
- }
- public void punchMonster(object sender, RoutedEventArgs e) {
- Story.Text = "You have hurt the monster";
- //contnue
- }
- public void die(object sender, RoutedEventArgs e) {
- Story.Text = "You have died";
- //continue
- }
- public void keepWaling(object sender, RoutedEventArgs e) { }
- public void walkThruDoorTwo(object sender, RoutedEventArgs e) {
- Story.Text = "You have walked through a that leads n to a hall way you can walk down or walk to n the left door down the hall way";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement