コード例 #1
0
    public override void execute()
    {
        ComponentOwner obj = mReceiver as ComponentOwner;
        TransformableComponentLerpRotation component = obj.getComponent(out component);

        // 停止其他旋转组件
        obj.breakComponent <IComponentModifyRotation>(component.GetType());
        component.setLerpingCallback(mLerpingCallBack);
        component.setLerpDoneCallback(mLerpDoneCallBack);
        component.setActive(true);
        component.setTargetRotation(mTargetRotation);
        component.setLerpSpeed(mLerpSpeed);
        component.play();
    }
コード例 #2
0
    public override void execute()
    {
        Transformable obj = mReceiver as Transformable;
        TransformableComponentLerpRotation component = obj.getComponent(out component);

        // 停止其他旋转组件
        obj.breakComponent <IComponentModifyRotation>(component.GetType());
        component.setLerpingCallback(mLerpingCallBack);
        component.setLerpDoneCallback(mLerpDoneCallBack);
        component.setActive(true);
        component.setTargetRotation(mTargetRotation);
        component.setLerpSpeed(mLerpSpeed);
        component.play();
        if (component.getState() == PLAY_STATE.PS_PLAY)
        {
            // 需要启用组件更新时,则开启组件拥有者的更新,后续也不会再关闭
            obj.setEnable(true);
        }
    }