예제 #1
0
    public void HandleTriggerTouch(object sender, ClickedEventArgs e)
    //public void HandleTriggerTouch(GameObject sender)
    {
//		if(m_inSelfScalingMode && otherController.InSelfScalingSupportMode)
//		{
//			ScaleSelf (player);
//		}

        if (!inUse)
        {
            return;
        }

        if (m_CurrentInteractible)
        {
            m_CurrentInteractible.Touch(gameObject);
        }

        if (inStretchMode)
        {
            // check if the object is still be grabbed
            if (!m_CurrentInteractible.IsGrabbing)
            {
                //if not, exit stretch mode
                ExitStretchMode();
            }
            else
            {
                if (stretchObj != null)
                {
                    ScaleAroundPoint(stretchObj);
                }
            }
        }
    }
예제 #2
0
파일: Pump.cs 프로젝트: jhclaura/ooni-tool
    public void HandleTriggerTouch(object sender, ClickedEventArgs e)
    {
        if (!inUse)
        {
            return;
        }

        if (m_CurrentInteractible)
        {
            m_CurrentInteractible.Touch(gameObject);
        }

        if (inStretchMode)
        {
            // TODO: what if the object stop being be grabbed???
            // if(!m_CurrentInteractible.IsGrabbing)

            if (stretchObj != null)
            {
                ScaleAroundPoint(stretchObj);
            }
        }
    }