O'Reilly Forums: Save The Humans - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Save The Humans Human and Portal Spawn problems

#1 User is offline   Jake Jollimore 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 15-July 14

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?

This post has been edited by Jake Jollimore: 22 July 2014 - 06:03 PM

0

#2 User is offline   AndrewStellman 

  • Andrew Stellman
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 802
  • Joined: 08-October 08
  • 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
0

#3 User is offline   Jake Jollimore 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 15-July 14

Posted 23 July 2014 - 05:55 PM

View PostAndrewStellman, on 23 July 2014 - 01:59 PM, said:

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users