Results 1 to 3 of 3
Discuss How do you make an array of points, to store positions? at the iPhone Developer Exchange - Hackint0sh.org; I want to store the position of 20 sprites, so I'm assuming it's easier to ...
  1. #1
    Rookie Array

    Join Date
    Apr 2009
    Posts
    11
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default How do you make an array of points, to store positions?

    I want to store the position of 20 sprites, so I'm assuming it's easier to update the values inside an array than it is in the actual object.

    I have tried to make an array using Point, NSPoint GCPoint but I can't get anything to work, anyone have an idea?



  2. #2
    Newbie Array

    Join Date
    Feb 2009
    Posts
    4
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    make array of 2*n where n is number of points. and where
    i = x cordinate
    i+1 = y cordinate of the point

    hope it helps

  3. #3
    Newbie Array

    Join Date
    May 2009
    Location
    Pittsburgh, PA
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Array of points on the iPhone in Objective-C

    NSArray *array = [[NSArray alloc] initWithObjects:[NSValue valueWithCGPoint:CGPointMake(1.0f, 1.0f)], [NSValue valueWithCGPoint:CGPointMake(2.0f, 2.0f)], ..., nil];

    and don't forget to release the array when you're done.

 

 

Similar Threads

  1. MacNN: Apple Stores take on new business positions
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 05-17-2010, 04:10 PM
  2. Array of objects - Best way to go about it?
    By Scubaa in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 08-08-2008, 11:47 AM
  3. Leopard n a raid-0 array
    By jebrum in forum Archiv (Leopard)
    Replies: 0
    Last Post: 11-29-2007, 12:40 AM
  4. Customize 1.13 w/rSBT - Random positions
    By peu in forum Free Toolchain Software (Cydia App's)
    Replies: 6
    Last Post: 11-10-2007, 04:40 AM
  5. Is it possible to set icons to a specific positions on the fourth row?
    By Lenuam in forum Free Toolchain Software (Cydia App's)
    Replies: 3
    Last Post: 11-10-2007, 12:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:36 AM.
twitter, follow us!