/// <summary> /// Initialise the transitions and hook functions /// </summary> void Init() { stIn.OnTransitionEnd += SwapTransition; stOut.OnTransitionEnd += TransitionsFinished; currentTransition = stIn; }
/// <summary> /// Swap the transition from in to out (hooked onto OnTransitionEnd of the inward transition) /// </summary> /// <param name="e"></param> void SwapTransition(EventArgs e) { TransitionChange(e); currentTransition = stOut; }
/// <summary> /// Create a two way Screen Transition /// </summary> /// <param name="tilesX">Horizontal Tile Count</param> /// <param name="tilesY">Vertical Tile Count</param> /// <param name="transitionTime">Time to complete transition (one way)</param> public ScreenTransitionInOut(int tilesX, int tilesY, double transitionTime) { stIn = new ScreenTransition(tilesX, tilesY, false, transitionTime); stOut = new ScreenTransition(tilesX, tilesY, true, transitionTime); Init(); }