public static LineController createInstance(string name, LineMeshTypeInt lineMeshType, Transform parentTransform)
    {
        GameObject go = new GameObject(name);

        go.transform.parent = parentTransform;
        LineController lc = go.AddComponent <LineController> ();

        lc.initialize(lineMeshType, PropertiesSingleton.getLineRendererMaterial());
        return(lc);
    }
Exemplo n.º 2
0
    public void onMouseEnter()
    {
        Screen.showCursor = false;
        if (material == null)
        {
            material = PropertiesSingleton.getLineRendererMaterial();
        }
        material.mainTexture = tool.pointerTexture;
        if (mesh == null)
        {
            mesh = MeshUtil.createPlaneMesh(material.mainTexture.width, material.mainTexture.height);
        }
        if (maskMesh == null)
        {
            maskMesh = MeshUtil.createPlaneMesh(tool.pointerMaskTexture.width, tool.pointerMaskTexture.height);
        }
        PropertiesSingleton.instance.cursors.cursorMaskMaterial.mainTexture = tool.pointerMaskTexture;
        drawCursor     = true;
        material.color = PropertiesSingleton.instance.colorProperties.activeColor;

        WorkspaceEventManager.instance.onMouseEnterScrollbar += onScrollBarEnterListener;
        WorkspaceEventManager.instance.onMouseExitScrollbar  += onScrollBarExitListener;
    }
 public void setPoint(IntVector2 point)
 {
     drawMesh = true;
     mesh     = lineMeshType.GetPointMesh(point, mat.mainTexture.width, mat.mainTexture.height);
     mat      = PropertiesSingleton.getLineRendererMaterial();
 }