일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 공부
- 셰이더
- premake5
- 비주얼스튜디오
- rendermonkey
- 화살표 메서드
- C++
- 파이썬
- c++class
- 다중상속
- 그림자 효과
- visualstudio2022
- 렌더몽키
- uidesign
- python
- 이득우
- 언리얼
- 화살표 함수
- 표창던지기
- 가변배열
- 배열문제
- 유니티
- 이득우언리얼
- 3차원배열
- swipe
- 게임만들기
- 화살피하기
- Unity
- c#
- IMGUI
- Today
- Total
목록전체 글 (71)
신입 개발자 공부 과정

대리자2 // Declare a delegate. delegate void Del(int x); // Define a named method. void DoWork(int k) { /* ... */ } // Instantiate the delegate using the method as a parameter. Del d = obj.DoWork; 대리자는 호출 시 둘 이상의 메서드를 호출할 수 있습니다. 이러한 호출을 멀티캐스트라고 합니다. 대리자의 메서드 목록(호출 목록)에 메서드를 더 추가하려는 경우 더하기 또는 더하기 대입 연산자('+' 또는 '+=')를 사용하여 대리자만 두 개 더 추가하면 됩니다. 예를 들어: var obj = new MethodClass(); Del d1 = obj.Method1..
Q1 //1.대지자 정의 private delegate void Del();//본문 없다 public App() { //3 대리자 변수 정의 메서드 연결(인스턴스) Del handler = this.SayHello; //Del handler = new Del(this.SayHello);와 동일 //4 대리자 호출(대리자가 참조하고 있는 메서드를 호출) handler(); } //2.대리자에 연결할 메서드 정의 //시그니쳐가 같아야 한다 private void SayHello() { Console.WriteLine("Hello World!"); } --------- Q2 program using System; using System.Collections.Generic; using System.Linq; u..
36.메서드 오버로딩 다양성을 구현하는 방법 중 하나로 동일한 이름을 가진 여러 메서드를 정의 하는 것 오버로딩 방법=-매개변수의 수 변경 public void Add(int a, int b) {} public void Add(int a, int b, int c) {} -다른 타입의 매개변수 사용 public void Add(int a, int b) {} public void Add(float a, int b) {} public void Add(float a, float b) {} -서로 다른 타입의 매개변수 순서 변경 public void Add(float a, int b) {} public void Add(int a, float b) {} **단, 반환 타입(void, int, float)이 다른 매..

Q1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Inventory3 { class Program { static void Main(string[] args) { Inventory inventory = new Inventory(); //Item item0 = new Item("장검"); //Item item1 = new Item("단검"); //Item item1 = new Item("단검"); //Item item1 = new Item("단검"); //Item item1 = new Item("단검"); //Item item1..

메서드 배열 하고 매개변수 Q1. 스타크래프트 부대지정 마린 3마리를 생성한다 각 마린의 이름은 고유하다 ex)홍길동, 임꺽정, 장길산 ... 마린 3마리를 부대지정한다 부대 지정한 마린 3마리의 이름을 출력한다 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace starcraft { class Program { static void Main(string[] args) { Marine marine1 = new Marine("홍길동"); Marine marine2 = new Marine("철수철수"); Marine marine3 = n..

Q1. item --- name --- Item item1 = new Item("장검") COnsole.WriteLine(item1.name); //장검 A1. Program using System; namespace _1229class { class Program { static void Main(string[] args) { Item item1 = new Item("장검"); Console.WriteLine(item1.name); //아이템 '장검' 생성 되었습니다. } } } Item using System; using System.Collections.Generic; using System.Text; namespace _1229class { class Item { public string name..