Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How Do You Do While Intersects  (Read 3024 times)

0 Members and 1 Guest are viewing this topic.

snowboarder6009

  • Newbie
  • *
  • Posts: 3
    • AOL Instant Messenger - boarderwsu
    • View Profile
    • http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2006/09/30/148798.aspx
How Do You Do While Intersects
« on: December 04, 2008, 06:50:59 am »
I have the following code which changes the color of EasternAustraliaSprite whenever the PointerRect intersects the EastAustRect.

what I want to do though is while the pointerRect intersects the EastAustRect change the color. How would i do this?

Code: [Select]

if(EasternAustraliaRect.Intersects(PointerBoxRect))
{
EasternAustraliaSprite.SetColor(sf::Color(0, 255, 0));
}

Wizzard

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: How Do You Do While Intersects
« Reply #1 on: December 04, 2008, 08:52:51 am »
Just put your code in your main loop.

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
How Do You Do While Intersects
« Reply #2 on: December 04, 2008, 10:13:15 am »
To be perfectionist, you'd only want to do that when the conditions change (mouse moves)

 

anything