/// <summary> /// Aloittaa siirtymän toiston. /// </summary> public void StartTransition() { if (transition == null) { transition = new StateTransition(nextMapState, currentMapState); transition.OnFinished += new StateTransitionEventHandler(transition_OnFinished); transition.Start(); if (OnTransitionStart != null) { OnTransitionStart(this, new MapStateManagerEventArgs(currentMapState, nextMapState)); } currentMapState.ClearPowerUps(); } }
private void transition_OnFinished(object sender, StateTransitionEventArgs e) { transition = null; ChangeNextState(); if (OnTransitionFinished != null) { OnTransitionFinished(this, new MapStateManagerEventArgs(currentMapState, null)); } }