view src/alice/test/topology/aquarium/SetLocation.java @ 262:ba55adb8a042

fixed bug
author sugi
date Tue, 23 Jul 2013 14:13:14 +0900
parents b5c642ba998e
children
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;
	
	public SetLocation(MakeObject obj ,String key, int index){
		this.obj = obj;
		this.position.setKey(key,index);
	}
	
	@Override
	public void run(){
		FishPoint fp = this.position.asClass(FishPoint.class);
		obj.setLocation(fp.getX(), fp.getY(), fp.getZ());
		new SetLocation(obj, position.key, position.index);
					
	}
	

}