private void Awake() { fogCamera = FindObjectOfType <FogCamera>(); systemUI = FindObjectOfType <SystemUI>(); speedUI = FindObjectOfType <SpeedUI>(); hud = FindObjectOfType <HUD>(); }
void Awake() { _instance = this; tween = this.GetComponent <TweenPosition>(); audioButton = transform.Find("AudioButton").GetComponent <UIButton>(); audioLabel = transform.Find("AudioLabel").GetComponent <UILabel>(); }
/// <summary> /// Awake is called when the script instance is being loaded. /// </summary> void Awake() { _GM = FindObjectOfType <GameManager>(); SUI = GetComponentInParent <SystemUI>(); CharacterSpace = GameObject.Find("Others").transform; Pos *= Random.Range(0, 2) == 0 ? -1 : 1; }
private void Awake() { _instance = this; tween = this.GetComponent<TweenPosition>(); audioButton = transform.Find("AudioButton").GetComponent<UIButton>(); audioLabel = transform.Find("AudioLabel").GetComponent<UILabel>(); }
private void Awake() { hud = FindObjectOfType <HUD>(); systemUI = FindObjectOfType <SystemUI>(); agentUI = FindObjectOfType <AgentUI>(); player = GetComponent <Player>(); }
void Awake() { _instance = this; doTween = this.GetComponent <DOTweenAnimation>(); audioImage = transform.Find("AudioImage").GetComponent <Image>(); audioText = transform.Find("AudioText").GetComponent <Text>(); audioSource = this.GetComponent <AudioSource>(); }
private void Awake() { systemUI = FindObjectOfType <SystemUI>(); agentUI = FindObjectOfType <AgentUI>(); playerBaseUI = FindObjectOfType <PlayerBaseUI>(); selectionUI.Add(systemUI.gameObject); selectionUI.Add(agentUI.gameObject); selectionUI.Add(playerBaseUI.gameObject); }
private void InitSystemUI() { var asset = ResourceManager.LoadAsset("GameSystemUI"); var go = Instantiate(asset); if (go == null) { return; } GameSystemUI = go.GetComponent <SystemUI>(); var centerView = GameSystemUI.CenterView; centerView.UpdateBoundEvent += UpdateBound; PondTs.parent = centerView.transform; PondTs.localPosition = new Vector3(0, 0, 40); }
private void Awake() { piecePrefabDict = new Dictionary <CodeType, GameObject>(); SystemUIComponent = GetComponent <SystemUI>(); gameOverComponent = GetComponent <GameOver>(); gameOverComponent.initGameOver(60, this); //初始化网格大小 gridCodes = new CodePrefab[Grid_H, Grid_V]; //初始化预制体对象 for (int i = 0; i < NomalCodes.Length; i++) { if (!piecePrefabDict.ContainsKey(NomalCodes[i].type)) { piecePrefabDict.Add(NomalCodes[i].type, NomalCodes[i].codePrefab); } } }
private void Awake() { systemUI = FindObjectOfType <SystemUI>(); }
private void Awake() { systemUI = FindObjectOfType <SystemUI>(); buttons = new List <BuildingOptionButton>(GetComponentsInChildren <BuildingOptionButton>()); }