Added the ability to add translations on a per-component-instance basis.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@160 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -48,13 +48,13 @@ public class CompositedActionFrames
|
||||
|
||||
public ComponentFrames () {
|
||||
}
|
||||
|
||||
|
||||
public ComponentFrames (
|
||||
CharacterComponent ccomp, ActionFrames frames) {
|
||||
this.ccomp = ccomp;
|
||||
this.frames = frames;
|
||||
}
|
||||
|
||||
|
||||
public String toString () {
|
||||
return ccomp + ":" + frames;
|
||||
}
|
||||
@@ -127,6 +127,17 @@ public class CompositedActionFrames
|
||||
throw new RuntimeException("What you talkin' about Willis?");
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
public ActionFrames cloneTranslated (int dx, int dy)
|
||||
{
|
||||
ComponentFrames[] tsources = new ComponentFrames[_sources.length];
|
||||
for (int ii = 0; ii < _sources.length; ii++) {
|
||||
tsources[ii] = new ComponentFrames(
|
||||
_sources[ii].ccomp, _sources[ii].frames.cloneTranslated(dx, dy));
|
||||
}
|
||||
return new CompositedActionFrames(_imgr, _frameCache, _action, tsources);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates our underlying multi-frame image for a particular orientation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user