示例#1
0
 public MessageBox(ScreenState screenState, TimedDialogue message, int timeout)
     : base(0, 0, 0, 0)
 {
     ScreenState = screenState;
     Message = message;
     Timer = new Timer(timeout);
 }
示例#2
0
        protected BattleIcon(StateOfBattle battle, Combatant receiver)
        {
            X = receiver.X;
            Y = receiver.Y;

            Color = Colors.WHITE;
            AnimationTimer = new Timer(ANIMATION_DURATION);
        }
示例#3
0
            public InitialState(Game game, Color splashScreenColor)
                : base(game)
            {
                _timer = new Time.Timer(2000);

                Color fullcolor = splashScreenColor;

                r = fullcolor.R;
                g = fullcolor.G;
                b = fullcolor.B;
            }
示例#4
0
        /// <summary>
        /// Tests the given timer. Must have not been started.
        /// </summary>
        private void TestTimer(Timer timer)
        {
            long elapsed1, elapsed2;

            int halfWait = (int)(timer.Timeout / 2);

            Assert.AreEqual(timer.TotalMilliseconds, 0);
            Assert.IsFalse(timer.IsUp);

            timer.Unpause();

            SystemThread.Sleep(halfWait);
            Assert.IsFalse(timer.IsUp);
            SystemThread.Sleep(halfWait);
            Assert.IsTrue(timer.IsUp);
            Assert.IsTrue(timer.TotalMilliseconds >= timer.Timeout);

            timer.Reset();
            Assert.IsFalse(timer.IsUp);
            SystemThread.Sleep(halfWait);
            Assert.IsFalse(timer.IsUp);
            SystemThread.Sleep(halfWait);
            Assert.IsTrue(timer.IsUp);

            timer.Reset(false);
            Assert.AreEqual(timer.TotalMilliseconds, 0);
        }
示例#5
0
        public void Show()
        {
            AnimationTimer = new Timer(State.PostBattleState.MS_PER_BAR_FILL / 3);

            Visible = true;
        }
示例#6
0
            public InitialState(Game game, Color splashScreenColor)
                : base(game)
            {
                _timer = new Time.Timer(2000);

                Color fullcolor = splashScreenColor;

                r = fullcolor.R;
                g = fullcolor.G;
                b = fullcolor.B;
            }
示例#7
0
        public void Show(List<MateriaOrb> materiaList)
        {
            MateriaList = materiaList;

            AnimationTimer = new Timer(MillisecondsPerMateria * materiaList.Count);

            Visible = true;
        }