Mercurial > hg > Database > Alice
comparison src/main/java/alice/test/topology/aquarium/SetLocation.java @ 345:8f71c3e6f11d
Change directory structure Maven standard
author | sugi |
---|---|
date | Wed, 16 Apr 2014 18:26:07 +0900 |
parents | |
children | aefbe41fcf12 |
comparison
equal
deleted
inserted
replaced
344:9f97ec18f8c5 | 345:8f71c3e6f11d |
---|---|
1 package alice.test.topology.aquarium; | |
2 | |
3 import alice.codesegment.CodeSegment; | |
4 import alice.datasegment.CommandType; | |
5 import alice.datasegment.Receiver; | |
6 | |
7 | |
8 public class SetLocation extends CodeSegment{ | |
9 | |
10 private Receiver position = ids.create(CommandType.PEEK); | |
11 private MakeObject obj; | |
12 | |
13 public SetLocation(MakeObject obj ,String key, int index){ | |
14 this.obj = obj; | |
15 this.position.setKey(key,index); | |
16 } | |
17 | |
18 @Override | |
19 public void run(){ | |
20 FishPoint fp = this.position.asClass(FishPoint.class); | |
21 obj.setLocation(fp.getX(), fp.getY(), fp.getZ()); | |
22 new SetLocation(obj, position.key, position.index); | |
23 | |
24 } | |
25 | |
26 | |
27 } |