From 2e7fd002146fe0adabdb41aa3f77d189f03e49b3 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 17 Sep 2002 20:06:58 +0000 Subject: [PATCH] Added setLocation() and reset(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1694 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/media/animation/Animation.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/animation/Animation.java b/src/java/com/threerings/media/animation/Animation.java index 71d0b9ac0..5aea759f3 100644 --- a/src/java/com/threerings/media/animation/Animation.java +++ b/src/java/com/threerings/media/animation/Animation.java @@ -1,5 +1,5 @@ // -// $Id: Animation.java,v 1.6 2002/04/25 16:23:30 mdb Exp $ +// $Id: Animation.java,v 1.7 2002/09/17 20:06:58 mdb Exp $ package com.threerings.media.animation; @@ -48,6 +48,15 @@ public abstract class Animation _renderOrder = value; } + /** + * Sets the location at which this animation will be rendered. + */ + public void setLocation (int x, int y) + { + _bounds.x = x; + _bounds.y = y; + } + /** * Returns a rectangle containing all pixels rendered by this * animation. @@ -94,6 +103,15 @@ public abstract class Animation return _finished; } + /** + * If this animation has run to completion, it can be reset to prepare + * it for another go. + */ + public void reset () + { + _finished = false; + } + /** * Invalidates the bounds of this animation. */