728x90
unreal script 에서 여기저기 쓰이는 state 에 대하여-
예제 소스
class SampleState extends Actor; //auto state SampleState << 디폴트 state SampleState { //ignores SetHolder; function foo() { GotoState(''); } function BeginState(Name PreviousStateName) { if(false) { SetTimer(2.0, false); // Set a timer to keep checking for replicated variables. SetTimer(0.05, true, 'NameTimer'); } } function EndState(Name NextStateName) { if(false) ClearTimer('NameTimer'); } event PushedState() { //Super(SampleState).PushedState(); } event PoppedState() { } event bool InputKey( int ControllerId, name Key, EInputEvent Event, float AmountDepressed = 1.f ) { } function Tick(float DeltaTime) { } event Timer() { } Begin: while(false) { if(false) PushState('statename'); } //Sleep(0.2); PopState(); // return to the previous state Test: //StopThisState(); //NestedPopState(); //Stop(); } state SampleState_ex extends SampleState { Begin: GotoState('SampleState', 'Begin'); } // function foo() { if(GetStateName() == 'name') if(IsInState('name')) { } }
728x90
'프로그래밍 > Unreal Engine 3' 카테고리의 다른 글
AnimTree > AnimNodeBlend (0) | 2011.12.15 |
---|---|
FootPlacement (0) | 2011.12.14 |
Camera & Input (0) | 2011.12.03 |
TerrainLayer & TerrainMaterial (0) | 2011.11.29 |
기본적인 머테리얼 사용 (0) | 2011.11.27 |
댓글