public override void execute() { ComponentOwner obj = mReceiver as ComponentOwner; TransformableComponentRotateFixed component = obj.getComponent(out component); // 停止其他旋转组件 obj.breakComponent <IComponentModifyRotation>(component.GetType()); component.setActive(mActive); component.setFixedEuler(mFixedEuler); }
public override void execute() { Transformable obj = mReceiver as Transformable; TransformableComponentRotateFixed component = obj.getComponent(out component); // 停止其他旋转组件 obj.breakComponent <IComponentModifyRotation>(component.GetType()); component.setActive(mActive); component.setFixedEuler(mFixedEuler); // 需要启用组件更新时,则开启组件拥有者的更新,后续也不会再关闭 obj.setEnable(true); }