Mercurial > hg > Database > Alice
view src/alice/test/topology/aquarium/SetLocation.java @ 170:6a69891b7232 working
change view point
author | sugi |
---|---|
date | Thu, 27 Dec 2012 14:38:42 +0900 |
parents | 0651fb36a369 |
children | 1b532146b355 |
line wrap: on
line source
package alice.test.topology.aquarium; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class SetLocation extends CodeSegment{ private Receiver position = ids.create(CommandType.PEEK); private MakeObject obj; private String key; int range; public SetLocation(MakeObject obj ,String key,int index,int range){ this.obj = obj; this.key = key; this.range = range; this.position.setKey("local",key,index); } @Override public void run(){ FishPoint fp = this.position.asClass(FishPoint.class); obj.setLocation(fp.getX(), fp.getY(), fp.getZ()); new SetLocation(this.obj, this.key, this.position.index, this.range); } }