// Initialization private void Start() { questionText = this.gameObject.GetComponentInChildren <Text>(); generatorClick = this.gameObject.GetComponent <ClickOnGenerator>(); kotoTowerClick = GameObject.FindGameObjectWithTag("Koto Tower").GetComponent <ClickOnKotoTower>(); isStartTiming = false; timer = 0; }
// Drawing all possible grid to place trap private void Start() { kotoTower = GameObject.FindGameObjectWithTag("Koto Tower").GetComponent <ClickOnKotoTower>(); generator = GameObject.FindGameObjectWithTag("Generator").GetComponent <ClickOnGenerator>(); foreach (ButtonChangeColor button in buttons) { button.disable(); } StartCoroutine(lateDraw(0.3f)); }
// initialization private void Start() { GameEvents.current.onTowerOrTrapBuild += cancel; buttons = this.gameObject.GetComponentsInChildren <Button>(); rect = this.gameObject.GetComponent <RectTransform>(); moveUiComp = this.gameObject.GetComponent <MoveUIComponent>(); kotoTower = GameObject.FindGameObjectWithTag("Koto Tower").GetComponent <ClickOnKotoTower>(); generator = GameObject.FindGameObjectWithTag("Generator").GetComponent <ClickOnGenerator>(); this.gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { rectTransform = this.GetComponent <RectTransform>(); maxX = rectTransform.rect.width; maxY = rectTransform.rect.height; generatorClick = this.gameObject.GetComponentInParent <ClickOnGenerator>(); kotoTowerClick = this.gameObject.GetComponentInParent <ClickOnKotoTower>(); //event GameEvents.current.onCloseKotoTowerBalloonBox += OnCloseKotoTowerBalloonBox; GameEvents.current.onOpenKotoTowerBalloonBox += OnOpenKotoTowerBalloonBox; GameEvents.current.onCloseGeneratorBalloonBox += OnCloseGeneratorBalloonBox; GameEvents.current.onOpenGeneratorBalloonBox += OnOpenGeneratorBalloonBox; }
// initialization private void Start() { kotoTower = GameObject.FindGameObjectWithTag("Koto Tower").GetComponent <ClickOnKotoTower>(); generator = GameObject.FindGameObjectWithTag("Generator").GetComponent <ClickOnGenerator>(); }