예제 #1
0
    void DoAnim(BackgroundPlaneAnim activeBack, bool withAlpha = true)
    {
        Action<BackgroundPlaneAnim> onAnimFinish = (bp) =>
        {
            bp.FadeOut();
            this.SwapBacksPositions();
            this.SetNextTextureIndex();
            BackgroundPlaneAnim newBp = this.GetNextActiveBack(bp);
            this.DoAnim(newBp);
        };

        activeBack.SetTexture(this._textures[this._currentTextureIndex]);
        activeBack.DoAnim(withAlpha, onAnimFinish);
    }
예제 #2
0
 BackgroundPlaneAnim GetNextActiveBack(BackgroundPlaneAnim bp)
 {
     return bp == this.back1 ? this.back2 : this.back1;
 }