전체보기119 cJSON API 저장 * 원문 : http://wiki.openpicus.com/index.php/JSON_Parser JSON APIsThe main data type to use JSON library is struct cJSONThe following tables describe JSON related APIs ParsingFunctionDescription cJSON *cJSON_Parse(const char*value)This function parses a JSON stringconst char *value - pointer to a cJSON string to be parsedReturns cJSON *- pointer to the cJSON parsedNOTE Call cJSON_Delete(cJSON *c) .. 2015. 7. 19. C# 배열과 n차원 배열 배열의 선언 1 2 3 4 5 6 7 int[] array1; // 선언 후 초기화 n 값은 배열의 크기 정수 array1 = new int[n]{0,1,...,n}; // array1[0] = 1; int[] array2 = new int[n]; int[] array3 = new int[3] {1, 2, 3}; n차원 배열 1 2 3 int[,] array = new int[2, 2] {{1, 2}, {3, 4}}; int[,] array = new int[2, 3, 2] {{{1, 2}, {3, 4}, {5, 6}}, {{1, 2}, {3, 4}, {5, 6}}}; // array1[0, 0] = 1; 2015. 6. 24. 유니티3D, 화면 기준으로 2d 좌표를 3d 좌표로 혹은 반대로 Camera.ScreenToWorldPoint화면 공간의 위치를 월드 공간에 위치로z 값은 카메라의 월드 좌표값을 사용. 1234567891011121314// Draw a yellow sphere in the scene view at the position// on the near plane of the selected camera that is// 100 pixels from lower-left.using UnityEngine;using System.Collections; public class ExampleClass : MonoBehaviour { void OnDrawGizmosSelected() { Camera camera = GetComponent(); Vector3 p = camera.Scre.. 2015. 6. 16. Cocos2d-x 3.6버전은 아직 VS2015를 지원하지 않는 듯. 정확히는 c++14를 지원하지 않는 듯.VS2015 커뮤니티 버전으로 컴파일 시 무수한 에러가 뜨는데 정확한 해결 방안이 도통 검색 되지 않음..ㅠㅠ그래서 VS2013 커뮤니티 버전으로 재설치하고 하니 매우 잘 됨. VS2013은 C++12 2015. 6. 2. 유니티3D, 게임 오브젝트를 특정 대상을 바라보게 하기 방법1) Quaternion.LookRotation1234567public Transform target;void Update() { Vector3 vec = target.position - transform.position; vec.Normalize(); Quaternion q = Quaternion.LookRotation(vec); transform.rotate = q;}Colored by Color Scriptercs 관련 유니티 문서 #http://docs.unity3d.com/ScriptReference/Quaternion.LookRotation.html 방법2) Transform.LookAt12345public Transform target;void Update() { // Rotate the.. 2015. 5. 26. 유니티3D, 가속도 센서 Input.acceleration - 3차원 공간에서의 기기의 최근 선형 움직임 값을 측정. (읽기전용) 12345678910111213141516using UnityEngine;using System.Collections; public class ExampleClass : MonoBehaviour { public float speed = 10.0F; void Update() { Vector3 dir = Vector3.zero; dir.x = -Input.acceleration.y; dir.z = Input.acceleration.x; if (dir.sqrMagnitude > 1) dir.Normalize(); dir *= Time.deltaTime; transform.Translate(dir * spe.. 2015. 5. 14. 이전 1 ··· 7 8 9 10 11 12 13 ··· 20 다음 320x100