moagg.game
Class AbstractMoaggCollisionGroup
java.lang.Object
com.golden.gamedev.object.CollisionManager
com.golden.gamedev.object.collision.BasicCollisionGroup
moagg.game.AbstractMoaggCollisionGroup
public abstract class AbstractMoaggCollisionGroup
- extends com.golden.gamedev.object.collision.BasicCollisionGroup
Fields inherited from class com.golden.gamedev.object.collision.BasicCollisionGroup |
pixelPerfectCollision, rect1, rect2 |
Method Summary |
protected int |
getRGB(java.awt.image.BufferedImage img,
int[] rgb,
int x,
int y)
This method is part of a workaround for the big performance-decrease on Linux
for the collision detection between ship and misc. objects. |
protected int[] |
getRGB(com.golden.gamedev.object.Sprite sprite)
This method is part of a workaround for the big performance-decrease on Linux
for the collision detection between ship and misc. objects. |
boolean |
isCollide(com.golden.gamedev.object.Sprite sprite1,
com.golden.gamedev.object.Sprite sprite2,
com.golden.gamedev.object.collision.CollisionShape shape1,
com.golden.gamedev.object.collision.CollisionShape shape2)
The pixel-perfect collision handling doesn't seem to work correctly
(e.g. for projectiles no collision is ever detected). |
Methods inherited from class com.golden.gamedev.object.collision.BasicCollisionGroup |
checkCollision, collided, getCollisionShape1, getCollisionShape2 |
Methods inherited from class com.golden.gamedev.object.CollisionManager |
getGroup1, getGroup2, getIntersectionRect, isActive, isPixelCollide, setActive, setCollisionGroup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMoaggCollisionGroup
public AbstractMoaggCollisionGroup()
isCollide
public boolean isCollide(com.golden.gamedev.object.Sprite sprite1,
com.golden.gamedev.object.Sprite sprite2,
com.golden.gamedev.object.collision.CollisionShape shape1,
com.golden.gamedev.object.collision.CollisionShape shape2)
- The pixel-perfect collision handling doesn't seem to work correctly
(e.g. for projectiles no collision is ever detected).
Thus I implemented isCollide() myself based on the old Moagg code.
- Overrides:
isCollide
in class com.golden.gamedev.object.collision.BasicCollisionGroup
getRGB
protected int[] getRGB(com.golden.gamedev.object.Sprite sprite)
- This method is part of a workaround for the big performance-decrease on Linux
for the collision detection between ship and misc. objects.
getRGB
protected int getRGB(java.awt.image.BufferedImage img,
int[] rgb,
int x,
int y)
- This method is part of a workaround for the big performance-decrease on Linux
for the collision detection between ship and misc. objects.
Copyright © 2008. All Rights Reserved.