Jump to content


Photo

Save The Humans


  • Please log in to reply
2 replies to this topic

#1 Jake Jollimore

Jake Jollimore

    New Member

  • Members
  • Pip
  • 4 posts

Posted 22 July 2014 - 06:01 PM

So I've completed the Save The Humans game, but a lot of the time, after saving one human, the human and portal will either spawn off screen or in the bottom row of the grid. When the human spawns in the bottom row, clicking it automatically causes game over.

I ran the source project, so I know that this doesn't happen there. Where should I look in my code for the problem?

Edited by Jake Jollimore, 22 July 2014 - 06:03 PM.


#2 AndrewStellman

AndrewStellman

    Andrew Stellman

  • O'Reilly Author
  • PipPipPipPipPipPipPipPipPipPipPip
  • 811 posts
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:Author of: "Head First C#", "Beautiful Teams", "Head First PMP", "Applied Software Project Management"

Posted 23 July 2014 - 01:59 PM

Nice! It sounds like you've got the right amount of tenacity to be a good programmer. :) The problem is probably in the target_PointerEntered() method, which calls Canvas.SetTop() and Canvas.SetLeft() to set the coordinates for the human and target. (You'll learn exactly how this works in Chapter 16.)
Andrew Stellman
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com

#3 Jake Jollimore

Jake Jollimore

    New Member

  • Members
  • Pip
  • 4 posts

Posted 23 July 2014 - 05:55 PM

Nice! It sounds like you've got the right amount of tenacity to be a good programmer. :) The problem is probably in the target_PointerEntered() method, which calls Canvas.SetTop() and Canvas.SetLeft() to set the coordinates for the human and target. (You'll learn exactly how this works in Chapter 16.)


Great, thanks! I'll see what I can find.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users