view src/main/java/alice/test/topology/aquarium/SetLocation.java @ 419:aefbe41fcf12 dispose

change tab to space
author sugi
date Tue, 15 Jul 2014 16:00:22 +0900
parents 8f71c3e6f11d
children e91a574b69de
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);

    }


}