示例#1
0
    public void OnGrabStop()
    {
        Bounds curBound = m_targetTrans.GetComponent <MeshFilter>().sharedMesh.bounds; // or just mesh?

        transform.position = m_targetTrans.position + _dirInt * _scaleDir * (m_targetTrans.localScale[_coord] * curBound.size[_coord] / 2 + FoamUtils.ScaleTabOffset);
        transform.rotation = _initRot;

        //_parent.UpdateTabsLocation(curBound, _index);
        _isBeingGrabbed = false;

        // undo redo
        Debug.Log("Scaling added to stack");
        if (_targetPrevPos != m_targetTrans.position && _targetPrevScale != m_targetTrans.localScale)
        {
            ICommand scaleAction = new CommandScale(m_targetTrans.gameObject, _targetPrevScale, _targetPrevPos, m_targetTrans.localScale, m_targetTrans.position);
            UndoRedoManager.AddNewAction(scaleAction);
        }
    }
示例#2
0
 public void ScaleVec(double time, CommandScale scale) => ScaleVec(OsbEasing.None, time, time, scale, scale);
示例#3
0
 public void ScaleVec(double startTime, double endTime, CommandScale startScale, double endX, double endY) => ScaleVec(OsbEasing.None, startTime, endTime, startScale, endX, endY);
示例#4
0
 public void ScaleVec(OsbEasing easing, double startTime, double endTime, CommandScale startScale, double endX, double endY) => ScaleVec(easing, startTime, endTime, startScale, new CommandScale(endX, endY));
示例#5
0
 public void ScaleVec(OsbEasing easing, double startTime, double endTime, CommandScale startScale, CommandScale endScale) => addCommand(new VScaleCommand(easing, startTime, endTime, startScale, endScale));