comparison src/alice/test/topology/aquarium/SetLocation.java @ 178:1b532146b355 working

minor change
author e095732
date Sun, 03 Feb 2013 18:20:46 +0900
parents 6a69891b7232
children b5daccf36104
comparison
equal deleted inserted replaced
177:4a6412b9d9aa 178:1b532146b355
7 7
8 public class SetLocation extends CodeSegment{ 8 public class SetLocation extends CodeSegment{
9 9
10 private Receiver position = ids.create(CommandType.PEEK); 10 private Receiver position = ids.create(CommandType.PEEK);
11 private MakeObject obj; 11 private MakeObject obj;
12 private String key; 12 private int range; // should be DS
13 int range;
14 13
15 public SetLocation(MakeObject obj ,String key,int index,int range){ 14 public SetLocation(MakeObject obj ,String key, int index, int range){
16 this.obj = obj; 15 this.obj = obj;
17 this.key = key;
18 this.range = range; 16 this.range = range;
19 this.position.setKey("local",key,index); 17 this.position.setKey("local",key,index);
20 } 18 }
21 19
22 @Override 20 @Override
23 public void run(){ 21 public void run(){
24 FishPoint fp = this.position.asClass(FishPoint.class); 22 FishPoint fp = this.position.asClass(FishPoint.class);
25 obj.setLocation(fp.getX(), fp.getY(), fp.getZ()); 23 obj.setLocation(fp.getX(), fp.getY(), fp.getZ());
26 new SetLocation(this.obj, this.key, this.position.index, this.range); 24 new SetLocation(obj, position.key, position.index, range);
27 25
28 } 26 }
29 27
30 28
31 } 29 }