reflection
-
[C#] Reflection 기능으로 Method 다루기언어/C# 2021. 2. 19. 03:03
유니티로 게임을 만들 때 공부한 기능이기 때문에, 내용중에 오브젝트라는 개념을 포함하고 있습니다. 함수 이름을 (ballMove + 오브젝트의 번호) 로 만들었다. 오브젝트마다 각각의 함수로 실행되어야 하기 때문! void ballMove21() { this.gameObject.transform.localPosition = new Vector3(100, 300, 0); rigid.velocity = new Vector2(speed, 0); } void ballMove22() { this.gameObject.transform.localPosition = new Vector3(100, 100, 0); rigid.velocity = new Vector2(speed, 0); } void ballMove23() ..