void Awake() { instance = this; #if UNITY_EDITOR || UNITY_STANDALONE return; #endif InitAdmob(); }
public override void OnSet(object data) { base.OnSet(data); count = 0; GameObject temp = GameObject.Find(Config.GAMEOBJECT_TEMP); GameObject gridList = GameObject.Find(Config.GAMEOBJECT_GRIDLIST); listGObj = new List <GameObject> (); for (int i = 0; i < mainData.Count; i++) { GameObject gObj = Instantiate(temp, new Vector3(0, 0, 0), Quaternion.identity) as GameObject; gObj.transform.parent = gridList.transform; gObj.transform.localScale = new Vector3(1f, 1f, 1f); gObj.transform.localPosition = new Vector3(i * 100, 0, 0); gObj.name = mainData [i].id.ToString(); UIButton uIButton = gObj.GetComponent <UIButton> (); uIButton.defaultColor = color [i % color.Length]; uIButton.hover = color [i % color.Length]; Logic.GetChildObject(gObj, Config.GAMEOBJECT_LABEL).GetComponent <UILabel> ().text = mainData [i].name; listGObj.Add(gObj); } normalS = new Vector3(1f, 1f, 1f); bigS = new Vector3(1f, 1.2f, 1f); listGObj [0].transform.localScale = bigS; temp.SetActive(false); gridList.GetComponent <UIGrid> ().Reposition(); googleMobileAdsManager = gameObject.GetComponentInParent <GoogleMobileAdsManager> (); webview = GameObject.Find(PANEL_1000).GetComponent <Webview> (); #if UNITY_IOS googleMobileAdsManager.bannerView.Hide(); StartCoroutine(TimeAd()); #endif }