Esempio n. 1
0
 void Start()
 {
     towersInteract.enabled   = false;
     lightpuzzleScript        = GetComponentInParent <LightPuzzle>();
     incorrectmessage.enabled = false;
     bookTextDisplay.enabled  = false;
     close.gameObject.SetActive(false);
     closeText.enabled          = false;
     terminalBackground.enabled = false;
     terminalText.enabled       = false;
     group = canvas.GetComponent <CanvasGroup>();
 }
    //Creates a lightPuzzle at the given position with the given number of nodes, and makes it a child
    public LightPuzzle newPuzzle(Vector2 pos, int nodeCount, Transform t)
    {
        GameObject  g  = Object.Instantiate(this.lightPuzzlePrefab);
        LightPuzzle lp = g.GetComponent <LightPuzzle>();

        g.transform.SetParent(t);
        g.transform.localEulerAngles = new Vector3(0, 0, 0);
        g.transform.localScale       = new Vector3(1, 1, 1);
        lp.setLocalPos(pos);
        lp.initPuzzle(nodeCount);
        return(lp);
    }