예제 #1
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
 public void EnterAttackMode()
 {
     mapCursorMode    = MapCursorMode.AttackUnit;
     actionBar.Active = false;
     currentContext   = mapContext;
     selectedUnit.UpdateAttackTiles();
 }
예제 #2
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
 private void OnBackPauseMenu()
 {
     currentContext = mapContext;
     mapCursorMode  = MapCursorMode.MoveCursor;
     Game1.backSound.Play();
     pauseMenu.Active = false;
 }
예제 #3
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
        private void OnSelectUnit()
        {
            if (CursorOverUnit && hoveredUnit.active && mapCursorMode == MapCursorMode.MoveCursor)
            {
                if (hoveredUnit.team == Team.Blue)
                {
                    selectedUnit         = hoveredUnit;
                    selectionPreviousPos = hoveredUnit.Position;

                    RegisterValidMoveTiles();
                }
                else
                {
                    ToggleDangerZone(hoveredUnit);
                }
            }
            else
            {
                Game1.deniedSound.Play();
            }

            if (selectedUnit != null && selectedUnit.team == Team.Blue)
            {
                mapCursorMode = MapCursorMode.MoveUnit;
                Game1.menuSound.Play();
            }
        }
예제 #4
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
 private void OnBackActionBar()
 {
     selectedUnit.Position = selectionPreviousPos;
     Position         = selectedUnit.Position;
     currentContext   = mapContext;
     actionBar.Active = false;
     mapCursorMode    = MapCursorMode.MoveUnit;
     Game1.backSound.Play();
 }
예제 #5
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
        private void OnBackMoveUnit()
        {
            validMoveTiles.Clear();
            selectedUnit.validAttackPoints.Clear();
            selectedUnit.Position = selectionPreviousPos;
            selectedUnit          = null;
            hoveredUnit           = Game1.GetUnit(position);
            mapCursorMode         = MapCursorMode.MoveCursor;

            Game1.backSound.Play();
        }
예제 #6
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
 public void FinishSelection()
 {
     if (selectedUnit != null)
     {
         selectedUnit.validAttackPoints.Clear();
     }
     selectedUnit         = null;
     selectionPreviousPos = Position;
     currentContext       = mapContext;
     actionBar.Active     = false;
     mapCursorMode        = MapCursorMode.MoveCursor;
     validMoveTiles.Clear();
     Game1.CheckForEndTurn();
 }
예제 #7
0
파일: Cursor.cs 프로젝트: B1on1cBen/FIEG
        public Cursor(Point startingPosition, AnimatedTexture texture, Texture2D moveArrowTexture, ActionBar actionBar, PauseMenu pauseMenu)
        {
            currentContext        = mapContext;
            mapCursorMode         = MapCursorMode.MoveCursor;
            this.texture          = texture;
            this.moveArrowTexture = moveArrowTexture;
            Cursor.actionBar      = actionBar;
            Cursor.pauseMenu      = pauseMenu;

            position    = startingPosition;
            hoveredUnit = Game1.GetUnit(startingPosition);
            hoveredTile = Level.GetTile(startingPosition);

            prevKeyboardState = Keyboard.GetState();
            prevGamePadState  = GamePad.GetState(0);
        }