반응형 분류 전체보기546 백준 C# 1001 using System; namespace baek2 { class Program { static void Main(string[] args) { string input; string[] token; input = Console.ReadLine(); token = input.Split(' '); int A = int.Parse(token[0]); int B = int.Parse(token[1]); Console.WriteLine("{0}", A-B); } } } 2023. 4. 6. 백준 C# 1000 using System; namespace baek2 { class Program { static void Main(string[] args) { string input; string[] token; input = Console.ReadLine(); token = input.Split(' '); int A = int.Parse(token[0]); int B = int.Parse(token[1]); Console.WriteLine("{0}", A+B); } } } 다른 방법 string input = Console.ReadLine(); string[] arr = input.Split(): Console.WriteLine(int.Parse(arr[0])-int.Parse(arr[1])); 2023. 4. 6. Unity - 게임 에셋 사이트들 추천! 게임 만들때 여러 사이트 들어가서 발품파는게 중요한데 필자는 보통 아래 5개 사이트에서 많이 찾아본다.1. 유니티 에셋 스토어(로그인 필요)유니티 에셋 스토어에는 다양한 에셋(3D 모델, 애니메이션, 사운드, 텍스처 등)이 있지만, 특히 강력한 도구 및 플러그인들이 큰 장점이다! 01 신규 에셋 보러가기 02 현재 인기 있는 에셋 보러가기 2. itch.io (로그인 필요없음) Top game assets tagged 2DFind game assets tagged 2D like Sprout Lands - Asset Pack, Modern exteriors - RPG Tileset [16X16], Modern interiors - RPG Tileset [16X16], Mystic Woods - 16x1.. 2023. 3. 8. Unity - Bind event, Extension Method 1. Bind에 Gameobject도 추가하기 01 enum 추가 enum GameObjects { TestObject, } GameObject type의 Bind도 받고 싶다고 추가 Bind(typeof(GameObjects)); 02 T의 타입이 GameObject인지 확인 if(typeof(T) == typeof(GameObject)) objects[i] = Util.FindChild(gameObject, names[i], true); else objects[i] = Util.FindChild(gameObject, names[i], true); if (objects[i] == null) Debug.Log($"Faild to bind!{names[i]}"); 03 GameObject반환 우리가 이전에.. 2023. 2. 22. Unity - UI 자동화(Bind, Get) Bind 1. enum 이름들을 enum값으로 설정 enum Buttons { PointButton, } enum Texts { PoinText, scoreText, } enum값 넘겨주는 방법은 Reflection을 이용하면 된다. 2. Reflection 이용해서 enum 넘기기 Reflection은 객체를 X-Ray 기능을 가지고 있다. 이를 통해 형식, 메소드 프로퍼티, 필드, 이벤트등의 정보를 확인할 수 있다. Relfection 더 자세히 알아보러 가기 C# 문법 - Reflection, Attribute 1. Reflection class의 모든 필드의 정보를 가져오는 X-ray와 같은 기능을 가지고 있다. C#에서 모든 객체들은 오브젝트 객체에서 파생되어 나온 것이다. Pig클래스에서 없는.. 2023. 2. 21. Unity - 플레이어가 이동할때 카메라가 플레이어 쳐다보게 하기 1. 카메라가 플레이어 쳐다보게 하기 01 Define.cs에 CamerMode 설정 public class Define { public enum CameraMode { QuaterView, } } 02 변수 설정 [SerializeField] Define.CameraMode _mode = Define.CameraMode.QuaterView; [SerializeField] Vector3 _delta = new Vector3(0.0f, 6.0f, -5.0f); [SerializeField] GameObject _player = null; _delta : 카메라의 위치를 플레이어 위치에서 얼마나 떨어져 배치할지 03 QuaterView setting public void SetQuaterView(Vector.. 2023. 2. 21. 이전 1 ··· 87 88 89 90 91 다음 반응형