Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Collision through an array  (Read 778 times)
0 Members and 1 Guest are viewing this topic.
Offline CogWheelz
« Posted 2014-08-13 01:54:56 »

I have a basic array list that adds bullets to it once clicked. I'm trying to create a new Rectangle as well that keeps its' position, but it returns 0.0.

For an example I have this.
1  
stuff.add(new thingy(somethingCool));

I need a rectangle to be at
1  
somethingCool.x & somethingCool.y
. I hope this is enough code for an answer.
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 296
Exp: 5 years



« Reply #1 - Posted 2014-08-13 02:01:33 »

You need a rectangle where each bullet is? Just have a rectangle field in the bullet class.
Offline CogWheelz
« Reply #2 - Posted 2014-08-13 02:07:52 »

Found that out right after I posted, my bad. While I got you here, does a WIP have to be really worked on? If my game has been worked on for about 2 weeks and has stale gameplay (that I will improve), would it be a bad idea to share it?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 296
Exp: 5 years



« Reply #3 - Posted 2014-08-13 02:11:02 »

Look at the stickied rules post and some of the threads and decide if your project meets the criteria.
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (86 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (81 views)
2014-12-05 12:39:02

SHC (91 views)
2014-12-03 16:27:13

CopyableCougar4 (98 views)
2014-11-29 21:32:03

toopeicgaming1999 (157 views)
2014-11-26 15:22:04

toopeicgaming1999 (154 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!