Moving UIViews separately

Discussion in 'iOS Development' started by startrees, Aug 22, 2010.

  1. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)
    So I have two UIViewClasses called 'Caterpillar' and 'Speed_Bug'. The game is something kinda like a stick wars but you have to drag the 'Caterpillar' and 'Speed_Bugs' to a bucket. There has to be multiple Caterpillars and Speed Bugs are the game would be boring. It adds a new bug about every second trough a function in the Caterpillar or Speed Bug class called addCaterpillar or addSpeedBug. There are two problems if there is a Caterpillar and you are draging it to the bucket when a new one is created it goes back to the starting place.

    Thank YOU!
  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    No one can help without seeing any code whatsoever.
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Caterpillar and SpeedBug should not be creating new Caterpillars and SpeedBugs. Your game engine should be doing that.
  4. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)
    Ok but then how would my game engine do it?
  5. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    You're View Controller should be doing that. Think of it as creating a caterpillar inside a caterpillar inside a caterpillar.
  6. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)
    Yeah but how do I make it do this?

Share This Page