blob: defb1a6d86bedac0f0ec875380198d4383866d3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package gjt.animation;
import java.awt.Dimension;
import java.awt.Insets;
import java.util.Vector;
import gjt.Orientation;
/**
* A CollisionArena is defined as an arena in which collisions
* may take place.<p>
*
* CollisionArenas must be able to report their size and
* insets, and return a Vector of the Sprites contained in the
* arena.<p>
*
* CollisionArenas must also implement two methods for handling
* sprite and edge collisions, respectively.
*
* @version 1.0, Apr 1 1996
* @author David Geary
* @see Playfield
* @see CollisionDetector
* @see EdgeCollisionDetector
* @see SpriteCollisionDetector
* @see gjt.test.SimpleAnimationTest
* @see gjt.test.BumpAnimationTest
* @see gjt.test.TwoDrinkersAnimationTest
*/
public interface CollisionArena {
abstract public Vector getSprites();
abstract public Dimension getSize ();
abstract public Insets getInsets ();
abstract public void spriteCollision(Sprite sprite,
Sprite other);
abstract public void edgeCollision(Sprite sprite,
Orientation orient);
}
|