Unity3D
Timer()함수를 대신하는 Invoke()함수
blueasa
2012. 11. 5. 16:10
유니티엔진에서 일반적인 Timer()함수 대신에
MonoBehaviour 가 제공하는Invoke() 함수가 있다.
아래 함수들을 참조할 것
Invoke(methodName:string, time:float)
methodName 메소드를 time 초 후 호출합니다.
InvokeRepeating(methodName:string, time:float, repeatRate:float)
methodName 메소드를 time 초 후 호출합니다.
첫 호출 후 repeatRate 초 마다 반복 호출합니다.
CancelInvoke()
이 스크립트에 있는 모든 Invoke 를 취소합니다.
CancelInvoke(methodName:string)
이 스크립트에 있는 methodName 을 호출하는 모든 Invoke 를 취소합니다.
출처 : http://blog.naver.com/limik94/20127438317
반응형