演员的动作在运行时不是动态的吗?

时间:2017-10-08 03:49:36

标签: java libgdx

我有一组演员,他们互相依赖。但这个动作能否获得演员的最新职位?

以下是我用于演员的部分代码

for(int i=0 ; i<symbolFrames.length; i++){

    nextSymbolIndex=nextSymbol(i);//get the index of next symbol
    moveByOneFrame=Actions.moveBy(0,stopFrames[0].getRectangle().height,spinSpeed);


    resetFrame=Actions.moveTo(
            stopFrames[0].getRectangle().x,
            symbolFrames[nextSymbol(i)].getRectangle().y-symbolFrames[nextSymbol(i)].getRectangle().height
    );//here is the action that will get the position of another Actor.

    chain=new SequenceAction(
                Actions.repeat((symbolFrames.length-i),moveByOneFrame),//move by frame depend on its position
                Actions.forever(
                        Actions.sequence(
                                Actions.repeat(1,resetFrame)
                                ,Actions.repeat((symbolFrames.length),moveByOneFrame))//moveByOneFrame
                        )//repeat the movement unless stop is called
                );

    symbolFrames[i].addAction(chain);

}//this whole code is running outside of render loop

该动作是否能够获得其他actor的运行时值?如果不是,无论如何都要实现这个目标吗?

0 个答案:

没有答案