us.asciiroth.client.core
Class AnimationProxy

java.lang.Object
  extended by us.asciiroth.client.core.AnimationProxy

public class AnimationProxy
extends java.lang.Object

A proxy for a piece at a given position, which introduces the state necessary to track the animation of pieces on the board.


Constructor Summary
AnimationProxy(int x, int y, Animated piece)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 void frame(Context ctx)
          Execute on animation frame, for the piece at this location.
 int hashCode()
           
 boolean proxyFor(int x, int y, java.lang.Object piece)
          Test if this proxy is for a piece instance at the given location.
 void setXY(int x, int y)
          Set the X/Y position of this proxy (an optimization so that animated pieces can be moved without destroying and creating a proxy).
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationProxy

public AnimationProxy(int x,
                      int y,
                      Animated piece)
Constructor.

Parameters:
x -
y -
piece -
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

frame

public void frame(Context ctx)
Execute on animation frame, for the piece at this location.

Parameters:
ctx -

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

proxyFor

public boolean proxyFor(int x,
                        int y,
                        java.lang.Object piece)
Test if this proxy is for a piece instance at the given location. (What if there are multiple instances at the given location?)

Parameters:
x - x position of the piece
y - y position of the piece
piece - a piece that is animated
Returns:
true if this is the proxy for the piece

setXY

public void setXY(int x,
                  int y)
Set the X/Y position of this proxy (an optimization so that animated pieces can be moved without destroying and creating a proxy).

Parameters:
x - the new X position of the animation
y - the new Y position of the animation

0.7

2009 Alx Dark