// Start is called before the first frame update void Awake() { this.plusPoint = GameObject.Find("PlusPoint"); this.minusPoint = GameObject.Find("MinusPoint"); this.InstantiatePoints(); this.floorSpawner = GameObject.Find("FloorSpawner").GetComponent <FloorSpawner>(); this.playerTransform = GameObject.Find("Player").transform; this.initialPosition = transform.position; }
IEnumerator IncreaseSpeed() { while (true) { speedX *= 1.01f; FloorSpawner.setSpeed(speedX); yield return(new WaitForSeconds(1)); } }
// Start is called before the first frame update public void Awake() { this.floorSpawner = GameObject.Find("FloorSpawner").GetComponent <FloorSpawner>(); this.barkSounds.Add(GameObject.Find("cub_bark_1")); this.barkSounds.Add(GameObject.Find("cub_bark_2")); this.barkSounds.Add(GameObject.Find("cub_bark_3")); this.eatNegativeSound = GameObject.Find("cub_eat_chili"); this.eatPositiveSound = GameObject.Find("cub_eat_candy"); this.initialPosition = transform.position; this.nextFloorPosition = new Vector3(0, -1000, 1000); }
public void generateRoom() { FloorOverseer newFloorOverseer = Instantiate(leOverseer, new Vector3(0, 0, 0), Quaternion.identity); newFloorOverseer.maxSize = maxTiles; FloorSpawner newFloorSpawner = Instantiate(leFloorSpawner, new Vector3(0, 0, 0), Quaternion.identity); newFloorSpawner.roomStyle = roomStyles; newFloorSpawner.canSpawnMoreFS = true; newFloorOverseer.pathMakers.Add(newFloorSpawner.transform); playButton.gameObject.SetActive(false); maxTileSlider.gameObject.SetActive(false); roomStylesSlider.gameObject.SetActive(false); maxTilesText.gameObject.SetActive(false); roomStylesText.gameObject.SetActive(false); }
// Start is called before the first frame update void Awake() { this.winScreen = GameObject.Find("WinScreen"); this.loseScreen = GameObject.Find("LoseScreen"); this.introCanvas = GameObject.Find("IntroCanvas"); this.winScreen.SetActive(false); this.loseScreen.SetActive(false); this.cub = GameObject.Find("Cub").GetComponent <Cub>(); this.floorSpawner = GameObject.Find("FloorSpawner").GetComponent <FloorSpawner>(); this.player = GameObject.Find("Player").GetComponent <PlayerController>(); this.pointSpawner = GameObject.Find("PointSpawner").GetComponent <PointSpawner>(); this.camera = GameObject.Find("Main Camera").GetComponent <Camera>(); this.gameOverSound = GameObject.Find("game_over"); this.gameWonSound = GameObject.Find("game_won"); this.backgroundMusic = GameObject.Find("Audio Source"); }
private void Start() { flSpawn = flr.GetComponent <FloorSpawner>(); }
// Start is called before the first frame update void Start() { FloorSpawner = FindObjectOfType <FloorSpawner>(); StartCoroutine(StartSequence()); }