void HandleTouch() { if (Input.touchCount > 0) { Touch touch = Input.GetTouch(0); if (touch.phase == TouchPhase.Began) { Vector3 spawnPoint = mainCamera.ScreenToWorldPoint(new Vector3(touch.position.x, touch.position.y, cameraToCeiling - spawnOffset)) - worldOffset; spawnPoint.y = wallHeight - spawnOffset; DiceController.SpawnDices("1d6", "d6-" + randomColor + "-dots", spawnPoint, mainWrapper); } } }
void SpawnSample() { Vector3 spawnPoint = new Vector3(0, wallHeight - spawnOffset, 0); DiceController.SpawnDices("1d6", "d6-" + randomColor + "-dots", spawnPoint, mainWrapper); }