Example #1
0
 void Awake()
 {
     tech      = FindObjectOfType <Scr_Tech>();
     num       = FindObjectOfType <Scr_Num>();
     events    = FindObjectOfType <Scr_Event>();
     time      = FindObjectOfType <Scr_TimeControl>();
     provinces = FindObjectOfType <Scr_Color>();
 }
Example #2
0
 void OnEnable()
 {
     Tech      = FindObjectOfType <Scr_Tech>();
     Time      = FindObjectOfType <Scr_TimeControl>();
     Events    = FindObjectOfType <Scr_Event>();
     Statistic = FindObjectOfType <Scr_Statistic>();
     UpGradePage.SetActive(false);
     PressPage1.SetActive(true);
     PressPage2.SetActive(false);
     PressPage3.SetActive(false);
 }
Example #3
0
 void Start()
 {
     Time      = FindObjectOfType <Scr_TimeControl>();
     Provinces = FindObjectOfType <Scr_Color>();
     Events    = FindObjectOfType <Scr_Event>();
     Num       = FindObjectOfType <Scr_Num>();
     Tech      = FindObjectOfType <Scr_Tech>();
     News      = FindObjectOfType <Scr_News>();
     Statistic = FindObjectOfType <Scr_Statistic>();
     BlackG.SetActive(false);
 }
Example #4
0
    void Start()
    {
        SceneT.SetActive(true);
        Scene0.SetActive(true);
        Scene1.SetActive(false);
        Scene2.SetActive(false);
        Scene3.SetActive(false);
        string path = "EventPictures/CG/OP/" + ((int)Random.Range(1, 1)).ToString();

        CG.GetComponent <Image>().sprite = Resources.Load(path, typeof(Sprite)) as Sprite;
        //CG.GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width, Screen.height);

        Provinces = FindObjectOfType <Scr_Color>();
        Events    = FindObjectOfType <Scr_Event>();
        Tech      = FindObjectOfType <Scr_Tech>();
        //调整分辨率(还是有问题)
        //CG.GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width, Screen.height);
        //BlackG.GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width, Screen.height);
    }
Example #5
0
 void Awake()
 {
     Tech   = FindObjectOfType <Scr_Tech>();
     Value  = FindObjectOfType <Scr_Num>();
     isLock = true;
 }