예제 #1
0
        public override ScreenType Run(Time dt)
        {
            NextScreen = base.Run(dt);

            NextScreen = ScreenType.LoginScreen;

            return NextScreen;
        }
예제 #2
0
        public override ScreenType Run(Time dt)
        {
            UpdateView(dt);

            Map.Update(dt);
            Map.Draw(Window);

            return base.Run(dt);
        }
예제 #3
0
        public override ScreenType Run(Time dt)
        {
            NextScreen = base.Run(dt);

              //  NextScreen = ScreenType.MainTitleScreen;
              //  GameSession.Instance.Init(true);

            return NextScreen;
        }
예제 #4
0
파일: PTimer.cs 프로젝트: eickegao/Blazera
 public void Update(Time dt)
 {
     Dt += dt.Value;
     if (Dt > Period)
     {
         Dt -= Period;
         Action.Invoke();
     }
 }
예제 #5
0
파일: CombatMap.cs 프로젝트: jpx/blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            Combat.Update(dt);
        }
예제 #6
0
파일: MapBox.cs 프로젝트: eickegao/Blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (Map == null || !GetMapIsUpdated())
                return;

            Map.Update(dt);

            GameRoot.MoveGameView(ViewMove);

            ViewMove = new Vector2f();

            Inputs.Instance.UpdateState();
        }
예제 #7
0
        public Boolean Update(Time dt)
        {
            // FPS.Update(dt);

            Inputs.Instance.UpdateState();

            Window.DispatchEvents();
            Window.Clear();

            Screens.Current = Screens.GetCurrent().Run(dt);

            Window.Display();

            IsRunning = Window.IsOpened();
            return IsRunning;
        }
예제 #8
0
파일: Menu.cs 프로젝트: eickegao/Blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (MenuItems.Count == 0)
            {
                ShowCursor(false);
                return;
            }

            if (Alignment == Alignment.Vertical)
            {
                Cursor.Dimension += new Vector2f(
                    (GetCurrentItem().BackgroundDimension.X - Cursor.BackgroundDimension.X) / CURSOR_VELOCITY * (float)dt.MS,
                    (GetCurrentItem().BackgroundDimension.Y - Cursor.BackgroundDimension.Y) / CURSOR_VELOCITY * (float)dt.MS);

                Cursor.Center += new Vector2f(
                    GetCurrentItem().Center.X - Cursor.Center.X,
                    (GetCurrentItem().Center.Y - Cursor.Center.Y) / CURSOR_VELOCITY * (float)dt.MS);
            }
            else
            {
                Cursor.Dimension += new Vector2f(
                    (GetCurrentItem().BackgroundDimension.X - Cursor.BackgroundDimension.X) / CURSOR_VELOCITY * (float)dt.MS,
                    (GetCurrentItem().BackgroundDimension.Y - Cursor.BackgroundDimension.Y) / CURSOR_VELOCITY * (float)dt.MS);

                Cursor.Center += new Vector2f(
                    (GetCurrentItem().Center.X - Cursor.Center.X) / CURSOR_VELOCITY * (float)dt.MS,
                    GetCurrentItem().Center.Y - Cursor.Center.Y);
            }

            if (!IsEnabled)
                return;

            if (Alignment == BlazeraLib.Alignment.Vertical)
            {
                if (Inputs.IsGameInput(DEFAULT_VERTICAL_MENU_DOWN_INPUT_TYPE, SWITCHING_RELASED_MODE, SWITCHING_DEFAULT_DELAY, true, true))
                {
                    Down();
                }

                if (Inputs.IsGameInput(DEFAULT_VERTICAL_MENU_UP_INPUT_TYPE, SWITCHING_RELASED_MODE, SWITCHING_DEFAULT_DELAY, true, true))
                {
                    Up();
                }
            }
            else
            {
                if (Inputs.IsGameInput(DEFAULT_HORIZONTAL_MENU_RIGHT_INPUT_TYPE, SWITCHING_RELASED_MODE, SWITCHING_DEFAULT_DELAY, true, true))
                {
                    Down();
                }

                if (Inputs.IsGameInput(DEFAULT_HORIZONTAL_MENU_LEFT_INPUT_TYPE, SWITCHING_RELASED_MODE, SWITCHING_DEFAULT_DELAY, true, true))
                {
                    Up();
                }
            }
        }
예제 #9
0
파일: TextBox.cs 프로젝트: eickegao/Blazera
        public override void Update(Time dt)
        {
            BackHappened = false;

            base.Update(dt);
        }
예제 #10
0
 public override void Update(Time dt)
 {
     Effect.Update(dt);
 }
예제 #11
0
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (ValueIsModified)
            {
                AdjustValue();
                ValueIsModified = false;
            }
        }
예제 #12
0
파일: SkinSet.cs 프로젝트: jpx/blazera
 public override void Update(Time dt)
 {
     if (CurrentSkin != null)
         CurrentSkin.Update(dt);
 }
예제 #13
0
            public void Update(Time dt)
            {
                if (PointIsReached)
                {
                    if (!InitNextMove() &&
                        !InitNextPoint())
                    {
                        if (Combatant.IsMoving())
                            Combatant.CallOnMoveEnding();

                        Combatant.State = CombatantState.Normal;
                        return;
                    }
                }

                Vector2f move = BlazeraLib.Map.GetMove(CurrentDirection, DEFAULT_VELOCITY, dt);

                switch (CurrentDirection)
                {
                    case Direction.N:

                        if (Combatant.GetBasePosition().Y + move.Y > CurrentGoalPoint.Y)
                        {
                            Combatant.Position += move;
                            return;
                        }

                        break;

                    case Direction.E:

                        if (Combatant.GetBasePosition().X + move.X < CurrentGoalPoint.X)
                        {
                            Combatant.Position += move;
                            return;
                        }

                        break;

                    case Direction.S:

                        if (Combatant.GetBasePosition().Y + move.Y < CurrentGoalPoint.Y)
                        {
                            Combatant.Position += move;
                            return;
                        }

                        break;

                    case Direction.O:

                        if (Combatant.GetBasePosition().X + move.X > CurrentGoalPoint.X)
                        {
                            Combatant.Position += move;
                            return;
                        }

                        break;
                }

                Combatant.SetBasePoint(CurrentGoalPoint);
                PointIsReached = true;
                Combatant.CellPosition = CurrentGoal;
            }
예제 #14
0
        public void Update(Time dt)
        {
            MoveInfo.Update(dt);

            GetCurrentAnimation().Update(dt);
        }
예제 #15
0
파일: Cell.cs 프로젝트: jpx/blazera
 public void Update(Time dt)
 {
 }
예제 #16
0
파일: MapBox.cs 프로젝트: eickegao/Blazera
        Vector2f GetViewMove(Time dt, Player player)
        {
            float moveX = 0.0f;
            float moveY = 0.0f;

            if (player == null)
            {
                return new Vector2f(moveX, moveY);
            }

            Vector2f p = player.Center;

            if (Math.Abs(p.X - GameRoot.MapView.Center.X) > VIEW_MOVE_TRIGGER_LIMIT * (GameData.WINDOW_HEIGHT / GameData.WINDOW_WIDTH))
                moveX = player.Velocity * (p.X - GameRoot.MapView.Center.X) / 50f * GameData.WINDOW_WIDTH / GameData.WINDOW_HEIGHT * (float)dt.Value;
            if (Math.Abs(p.Y - GameRoot.MapView.Center.Y) > VIEW_MOVE_TRIGGER_LIMIT * (GameData.WINDOW_WIDTH / GameData.WINDOW_HEIGHT))
                moveY = player.Velocity * (p.Y - GameRoot.MapView.Center.Y) / 50f * GameData.WINDOW_HEIGHT / GameData.WINDOW_WIDTH * (float)dt.Value;

            /*if (Math.Abs(moveX) < VIEW_MOVE_MINOR_LIMIT)
                moveX = p.X - Gui.MapView.Center.X;

            if (Math.Abs(moveY) < VIEW_MOVE_MINOR_LIMIT)
                moveY = p.Y - Gui.MapView.Center.Y;*/

            if (GameRoot.MapView.Center.X - GameRoot.MapView.Size.X / 2 + moveX < 0F)
            {
                GameRoot.MapView.Center = new Vector2f(0F, GameRoot.MapView.Center.Y) + new Vector2f(GameRoot.MapView.Size.X / 2F, 0F);
                moveX = 0.0f;
            }

            if (GameRoot.MapView.Center.X - GameRoot.MapView.Size.X / 2 + GameRoot.MapView.Size.X + moveX >= Map.Dimension.X)
            {
                GameRoot.MapView.Center = new Vector2f(Map.Dimension.X, GameRoot.MapView.Center.Y) - new Vector2f(GameRoot.MapView.Size.X / 2F, 0F);
                moveX = 0.0f;
            }

            if (GameRoot.MapView.Center.Y - GameRoot.MapView.Size.Y / 2 + moveY < 0F)
            {
                GameRoot.MapView.Center = new Vector2f(GameRoot.MapView.Center.X, 0F) + new Vector2f(0F, GameRoot.MapView.Size.Y / 2F);
                moveY = 0.0f;
            }

            if (GameRoot.MapView.Center.Y - GameRoot.MapView.Size.Y / 2 + GameRoot.MapView.Size.Y + moveY >= Map.Dimension.Y)
            {
                GameRoot.MapView.Center = new Vector2f(GameRoot.MapView.Center.X, Map.Dimension.Y) - new Vector2f(0F, GameRoot.MapView.Size.Y / 2F); ;
                moveY = 0.0f;
            }

            return new Vector2f(moveX, moveY);
        }
예제 #17
0
파일: MapBox.cs 프로젝트: eickegao/Blazera
 public void UpdateLockedViewMove(Time dt, Player player)
 {
     ViewMove = GetViewMove(dt, player);
 }
예제 #18
0
파일: SWorld.cs 프로젝트: eickegao/Blazera
 public override void Update(Time dt)
 {
     foreach (SMap map in Maps.Values)
         map.Update(dt);
 }
예제 #19
0
        public override ScreenType Run(Time dt)
        {
            foreach (ParticleEffect pe in effects)
            {
                pe.Update(dt);
                pe.Draw(Window);
            }

               // Window.Draw(spre);

            NextScreen = base.Run(dt);

               // NextScreen = ScreenType.GameScreen;

            return NextScreen;
        }
예제 #20
0
        public override void Update(Time dt)
        {
            base.Update(dt);

            Cursor.Center += new Vector2f(
                (((CellPosition.ToVector2() + new Vector2f(.5F, 0F)) * (int)CombatMap.CELL_SIZE).X - Cursor.Center.X) / TRANSITION_VELOCITY * (float)dt.MS,
                (((CellPosition.ToVector2() + new Vector2f(0F, .5F)) * (int)CombatMap.CELL_SIZE).Y - Cursor.Center.Y) / TRANSITION_VELOCITY * (float)dt.MS);

            if (!IsEnabled)
                return;

            FastCursorMode = Inputs.IsGameInput(InputType.Misc, false);
            double cursorMoveDelay = FastCursorMode ? FAST_CURSOR_MOVE_DELAY : CRUSOR_MOVE_DELAY;

            if (Inputs.IsGameInput(InputType.Left, false, cursorMoveDelay))
                Move(new Vector2I(-MOVE_CELL_OFFSET, 0));
            else if (Inputs.IsGameInput(InputType.Up, false, cursorMoveDelay))
                Move(new Vector2I(0, -MOVE_CELL_OFFSET));
            else if (Inputs.IsGameInput(InputType.Right, false, cursorMoveDelay))
                Move(new Vector2I(MOVE_CELL_OFFSET, 0));
            else if (Inputs.IsGameInput(InputType.Down, false, cursorMoveDelay))
                Move(new Vector2I(0, MOVE_CELL_OFFSET));
        }
예제 #21
0
파일: Combat.cs 프로젝트: eickegao/Blazera
        public void Update(Time dt)
        {
            foreach (BaseCombatant combatant in Combatants)
                combatant.Update(dt);

            GetCurrentPhase().Perform();
        }
예제 #22
0
        /// <summary>
        /// Updates the object
        /// </summary>
        /// <param name="dt">Delay since last update</param>
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (!IsPlaying)
                return;

            double letterDelay = Inputs.IsGameInput(InputType.Action) ? LETTER_DELAY / LETTER_DELAY_SPEED_FACTOR : LETTER_DELAY;
            UInt32 delayCount = LetterTimer.GetDelayFactor(letterDelay);
            for (UInt32 count = 0; count < delayCount; ++count)
                NextLetter();
        }
예제 #23
0
파일: EffectSkin.cs 프로젝트: jpx/blazera
        public override void Update(Time dt)
        {
            if (!IsStarted)
                return;

            bool moveIsComplete = Math.Abs(Offset.X) >= OffsetLimit.X && Math.Abs(Offset.Y) >= OffsetLimit.Y;
            bool scaleIsComplete = Math.Abs(Scale.X) >= ScaleLimit.X && Math.Abs(Scale.Y) >= ScaleLimit.Y;
            bool alphaIsComplete = Math.Abs(Alpha) >= AlphaLimit;

            if (moveIsComplete && scaleIsComplete && alphaIsComplete)
            {
                Stop();
                return;
            }

            Skin.Update(dt);

            if (!moveIsComplete)
            {
                Offset += MoveFactor * (float)dt.Value;
                Skin.Position = Position + Offset;
            }
            if (!scaleIsComplete)
            {
                Scale += ScaleFactor * (float)dt.Value;
                Skin.Dimension = BaseSkin.Dimension + new Vector2f(BaseSkin.Dimension.X * Scale.X, BaseSkin.Dimension.Y * Scale.Y);
                Skin.BasePoint = Skin.Center;
            }
            if (!alphaIsComplete)
            {
                Alpha += AlphaFactor * (float)dt.Value;
                Skin.SetAlpha(BaseSkin.Color.A + Alpha);
            }
        }
예제 #24
0
파일: Tile.cs 프로젝트: eickegao/Blazera
 public virtual void Update(Time dt)
 {
 }
예제 #25
0
        public void Run(Time dt)
        {
            Window.SetView(GuiView);

            Gui.Update(dt);
            Gui.Draw(Window);

            while (WindowEvents.EventHappened())
            {
                BlzEvent evt = new BlzEvent(WindowEvents.GetEvent());

                GameScoring.EventCount++;

                if (HandleEvent(evt))
                {
                    GameScoring.EventHandled++;
                }
            }
        }
예제 #26
0
파일: TextList.cs 프로젝트: jpx/blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (!CursorMode)
                return;

            if (Current == null)
                return;

            Cursor.Dimension += new Vector2f(
                (Current.Dimension.X - Cursor.Dimension.X) / CURSOR_VELOCITY * (float)dt.MS,
                (Current.Dimension.Y - Cursor.Dimension.Y) / CURSOR_VELOCITY * (float)dt.MS);

            Cursor.Position += new Vector2f(
                Current.Position.X - Cursor.Position.X,
                (Current.Center.Y - Cursor.Center.Y) / CURSOR_VELOCITY * (float)dt.MS);
        }
예제 #27
0
        public override void Update(Time dt)
        {
            if (!IsPlaying)
                return;

            double period = 1D / FrameRate;

            if (!Timer.IsDelayCompleted(period))
                return;

            NextFrame();
        }
예제 #28
0
파일: Pencil.cs 프로젝트: jpx/blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            Cursor.Center = GetLockedPosition(((EditorBaseWidget)Root).GetMousePosition());
        }
예제 #29
0
파일: CWorld.cs 프로젝트: eickegao/Blazera
        public override void Update(Time dt)
        {
            base.Update(dt);

            if (CurrentMap == null)
                return;

            CurrentMap.Update(dt);
        }
예제 #30
0
 public abstract void Update(Time dt);