In weekends We went to Wudaokou by subway

In China, there is checkpoints in the stations



  

 


There were a lot of people as it was near Holiday, "春节", that is biggest holiday in China

 

 

 

 

 

 

 

We ate Korean Spicy Stir-fried Chicken(닭갈비)


and


Went to Karaoke

 

'중국인턴(Intern In China) > 그밖에(et cetera)' 카테고리의 다른 글

My New and First (???) Figure  (0) 2017.01.25
Some pictures in Beijing  (0) 2017.01.16
My phone shutted out  (0) 2017.01.06

I've just bought these two lovely figure in supermarket near my company..!










And I'm afraid of having new hobby to collect figures.... It would be cost huge!!!

'중국인턴(Intern In China) > 그밖에(et cetera)' 카테고리의 다른 글

Going out to Wudaokou(五道口)  (0) 2017.02.01
Some pictures in Beijing  (0) 2017.01.16
My phone shutted out  (0) 2017.01.06






After finishing fist task, we are so happy and eat lots of screwered lambs with noodles and beer!

cheers!!





These are our lodge. We borrowed whole house in apartment by Airbnb.


What a chaos the pictures are







We had nice dinner in Sunday. Although steaks are not fantastic, we had 2 dishes of pasta and they were really good



'중국인턴(Intern In China) > 그밖에(et cetera)' 카테고리의 다른 글

Going out to Wudaokou(五道口)  (0) 2017.02.01
My New and First (???) Figure  (0) 2017.01.25
My phone shutted out  (0) 2017.01.06


This is simple script to make inventory window(n x 1 matrix). You can change bool variable 'ShowStickList' when user click certain keyboard button then OnGUI method will(or won't) draw a window. Method 'InventoryWindow' makes buttons that each is an item in BindableList in Inventory window. When user click one of those buttons, 'StickReadyToBind()' method will be called


Script above is to make flexible inventory that contains all items in ArrayList. And if you wanna create Inventory fixed size so there are buttons the same number of items and blank squares, this is the script.



This is script that makes m x n matrix inventory. It will create buttons while there are items in the list, then rest will be just simple square(see 'if{} else{}' in the script)

'GUI.DragWindow()' method is to make that inventory dragable. User can move window by click and drag by mouse





'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Change Color of Z Sticks(Theater Mode)  (0) 2017.01.11
Unity Http Put Json Type  (0) 2017.01.11
Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06


selectedSticks contains sticks to change one color

AllChangedSticks is sum of selectedSticks selected between clicking Send Color button

This method is to add or remove a stick to selected list


When user click color button that he/she wants to change, All sticks change color member to new one



Then, they will be added in to AllChangeLists. When there is already added, the latest stick will replace old one



When user click send button, Json data will be written.


Then Send Json data through Http put method to server


'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity Making Inventory Script  (0) 2017.01.16
Unity Http Put Json Type  (0) 2017.01.11
Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06

This is the code to connect server by HTTP Put method and send Json data in Unity3D


use HttpWebRequest Class to request, and Stream class to put Json data. Then, Response will be obtained using HttpWebResponse and  StreamReader class.

Response is in StreamReader.ReadToEnd();


'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity Making Inventory Script  (0) 2017.01.16
Change Color of Z Sticks(Theater Mode)  (0) 2017.01.11
Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06

http://blog.naver.com/PostView.nhn?blogId=sonmg&logNo=220510568356


public enum EType {

GET,

POST,

PUT,

DELETE

};


[SerializeField] public EType _type = EType.GET;



private void OnButtonClicked()

{

Debug.Log ("OnButtonClicked... " + _type);


if (_type == EType.GET)

{

  // GET

  string url = "http://127.0.0.1:3000/method_get_test/users";

  WWW www = new WWW (url);

  StartCoroutine(WaitForRequest(www));

}

else if (_type == EType.POST)

{

  // POST

  string url = "http://127.0.0.1:3000/method_post_test/user";

  WWWForm form = new WWWForm();

  form.AddField("id", "8");

  form.AddField("name", "brian8");

  WWW www = new WWW (url, form);

  StartCoroutine(WaitForRequest(www));

}

else if (_type == EType.PUT)

{

  // PUT

  string url = "http://127.0.0.1:3000/method_put_test/user/id/8/ddddd";

  HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);

  httpWebRequest.ContentType = "text/json";

  httpWebRequest.Method = "PUT";


  HttpWebResponse httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

  using (StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()))

  {

   string responseText = streamReader.ReadToEnd();

   //Now you have your response.

   //or false depending on information in the response

   Debug.Log(responseText);

  }   

}

else if (_type == EType.DELETE)

{

  // DELETE

  string url = "http://127.0.0.1:3000/method_del_test/user/id/8";

  HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);

  httpWebRequest.ContentType = "text/json";

  httpWebRequest.Method = "DELETE";


  HttpWebResponse httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

  using (StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()))

  {

   string responseText = streamReader.ReadToEnd();

   //Now you have your response.

   //or false depending on information in the response

   Debug.Log(responseText);

  }   

}

}


IEnumerator WaitForRequest(WWW www)

{

yield return www;


if (www.error == null)

{

  // request completed!

  Debug.Log (www.text);

}

else

{

  // something wrong!

  Debug.Log ("WWW error: " + www.error);

}

}


'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Change Color of Z Sticks(Theater Mode)  (0) 2017.01.11
Unity Http Put Json Type  (0) 2017.01.11
Parsing data from Json  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06
Unity read Json data  (0) 2017.01.06


I used www(which is a class that connect HTTP) to get Json data from server. The Data will be stored in www.text value type string, and I splited the data every }, as it contains several information of several sticks and I need to split them.


And printTextSplit(string[] str) method does that task


Code is below:



StickList is the list of connected Z Sticks and every stick information will be printed in console by Debug.Log command. StickList.Count is a int value that the number of sticks connected

'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity Http Put Json Type  (0) 2017.01.11
Unity HTTP (www) get, put, post  (0) 2017.01.10
Loaded Json Data from Server@@@  (0) 2017.01.06
Unity read Json data  (0) 2017.01.06
First Assignment in China  (0) 2017.01.05

YEEEEEESSSSSSSS!! I just succeeded to load informations from Server as Json Data file!!


It collect information from server every second..!!!





Now I will parsing datas to manage at my Unity project. then I need to research how to send JsonData back to Server


AND Special Thanks to 

http://www.itpaper.co.kr/14127/?ckattempt=1

'중국인턴(Intern In China) > 업무(Tasks)' 카테고리의 다른 글

Unity HTTP (www) get, put, post  (0) 2017.01.10
Parsing data from Json  (0) 2017.01.10
Unity read Json data  (0) 2017.01.06
First Assignment in China  (0) 2017.01.05
Read Json file in Unity3D  (0) 2017.01.05

As I arrived in China in 1st, Jan My Phone shutted out and I haven't solved problem. I guess the battery's life is expired. So I ordered new battery in Taobao.com



I really want to take pictures~

'중국인턴(Intern In China) > 그밖에(et cetera)' 카테고리의 다른 글

Going out to Wudaokou(五道口)  (0) 2017.02.01
My New and First (???) Figure  (0) 2017.01.25
Some pictures in Beijing  (0) 2017.01.16

+ Recent posts