Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Compiled Languages (https://www.askmehelpdesk.com/forumdisplay.php?f=466)
-   -   C# collision detection (https://www.askmehelpdesk.com/showthread.php?t=302672)

  • Jan 12, 2009, 04:08 PM
    albear
    C# collision detection
    OK I have my collision detection going but I'm not sure how to remove an object after it has collided with another.
    I have
    if (mozzieRectangle.Intersects(donutRectangle))
    mozzieHit = true;

    then later on

    if (mozzieHit)
    {
    //remove balloon

    }

    my problem is I can't figure out how to get rid of the object.
  • Jul 17, 2009, 11:24 AM
    realrustyspork
    /*the name of the object you want to remove*/.Visible = false;

    this will make it invisible, but not delete it. I hope that helps

  • All times are GMT -7. The time now is 09:45 AM.