package sprite; import java.util.*; import matrix.*; public class Sprite extends BaseItem implements SpriteInter { SpriteInter parent; Vector child; Vector mat; public Sprite() { this.parent = null; child = new Vector(); mat = new Vector(); } public Sprite(SpriteInter parent) { this.parent = parent; child = new Vector(); mat = new Vector(); } public SpriteInter Parent() { return parent; } public void init() { ; } public void addBaseItem(BaseItem base) { if(child == null){child= new Vector(); System.out.println("NULL: Check Sprite addBaseItem");} child.add(base); } public void addMatrix(Matrix mat) { this.mat.add(mat); System.out.println("Sprite add "+this.mat.size()); } public void explore(SpriteEventItem ev) { ev.x +=this.x; ev.y +=this.y; if(mat!= null && mat.size()>0) { System.out.println("sdf"); ev.addAllMatrix(this.mat); } BaseItem base; for(int i=0;i