示例#1
0
        void DoMultiScale(float multiplier)
        {
            if (multiplier < 0)
            {
                return;
            }
            //中心点位置
            Transform pivot = AdvancedBlockEditor.Instance.ToolTransform;

            for (int i = 0; i < this.originalSelection.Count; i++)
            {
                BlockBehaviour bb = this.originalSelection[i] as BlockBehaviour;
                bb.SetPosition((Machine.Active().BuildingMachine.TransformPoint(originalPositions[i]) - pivot.position) * multiplier + pivot.position);
                bb.SetScale(originalScales[i] * multiplier);
            }
        }