// Use this for initialization void Start() { player = this.gameObject; trans = player.transform; //head = GameObject.Find("Head").transform; rigbody = GetComponent <Rigidbody>(); rigbody.useGravity = false; rigbody.freezeRotation = true; cam = Camera.main; wM = GameObject.Find("WorldManager").GetComponent <WorldManager>(); aW = wM.activeWorld; trans.position = aW.tiles[spawnTile].hexagon.center; origin = new Vector3(aW.origin.x, aW.origin.y, aW.origin.z); animator = player.GetComponent <Animator>(); animator.enabled = true; animator.Play("Idle"); //runebook test byte[] b = new byte[32]; for (int i = 0; i < 32; i++) { b[i] = (byte)Random.Range(0, 256); } runeBook = new Runebook(b); GameObject runebook = Instantiate(runeBook.RunebookGO()); /* * Transform runebookTrans = runebook.transform; * runebookTrans.parent = cam.transform; * runebookTrans.position = cam.transform.position + cam.transform.forward; * runebookTrans.LookAt(cam.transform); */ /* * foreach(Rune r in runeBook.runes) * { * Instantiate(r.RuneGO()); * } */ }