Beispiel #1
0
    void Awake()
    {
        if (_instance != null)
        {
            DestroyImmediate(this);
        }

        IOSMessage.ClickMap("GameLaunch");
        AndroidMessage.ClickMap("GameLaunch");
        WebMessage.ClickMap("GameLaunch");

        _instance  = this;
        modleLayer = LayerMask.NameToLayer("Modle");
        UI3D_S     = LayerMask.NameToLayer("3DUI_S");
        UI3D_M     = LayerMask.NameToLayer("3DUI_M");
        UI3D_L     = LayerMask.NameToLayer("3DUI_L");

        canvas_S = GameObject.Find("Cube/MapRoot/TitleCanvas_S");
        canvas_M = GameObject.Find("Cube/MapRoot/TitleCanvas_M");
        canvas_L = GameObject.Find("Cube/MapRoot/TitleCanvas_L");
        canvas_S.gameObject.layer = DataManager.Instance.UI3D_S;
        canvas_M.gameObject.layer = DataManager.Instance.UI3D_M;
        canvas_L.gameObject.layer = DataManager.Instance.UI3D_L;

        StartCoroutine(LoadXml());
        lastDistance = Camera.main.orthographicSize;

        curCullingMask = Camera.main.cullingMask;
    }
Beispiel #2
0
 void Text_ClickEvent()
 {
     string[] array = this.target.name.Split('_');
     if (array.Length == 2)
     {
         IOSMessage.ClickMap(array[1]);
         AndroidMessage.ClickMap(array[1]);
     }
 }
Beispiel #3
0
 public void OnClick()
 {
     meshRender = this.gameObject.GetComponent <MeshRenderer>();
     if (meshRender != null)
     {
         DataManager.Instance.str += "OnClick: " + this.name;
         meshRender.material.color = selectedColor;
     }
     try
     {
         IOSMessage.ClickMap(this.gameObject.name);
         AndroidMessage.ClickMap(this.gameObject.name);
         WebMessage.ClickMap(this.gameObject.name);
     }
     catch (Exception ex)
     {
         Debug.LogError("errr:" + ex.ToString());
     }
 }