Inheritance: MonoBehaviour
Esempio n. 1
0
    void OnLoadComplete(UniWebView webView, bool success, string errorMessage)
    {
        loadObject.SetActive(false);
#if UNITY_ANDROID
        if (link.Contains("pdf") || link.Contains("PDF"))
        {
            LoadingScript.HideLoading();
            CloseButtonPress();
        }
        else
        {
            if (success)
            {
                Debug.Log("Show Web");
                webView.Show();
            }
            else
            {
                Debug.Log("Something wrong in webview loading: " + errorMessage);
//				_errorMessage = errorMessage;
            }
        }
#else
        if (success)
        {
            Debug.Log("Show Web");
            webView.Show();
        }
        else
        {
            Debug.Log("Something wrong in webview loading: " + errorMessage);
//			_errorMessage = errorMessage;
        }
                #endif
    }
Esempio n. 2
0
    //private void Start()
    //{
    //    WeaponOff();
    //    Level = 1;
    //    respawnPoint = GameObject.FindGameObjectWithTag("Respawn").GetComponent<Transform>();       //부활장소
    //    loading = FindObjectOfType<LoadingScript>();                                                //로딩창
    //    expBar = GameObject.Find("ExpBar").GetComponent<Image>();
    //    hpBar = GameObject.Find("Hp").GetComponent<Image>();
    //    expText = GameObject.Find("ExpText").GetComponent<Text>();
    //    playerName = GameObject.Find("PlayerNickName").GetComponent<Text>();
    //    smooth = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<SmoothFollow>();



    private void Start()
    {
        Joystick = GameObject.Find("Joystick").GetComponent <UltimateJoystick>();
        //WeaponOff();  // 전재현 추가
        Level        = 1;                                                                      // 전재현 추가
        respawnPoint = GameObject.FindGameObjectWithTag("Respawn").GetComponent <Transform>(); //부활장소
        loading      = FindObjectOfType <LoadingScript>();                                     //로딩창
        expBar       = GameObject.Find("ExpBar").GetComponent <Image>();                       //경험치 바
        hpBar        = GameObject.Find("Hp").GetComponent <Image>();                           //hp 바
        expText      = GameObject.Find("ExpText").GetComponent <Text>();
        playerName   = GameObject.Find("PlayerNickName").GetComponent <Text>();
        smooth       = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <SmoothFollow>();

        // monster = GameObject.FindGameObjectWithTag("Enemy").GetComponent<Monster>();
        CoolTime = GameObject.FindGameObjectsWithTag("skill");

        for (int i = 0; i < 3; i++)
        {
            CoolTime[i].GetComponent <Image>().color = new Color(41f / 255f, 9f / 255f, 9f / 255f, 0f / 255f);
        }

        equipmentManager.WeaponSet(0); // 전재현 추가
        colOnce         = false;       // 전재현 추가
        playerName.text = PhotonNetwork.player.NickName;
        isPlayerMove    = false;



        respawnBtn = GameObject.Find("RespawnBtn").GetComponent <Button>();
    }
Esempio n. 3
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 4
0
 void FBUpdateCB(APIMsg msg)
 {
     facebookLogin();
     UpdateDataFormFB();
     ResetUpdateDataForm();
     ResetRegisterDataForm();
     LoadingScript.HideLoading();
 }
Esempio n. 5
0
    public void GuestLoginProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userRegisterGuest");
        form.AddField("imei", UserCommonData.imei);
        GuestLoginAPI.wwwCallAPI(form);
    }
Esempio n. 6
0
    IEnumerator Loading()
    {
        WWWForm form = new WWWForm();

        //check ID = 7 for test
        form.AddField("user_receive_id", UserCommonData.pGlobal.user.user_id);
        loader = new WWW(ShowGiftURL, form);
        yield return(loader);

        if (loader.error != null)
        {
            Debug.Log("HTTP ERROR");
            LoadingScript.HideLoading();
            yield break;
        }
        Debug.Log(loader.text);
        if (loader.text == "")
        {
            LoadingScript.HideLoading();
            yield break;
        }
        yield return(new WaitForSeconds(3.0f));

        JSONObject json = new JSONObject(loader.text);

        //Casting Data
        if (json["msg"].str == "OK")
        {
            //get Gift list
            JSONObject arr = json["gift"];
            if (arr.list != null)
            {
                giftList = new GiftItemData[arr.list.Count];
            }
            else
            {
                giftList = null;
            }
            int i = 0;
            foreach (JSONObject content in arr.list)
            {
                GiftItemData data = new GiftItemData();
                data.GiftKey  = content["user_gift_id"].str;
                data.name     = StringUtil.ParseUnicodeEscapes(content["user_name"].str);
                data.id       = int.Parse(content["GiftId"].str);
                data.giftName = StringUtil.ParseUnicodeEscapes(content["GiftName"].str);
                giftList[i]   = data;
                i++;
            }
        }
        isFinish = true;
        if (postDownloaded != null)
        {
            postDownloaded();
        }
    }
Esempio n. 7
0
 // Use this for initialization
 void Start()
 {
     ActivatePauseMenu();
     rO         = FindObjectOfType <RandomOperator>();
     loadCircle = FindObjectOfType <LoadingScript>();
     //randomNumberGen = FindObjectsOfType<RandomNumberGenerator>();
     speed       = speedArray[index];
     points.text = pointsValue.ToString();
     streakMeter.SetStreakText("X1");
 }
Esempio n. 8
0
 public void FacebookLoginProcess()
 {
             #if UNITY_WINRT
     UnityPluginForWindowsPhone.BridgeWP.loginFacebook();
             #else
     Debug.Log("FacebookLoginProcess");
     FacebookLogin.pGlobal.Login(PostLogin);
             #endif
     LoadingScript.ShowLoading();
 }
Esempio n. 9
0
    public void UserLoginProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userLoginOryor");
        form.AddField("username", username.text);
        form.AddField("password", password.text);
        form.AddField("imei", UserCommonData.imei);
        NormalLoginAPI.wwwCallAPI(form);
    }
Esempio n. 10
0
    void FBLoginCB(APIMsg msg)
    {
        Debug.Log(msg.msg);
        facebookLogin();
        //get msg to userCommon
        UserCommonData.SetUserData(msg.user[0]);
        UpdateDataFormFB();
        ResetUpdateDataForm();
        ResetRegisterDataForm();

        LoadingScript.HideLoading();
    }
Esempio n. 11
0
    public GameObject zeroCam; //미니맵 알파캠(제로)

    private void Awake()
    {
        loading = FindObjectOfType <LoadingScript>();       //로딩창 연결
        portal  = FindObjectOfType <MapPortalMove>();       //포탈오브젝트 연결

        player = GameObject.FindGameObjectWithTag("Player");


        mapText = GameObject.FindGameObjectWithTag("text").GetComponent <Text>();
        midCam  = GameObject.Find("CamAlphaMid");
        zeroCam = GameObject.Find("CamAlphaZero");
    }
 void Start()
 {
     if (wwwHandler != null)
     {
         wwwScript = (WWWHandler)wwwHandler.gameObject.GetComponent(typeof(WWWHandler));
     }
     if (loadingObject != null)
     {
         loadingManager = (LoadingScript)loadingObject.gameObject.GetComponent(typeof(LoadingScript));
     }
     signUpButton.onClick.AddListener(onSignUp);
     loginButton.onClick.AddListener(onSignIn);
 }
Esempio n. 13
0
 void PostLogin(string error)
 {
     Debug.Log("LoginPageControl PostLogin : "******"OK")
     {
         PopupObject.ShowAlertPopup("Login Error", "เกิดข้อผิดพลาดในการ Login ด้วย Facebook", "ปิด");
         LoadingScript.HideLoading();
     }
     else
     {
         LoginProcess();
     }
 }
Esempio n. 14
0
    // Use this for initialization
    void Start()
    {
        isInit = false;
        Init();
        InstanceObject = this;
        StartCoroutine(LoadingUpdate());

        hint.gameObject.SetActive(false);

        if (SoundManager.getInstance())
        {
            SoundManager.getInstance().PlaySound(SoundId.LOADING, true);
        }
    }
Esempio n. 15
0
    void _init()
    {
        _topPanel = ((GameObject)Instantiate(Resources.Load("TopCanvas"))).GetComponent <LoadingScript>();
        _topPanel.gameObject.SetActive(false);
        DontDestroyOnLoad(_topPanel);


        SceneManager.activeSceneChanged += (Scene arg0, Scene arg1) => {
            Debug.Log("HDSceneManager: ActiveSceneChanged");
            _nextSceneLoaded = true;
        };
        SceneManager.sceneLoaded += (Scene arg0, LoadSceneMode arg1) => {
            Debug.Log("HDSceneManager: ScenLoaded");
        };
    }
Esempio n. 16
0
    //function which executes on scene awake before the start function
    void Awake()
    {
        //destroy the already existing instance, if any
        if (instance)
        {
            Destroy(gameObject);
            return;
        }
        instance = this;
        //find the ImageLS gameobject from the Hierarchy
        loadingScreenText = GameObject.Find("text_loading");

        Debug.Log("log thu phat");
        //loadingScreenText.SetActive(false);
        DontDestroyOnLoad(this);          //make this object persistent between scenes
    }
Esempio n. 17
0
 void NormalLoginCB(APIMsg msg)
 {
     Debug.Log(msg.msg);
     if (msg.msg == "OK")
     {
         UserCommonData.SetUserData(msg.user[0]);
         userLogin();
         LoadingScript.HideLoading();
         MainMenuGlobal.SetLoginObject(false);
     }
     else
     {
         //popup LoginFail
         LoadingScript.HideLoading();
     }
 }
Esempio n. 18
0
 void Awake()
 {
     if (instance)
     {
         Destroy(gameObject);
         hide();
         return;
     }
     instance = this;
     instance.loadingScreenImage.SetActive(false);
     instance.headerImage.SetActive(false);
     instance.loadingText.gameObject.SetActive(false);
     instance.tipsLabel.gameObject.SetActive(false);
     instance.tips.gameObject.SetActive(false);
     DontDestroyOnLoad(this);
 }
Esempio n. 19
0
 public void PostDownload()
 {
     dbs = gLoader.awardList;
     if (gLoader.awardList.allGameData[0] == null)
     {
         PopupObject.ShowAlertPopup("พบปัญหาในการเชื่อมต่อ",
                                    "ไม่สามารถตรวจสอบข้อมูลของท่านได้ กรุณาตรวจสอบอินเทอร์เน็ตของท่าน และลองใหม่อีกครั้ง",
                                    "ยกเลิก", null,
                                    "เชื่อมต่อใหม่", LoadAward);
     }
     else
     {
         AllGameAward();
     }
     LoadingScript.HideLoading();
 }
Esempio n. 20
0
    public void Register()
    {
        //goto update after register
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        form.AddField("type", "userRegisterOryor");
        form.AddField("username", RegisterData.username);
        form.AddField("password", RegisterData.password);
        form.AddField("name", RegisterData.name);
        form.AddField("surname", RegisterData.surname);
        form.AddField("tel", RegisterData.tel);
        form.AddField("address", RegisterData.address);
        form.AddField("imei", UserCommonData.imei);
        NormalRegisAPI.wwwCallAPI(form);
    }
Esempio n. 21
0
    IEnumerator AcceptGift()
    {
        WWWForm form = new WWWForm();

        form.AddField("user_gift_id", GiftID);
        form.AddField("user_receive_id", UserCommonData.pGlobal.user.user_id);

        WWW loader = new WWW(GiftLoader.pGlobal.ReceiveGiftURL, form);

        yield return(loader);

        Debug.Log(loader.text);
        yield return(StartCoroutine(postAccept()));

        LoadingScript.HideLoading();
    }
Esempio n. 22
0
 void MakeSingleton()
 {
     //if(instance == null)
     //{
     //    instance = this;
     //}
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Esempio n. 23
0
    public void UpdateProcess()
    {
        LoadingScript.ShowLoading();
        WWWForm form = new WWWForm();

        //		password", "imei", "name", "surname" , "tel", "address
        form.AddField("type", "userUpdate");
        form.AddField("user_id", UserCommonData.pGlobal.user.user_id);
        form.AddField("username", UpdateData.username);
        form.AddField("password", UpdateData.password);
        form.AddField("name", UpdateData.name);
        form.AddField("surname", UpdateData.surname);
        form.AddField("tel", UpdateData.tel);
        form.AddField("address", UpdateData.address);
        form.AddField("imei", UserCommonData.imei);
        UpdateAPI.wwwCallAPI(form);
    }
Esempio n. 24
0
 void NormalRegisterCB(APIMsg msg)
 {
     if (msg.msg == "OK")
     {
         UserCommonData.SetUserData(msg.user[0]);
         ResetUpdateDataForm();
         ResetRegisterDataForm();
         LoadingScript.HideLoading();
         RegisterDone();
     }
     else
     {
         Debug.Log(msg.msg);
         //popup Register Fail by xxxxx
         LoadingScript.HideLoading();
     }
 }
Esempio n. 25
0
 void UpdateCB(APIMsg msg)
 {
     //done update
     //check msg first
     if (msg.msg == "OK")
     {
         //update UserCommonData and save
         UserCommonData.pGlobal.user = msg.user[0];
         UserCommonData.pGlobal.Save();
     }
     else
     {
         //update error
         PopupObject.ShowAlertPopup("Update Error", "ไม่สามารถปรับปรุงข้อมูลได้", "ปิด");
         //reset data
         ResetUpdateDataForm();
     }
     LoadingScript.HideLoading();
 }
Esempio n. 26
0
    void OnLoadComplete(UniWebView webView, bool success, string errorMessage)
    {
#if UNITY_ANDROID
        LoadingScript.HideLoading();
        PageDetailGlobal.HideContentPage();
#else
        if (success)
        {
            Debug.Log("Show Web");
            Indicator.SetActive(false);
            webView.Show();
        }
        else
        {
            Debug.Log("Something wrong in webview loading: " + errorMessage);
//			_errorMessage = errorMessage;
        }
#endif
    }
Esempio n. 27
0
    IEnumerator SendData()
    {
        LoadingScript.ShowLoading();
        WWWForm form    = new WWWForm();
        string  wwwText = UserCommonData.GetURL();

        //http://www.oryor.com/oryor_smart_app_year2/ws_client_year2v1.php?task=inform&
        //email=xxx&number=xxx&name=xxx&tel=xxx&detail=xxx&lat=xxx&lon=xxx&file1=&file2=&file3=
        form.AddField("task", "inform");
        form.AddField("user_id", UserCommonData.pGlobal.user.user_id);
        form.AddField("type", type.currentIdx);
        form.AddField("name", name.text);
        form.AddField("email", email.text);
        form.AddField("tel", Tel.text);
        form.AddField("detail", Detail.text);
        if (flagGPS == 1)
        {
            form.AddField("lat", lat);
            form.AddField("lon", lon);
        }
        else
        {
            form.AddField("lat", "");
            form.AddField("lon", "");
        }
        if (flagPhone == 1)
        {
            form.AddField("phone", phonenumber);
        }
        else
        {
            form.AddField("phone", "");
        }

        int i = 1;

        foreach (ReportPicSrc src in ReportCamera.PictureList)
        {
            string attr = "file" + i;
            Debug.Log(attr);
            Debug.Log(src.rawData);
            form.AddBinaryData(attr, src.rawData, attr + ".jpeg", "image/jpeg");
            i++;
        }

        WWW upload = new WWW(wwwText, form);

        yield return(upload);

        LoadingScript.HideLoading();
        if (!string.IsNullOrEmpty(upload.error))
        {
            PopupObject.ShowAlertPopup("พบปัญหาในการเชื่อมต่อ",
                                       "ไม่สามารถส่งข้อมูลของท่านไปยังเจ้าหน้าที่ได้ กรุณาตรวจสอบอินเทอร์เน็ตของท่าน และลองใหม่อีกครั้ง",
                                       "ตกลง", null);
            Debug.LogWarning("LOCAL FILE ERROR: " + upload.error);
        }
        else
        {
            Debug.Log(upload.text);
            Debug.Log("Uploaded Finish");
            PopupObject.ShowAlertPopup("ระบบได้รับเรื่องร้องเรียนของท่านเรียบร้อยแล้ว", "ขอขอบคุณสำหรับข้อมูลที่มีประโยชน์ของท่าน ทางสำนักงานคณะกรรมการอาหารและยา จะดำเนินการตรวจสอบและแก้ไขโดยเร็วที่สุด", "ตกลง");
        }
    }
Esempio n. 28
0
 public void PostDownload()
 {
     CreateGiftList(gLoader.giftList);
     LoadingScript.HideLoading();
 }
Esempio n. 29
0
 public void LoadGift()
 {
     gLoader.LoadGift();
     LoadingScript.ShowLoading();
 }
Esempio n. 30
0
 void PressAccept()
 {
     LoadingScript.ShowLoading();
     StartCoroutine("AcceptGift");
 }