Ejemplo n.º 1
0
    public void Click()
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.Study_SignUp;
        json["name"] = key;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 2
0
    public void SaveChatting()
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.Study_SaveChatting;
        json["name"] = key;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 3
0
    public void ButtonClick()
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.NewStudy;
        json["name"] = NameBox.value;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 4
0
    void OnClick()
    {
        JObject sjson = new JObject();

        sjson["type"] = NetworkProtocol.Post_Detail;
        sjson["no"]   = json["no"];
        NetworkMain.SendMessage(sjson);
    }
Ejemplo n.º 5
0
    public void Page(int newpage)
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.Post_Open;
        json["page"] = newpage;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 6
0
    void Start()
    {
        // 들어온 다음에 로딩 완료 메세지를 보낸다.
        JObject json = new JObject();

        json["type"] = NetworkProtocol.EnterWorld;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 7
0
    public void Delete()
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.Inventory_Remove;
        json["no"]   = no;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 8
0
    public void MoveTabSend(GameObject tab)
    {
        JObject json = new JObject();

        json["type"] = NetworkProtocol.Study_UI;
        json["tab"]  = tab.name;
        json["name"] = key;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 9
0
    public void OnClick()
    {
        JObject json = new JObject();

        json["type"]     = NetworkProtocol.Login;
        json["id"]       = ID.value;
        json["password"] = Password.value;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 10
0
    public void KeywordAddButton()
    {
        JObject json = new JObject();

        json["type"]    = NetworkProtocol.Keyword_Add;
        json["keyword"] = InputBox.value;
        NetworkMain.SendMessage(json);
        InputBox.value = "";
    }
Ejemplo n.º 11
0
    public void OnDoubleClick()
    {
        // 인벤토리로 다운로드 요청
        JObject json = new JObject();

        json["type"]       = NetworkProtocol.Study_FileDownload;
        json["group_name"] = Preset.objects.StudyWindow.key;
        json["no"]         = no;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 12
0
    public void Accept_Button()
    {
        JObject json = new JObject();

        json["type"]     = NetworkProtocol.Study_Member_Request;
        json["name"]     = Preset.objects.StudyWindow.key;
        json["id"]       = id;
        json["positive"] = true;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 13
0
 // Use this for initialization
 void OnClick()
 {
     if (UICamera.currentTouchID == -2)
     {
         JObject sjson = new JObject();
         sjson["type"]    = NetworkProtocol.Keyword_Remove;
         sjson["keyword"] = label.text;
         NetworkMain.SendMessage(sjson);
     }
 }
Ejemplo n.º 14
0
    public void ClickContent()
    {
        string url = Content_detail.GetUrlAtPosition(UICamera.lastHit.point);

        if (!string.IsNullOrEmpty(url))
        {
            JObject json = new JObject();
            json["type"]    = NetworkProtocol.GetFileInPost;
            json["post_no"] = no;
            json["file_no"] = url.Replace("file-", "");
            NetworkMain.SendMessage(json);
        }
    }
Ejemplo n.º 15
0
    public void SendPost()
    {
        JObject json = new JObject();

        json["type"]     = NetworkProtocol.SendPost;
        json["title"]    = Write_Title.value;
        json["content"]  = Write_Content.value;
        json["receiver"] = Write_Receiver.value;
        if (File_number != -1)
        {
            json["file"] = File_number;
        }
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 16
0
    void Send()
    {
        mInput.isSelected = false;
        string text = NGUIText.StripSymbols(mInput.value);

        mInput.value = "";
        if (!string.IsNullOrEmpty(text))
        {
            JObject json = new JObject();
            json["type"]    = NetworkProtocol.Chat;
            json["message"] = text;
            NetworkMain.SendMessage(json);
        }
    }
Ejemplo n.º 17
0
 void OnDoubleClick()
 {
     if (Preset.objects.PostWindow.isOpen())
     {
         Preset.objects.PostWindow.InputItem(no, UI_title.text);
     }
     else if (Preset.objects.StudyWindow.isOpen())
     {
         // 스터디에 파일 업로드
         JObject json = new JObject();
         json["type"]       = NetworkProtocol.Study_FileUpload;
         json["group_name"] = Preset.objects.StudyWindow.key;
         json["no"]         = no;
         NetworkMain.SendMessage(json);
     }
 }
Ejemplo n.º 18
0
 // Update is called once per frame
 void Update()
 {
     if (UIInput.selection == null) // 다른 UIInput에 입력중이 아닌경우
     {
         if (Input.GetKeyDown(KeyCode.F))
         {
             if (select_action != null)
             {
                 JObject json = new JObject();
                 json["type"]     = NetworkProtocol.Action;
                 json["no"]       = select_action.No;
                 json["function"] = select_action.function;
                 NetworkMain.SendMessage(json);
             }
         }
     }
 }
Ejemplo n.º 19
0
    public void Save(string path = null, bool open = false)
    {
        if (path == null)
        {
            FileItem item = Preset.objects.InventoryWindow.Items[no];
            // 자동으로 파일 저장위치 고려
            string fname  = item.owner + "_" + item.UI_title.text;
            string name   = fname;
            string folder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Gachon-Files\\";
            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }
            for (int i = 2; File.Exists(folder + name); i++)
            {
                //확장자 분리
                int temp = fname.LastIndexOf('.');
                if (temp == -1)
                {
                    name = fname + " (" + i + ")";
                }
                else
                {
                    name = fname.Substring(0, temp) + " (" + i + ")" + fname.Substring(temp);
                }
            }
            path = folder + name;
        }
        JObject json = new JObject();

        json["type"] = NetworkProtocol.File_Download;
        json["no"]   = no;
        json["path"] = path;
        json["open"] = open;
        NetworkMain.SendMessage(json);
    }
Ejemplo n.º 20
0
    void Run()
    {
        bool    JumpButton = false;
        Vector3 v          = new Vector3();

        if (UIInput.selection == null) // 다른 UIInput에 입력중이 아닌경우
        {
            if (Input.GetKey(KeyCode.A))
            {
                v += Vector3.left;
            }
            if (Input.GetKey(KeyCode.D))
            {
                v -= Vector3.left;
            }
            if (Input.GetKey(KeyCode.W))
            {
                v += Vector3.forward;
            }
            if (Input.GetKey(KeyCode.S))
            {
                v -= Vector3.forward;
            }
            if (Input.GetKey(KeyCode.Space))
            {
                JumpButton = true;
            }
        }
        if (cc.isGrounded)
        {
            if (JumpButton)
            {
                VSpeed = 14;
            }
            if (VSpeed < 0)
            {
                VSpeed = 0;
            }
        }
        if (Input.GetMouseButton(1))
        {
            transform.rotation = man.transform.rotation;
        }
        v       = v.normalized * Speed;
        VSpeed -= 40 * Time.deltaTime;
        v.y     = VSpeed;
        v       = transform.rotation * v;
        Vector3 vc = transform.position;

        cc.Move(v * Time.deltaTime);
        if (moveok)
        {
            if (movetime >= NetworkMain.MoveDeley)
            {
                moveok = false;
                JObject json = new JObject();
                json["type"] = NetworkProtocol.Move;
                json["x"]    = vc.x;
                json["y"]    = vc.y;
                json["z"]    = vc.z;
                json["q"]    = transform.rotation.eulerAngles.y;
                NetworkMain.SendMessage(json);
                movetime -= NetworkMain.MoveDeley;
            }
        }
        if (vc != transform.position || q != transform.rotation.eulerAngles.y)
        {
            q = transform.rotation.eulerAngles.y;
            if (movetime > NetworkMain.MoveDeley)
            {
                movetime = 0;
            }

            moveok = true;
        }
        movetime += Time.deltaTime;
    }