示例#1
0
 private void Awake()
 {
     fogCamera = FindObjectOfType <FogCamera>();
     systemUI  = FindObjectOfType <SystemUI>();
     speedUI   = FindObjectOfType <SpeedUI>();
     hud       = FindObjectOfType <HUD>();
 }
示例#2
0
 void Awake()
 {
     _instance   = this;
     tween       = this.GetComponent <TweenPosition>();
     audioButton = transform.Find("AudioButton").GetComponent <UIButton>();
     audioLabel  = transform.Find("AudioLabel").GetComponent <UILabel>();
 }
示例#3
0
 /// <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;
 }
示例#4
0
文件: SystemUI.cs 项目: vin120/TaiDou
 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>();
 }
示例#6
0
 void Awake()
 {
     _instance   = this;
     doTween     = this.GetComponent <DOTweenAnimation>();
     audioImage  = transform.Find("AudioImage").GetComponent <Image>();
     audioText   = transform.Find("AudioText").GetComponent <Text>();
     audioSource = this.GetComponent <AudioSource>();
 }
示例#7
0
 private void Awake()
 {
     systemUI     = FindObjectOfType <SystemUI>();
     agentUI      = FindObjectOfType <AgentUI>();
     playerBaseUI = FindObjectOfType <PlayerBaseUI>();
     selectionUI.Add(systemUI.gameObject);
     selectionUI.Add(agentUI.gameObject);
     selectionUI.Add(playerBaseUI.gameObject);
 }
示例#8
0
        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);
        }
示例#9
0
    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>();
 }
示例#11
0
 private void Awake()
 {
     systemUI = FindObjectOfType <SystemUI>();
     buttons  = new List <BuildingOptionButton>(GetComponentsInChildren <BuildingOptionButton>());
 }