Пример #1
0
        public SeamlessForwardAnimation(UICreator uiCreator, int durationMilliSeconds) : base(durationMilliSeconds)
        {
            this.durationMilliSeconds = durationMilliSeconds;
            window         = Window.Instance;
            this.uiCreator = uiCreator;

            int propertyCount = 4;

            Properties = new string[propertyCount];
            DestValue  = new string[propertyCount];
            StartTime  = new int[propertyCount];
            EndTime    = new int[propertyCount];
            for (int i = 0; i < propertyCount; i++)
            {
                StartTime[i] = 200;
                EndTime[i]   = durationMilliSeconds;
            }

            Properties[0] = "SizeWidth";
            DestValue[0]  = Window.Instance.WindowSize.Width.ToString();

            Properties[1] = "SizeHeight";
            DestValue[1]  = Window.Instance.WindowSize.Height.ToString();

            Properties[2] = "PositionX";
            DestValue[2]  = "0";

            Properties[3] = "PositionY";
            DestValue[3]  = "0";

            DefaultAlphaFunction = GetSineInOut80();
        }
Пример #2
0
        void Initialize()
        {
            Window.Instance.KeyEvent       += OnKeyEvent;
            Window.Instance.BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1.0f);

            uiCreator = new UICreator(this);
            uiCreator.CreateUI();

            TransitionOptions = new TransitionOptions(GetDefaultWindow());
            TransitionOptions.EnableTransition = true;

            fAnimation = new SeamlessForwardAnimation(uiCreator, 600);
            bAnimation = new SeamlessBackwardAnimation(uiCreator, 600);
            TransitionOptions.ForwardAnimation = fAnimation;
            //TransitionOptions.BackwardAnimation = bAnimation;

            TransitionOptions.AnimationInitialized += TransitionOptions_AnimationInitialized;
            //(launchBroker as SeamlessAnimator)?.SetUICreator(uiCreator);
        }
Пример #3
0
        public SeamlessBackwardAnimation(UICreator uiCreator, int durationMilliSeconds) : base(durationMilliSeconds)
        {
            this.durationMilliSeconds = durationMilliSeconds;
            window         = Window.Instance;
            this.uiCreator = uiCreator;

            int propertyCount = 4;

            Properties = new string[propertyCount];
            DestValue  = new string[propertyCount];
            StartTime  = new int[propertyCount];
            EndTime    = new int[propertyCount];
            for (int i = 0; i < propertyCount; i++)
            {
                StartTime[i] = 200;
                EndTime[i]   = durationMilliSeconds;
            }

            DefaultAlphaFunction = GetSineInOut80();
        }