Exemplo n.º 1
0
    public void paintAllShapesToPaintSurfaceEditor()
    {
        // Retrieve all Shapes from Level
        GameObject[] allPlayerShapes = GameObject.FindGameObjectsWithTag("Player");

        Debug.Log("allPlayerShapes " + allPlayerShapes);
        Debug.Log("allPlayerShapes length " + allPlayerShapes.Length);

        foreach (GameObject child in allPlayerShapes)
        {
            Debug.Log("foreach");
            PaintTrail childPaintTrailScript = child.GetComponent <PaintTrail>();

            if (child.activeSelf && childPaintTrailScript)
            {
                Debug.Log("activeSelf");
                childPaintTrailScript.instantiatePaintSurfaceElement(paintSurfaceContainer);
            }
        }
    }
Exemplo n.º 2
0
 public void instantiatePaintSurface(GameObject container)
 {
     paintTrailScript.instantiatePaintSurfaceElement(container);
 }