전체 글
-
04/29 유니티 케릭터 컨트롤 + 인풋 R&D유니티 2021. 4. 29. 14:12
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class JoystickTest : MonoBehaviour { public VariableJoystick joystick; public bool isSnap; public Transform heroTrans; public float speed = 1f; public float joypos; public Animation anim; public Button button; // Start is called before the first frame update void Start() { joystick.SnapX =..
-
04/29 게임 엔진 응용프로그래밍 (서술형) 과제카테고리 없음 2021. 4. 28. 00:54
1. OOP(Object-Oriented Programming) 컴퓨터 프로그래밍의 패러다임의 하나 데이터와 이를 처리하는 루틴들을 하나의 독립된 객체로 바라보는 시선 사용 이유 재사용성의 증가 특징 캡슐화(Encapsulation) 객체 스스로가 자신의 상태를 책임지게 하여, 해당 객체의 역할 수행에 집중할 수 있도록 자율성을 높이는 것 데이터 구조와 데이터를 다루는 방법들을 결합시켜 묶는 것 변수와 함수를 하나로 묶는 것 데이터를 외부에서 접근하는 것을 방지하고, 오로지 함수를 통해서만 접근할 수 있게 하는 것 데이터 캡슐화, 은닉화 상속(Ingeritance) 부모 클래스의 속성과 기능을 상속받아 동일하게 사용 범용적인 클래스를 작성한 후 상속을 활용하면, 여러 클래스에서 중복되는 속성과 기능을 재..
-
04/26 유니티 입력값 출력 복습 NGUI, UGUI유니티 2021. 4. 27. 01:58
NGUI를 배우기 시작 복습을 겸하여 NGUI와UGUI로 간단히 Input Field에 값을 입력하고, 버튼을 눌러 디버그 로그로 입력값을 출력하는 씬 제작 개인적 사용 느낌 UGUI를 먼저 배웠기 때문에 UGUI로 구현하는 편이 아직까지는 더 좋은 것 같음 NGUI의 특징 버튼이나 인풋필드같은 클릭이 필요한 것들에는 Collider 컴포넌트를 추가함 UGUI의 Order in Layer를 조절하는 것을 NGUI에서는 Sprite의 Widget의 Depth를 조절 UGUI using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UGUILogin : MonoB..
-
04/26 유니티 NGUI slider 사용 연습유니티 2021. 4. 26. 17:01
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ButtonTest : MonoBehaviour { public UIButton btn; public UISlider slider; [Range(0f,1f)] public float sliderValue; // Start is called before the first frame update void Start() { this.btn.onClick.Add(new EventDelegate(() => { Debug.Log("button clicked!"); })); StartCoroutine(Check()); } private IEnumerato..
-
04/26 유니티 NGUI 버튼, 입력창 연습유니티 2021. 4. 26. 16:54
Button NGUI는 버튼구현 시 Collider 컴포넌트가 있어야 함 InputField 라벨을 스프라이트에 자식에 두고, 스프라이트에 InputField와 Collider 컴포넌트를 추가 자식에 위치한 라벨을 InputField의 Lavel속성에 어사인 using System.Collections; using System.Collections.Generic; using UnityEngine; public class UISignup : MonoBehaviour { public UIButton btnClose; public UILabel labelEmail; public UILabel labelUserName; public UILabel labelPassword; public UIButton btnSi..
-
04/23 유니티 스크롤 뷰 + 데이터 연동 연습유니티 2021. 4. 23. 18:10
데이터 Resources/Datas0423 사용자디렉토리/AppData/LocalLow/회사이름/프로덕트이름 코드 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.U2D; using UnityEngine.UI; namespace Assets.Scripts.Datas0423 { public class UIListItem : MonoBehaviour { public enum eState { DONE, COMPLETE, DOING } public enum eGauge { FRONT, COMPLETE } public Image img; public SpriteAtlas atlas; pub..
-