示例#1
0
    private void CollisionEnded(object sender, PointerEventArgs e)
    {
        if (e.target.GetComponent <Point>() != null)
        {
            inPointCollision = false;
        }

        else if (e.target.GetComponent <ScaleButton>() != null)
        {
            scaleButton = null;
        }

        else if (e.target.GetComponent <AxisButton>() != null)
        {
            axisButton = null;
        }

        else if (e.target.GetComponent <InvertAxisButton>() != null)
        {
            invertAxisButton = null;
        }
    }
示例#2
0
    private void Collision(object sender, PointerEventArgs e)
    {
        if (e.target.GetComponent <Point>() != null)
        {
            inPointCollision = true;
            selectedPoint    = e.target.GetComponent <Point>();
        }

        else if (e.target.GetComponent <ScaleButton>() != null)
        {
            scaleButton = e.target.GetComponent <ScaleButton>();
        }

        else if (e.target.GetComponent <AxisButton>() != null)
        {
            axisButton = e.target.GetComponent <AxisButton>();
        }

        else if (e.target.GetComponent <InvertAxisButton>() != null)
        {
            invertAxisButton = e.target.GetComponent <InvertAxisButton>();
        }
    }