Ejemplo n.º 1
0
 void Awake()
 {
     if (drawLineScript == null)
     {
         // DontDestroyOnLoad(gameObject);
         drawLineScript = this;
     }
     else if (drawLineScript != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
    //GameObject pen;
    //public GameObject penFab;

    // Use this for initialization
    void Start()
    {
        data    = GameObject.Find("Data");
        ds      = data.GetComponent <DataScript> ();
        mainCam = Camera.main;
        cam     = Camera.main.GetComponent <Camera>();
        cam.orthographicSize = 15.0f;
        egg         = GameObject.Find("egg");
        eggMovement = egg.GetComponent <EggMovement>();
        drawLineObj = GameObject.Find("Pen");
        dls         = drawLineObj.GetComponent <DrawLineScript> ();
    }