void Awake() { boardGeneration = GetComponent <BoardGeneration>(); GameBoard = new BlockStruct[xSize, ySize]; boardGeneration.GenerateGameBoard(ref GameBoard, this); boardGeneration.VisualizeBlocks(GameBoard); prevSelected = null; }
private void Awake() { bg = new BoardGeneration(this); boardPieces = new GameObject[8, 8]; kings = new GameObject[2]; whiteList = new List <GameObject>(); blackList = new List <GameObject>(); tileList = new List <GameObject>(); }
void Start() { b = GameObject.FindGameObjectWithTag("GameController").GetComponent <BoardGeneration>(); moves = ""; backPressTimestamp = 0f; selectedHex = null; //im' sorry these are here, they're just to work around me not wanting to edit the scene while jake edits it itemTitleText.text = "Throne Room"; itemDescriptionText.text = "God save the queen."; }
// Use this for initialization void Start() { b = GameObject.FindGameObjectWithTag("GameController").GetComponent <BoardGeneration> (); cursor = cursorObject.GetComponent <Cursor> (); upgrades = new List <Upgrade> (); bees = usableBees = STARTING_BEES; pollen = STARTING_POLLEN; beeText.text = usableBees + " / " + bees; pollenText.text = "" + pollen; turnText.text = "Turn " + turn + " / " + TURN_COUNT; bPressTimeStamp = 0f; }
IEnumerator doTakeoffCutscene() { GameObject.FindGameObjectWithTag("Cursor").GetComponent <SpriteRenderer> ().enabled = false; GameObject.FindGameObjectWithTag("Cursor").GetComponent <Cursor> ().inhibitKeys = true; foreach (GameObject thing in GameObject.FindGameObjectsWithTag("LevelUI")) { thing.SetActive(false); } float time = 1.5f; Vector3 pos = camera.transform.position; pos.y += -10; //camera.scootTo (pos, time); camera.rotateTo(new Vector3(0, 0, 180), time); camera.zoomTo(30, time); yield return(new WaitForSeconds(time)); GameObject.FindGameObjectWithTag("Rocket").GetComponent <Animator> ().SetBool("BlazeIt", true); yield return(new WaitForSeconds(0.25f)); BoardGeneration bg = GameObject.FindGameObjectWithTag("GameController").GetComponent <BoardGeneration> (); bg.TakeOff(); yield return(new WaitForSeconds(2f)); camera.zoomTo(15, 0); GameObject space = GameObject.FindGameObjectWithTag("SpaceBG"); space.transform.position = boardContainer.transform.position; space.GetComponent <Scroller> ().StartScrolling(); camera.transform.position = new Vector3(boardContainer.transform.position.x + Mathf.FloorToInt(BoardGeneration.ROW_LENGTH / 2), boardContainer.transform.position.y - Mathf.FloorToInt(BoardGeneration.ROW_COUNT / 2), -10); camera.zoomTo(20, 30); yield return(new WaitForSeconds(1f)); resultText.text = gc.GetScoreDescription(); cutsceneUi.SetActive(true); cutsceneDone = true; }