일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
Tags
- XML
- 아이튠즈
- flash builder
- Game
- 배열
- 단축키
- builder
- unity3D
- 게임
- AIR
- iphone
- Flash
- 영어
- 3d
- Ane
- path
- swf
- Mac
- Build
- file
- sdk
- texture
- Android
- ios
- smartfoxserver
- class
- 경로
- 태그를 입력해 주세요.
- AS3
- unity
Archives
- Today
- Total
상상 너머 그 무언가...
객체의 타입체크 ( type of instance ) 본문
typeof 라는 메소드가 있지만 좀더 쉽게 쓰는 방법은 is 메소드 이다.
if( _target is DisplayObject )
위와 같이 입력하면 _target 객체가 DisplayObject 인지 아닌지에 대한 true, false 값을 리턴한다.
is 메소드를 사용하면 상속받은 부모클래스로도 타입체크가 가능하다.