public void Assembling_Draft()
    {
        SendDestroyMessage();
        GameObject elem_prefab = Resources.Load("Elements/DraftElement") as GameObject;

        Transform Plate = Instantiate((Resources.Load("Elements/DraftPlate") as GameObject).transform,
                                      new Vector3(PP.Width / 2, -0.5f, PP.Height / 2), Quaternion.identity) as Transform;

        NewPlate(Plate);

        Transform Elem;

        for (int i = 0; i < DataStorage.N; i++)
        {
            CircuitElement t = DataStorage.cm[i];
            Elem = Instantiate(elem_prefab.transform) as Transform;

            Elem.Find("Scale").transform.localScale = new Vector3(t.Width - 3, t.Height - 3, 1);

            Elem.parent = Rotator;

            Elem.localPosition = new Vector3(t.x + t.Width / 2, t.y + t.Height / 2, 0);

            Elem.localEulerAngles = Vector3.zero;

            Elem.gameObject.name = i.ToString();
            Elem.Find("Label").GetComponent <TextMesh>().text = DataStorage.cm[i].Name;
        }

        HiResScreenShots.TakeHiResShot(new Vector3(PP.Width / 2, PP.Height / 2));
        SaveButton.interactable = false;
    }
Exemplo n.º 2
0
 public void TakeScreenshot(string fileName)
 {
     screenshotter.TakeHiResShot(fileName);
 }