Пример #1
0
        private static void SellTower(Vector2D point)
        {
            var level = (GameLevel)Level.Current;

            if (level == null)
            {
                return;
            }
            level.SellTower(GameLevelExtensions.GetGridPosition(point));
        }
Пример #2
0
        public void Display(Vector2D screenPos)
        {
            var currentGameLevel = (GameLevel)Level.Current;

            if (currentGameLevel == null || currentGameLevel.IsCompleted)
            {
                return;
            }
            var gridPos = GameLevelExtensions.GetGridPosition(screenPos);

            if (!currentGameLevel.IsInsideLevelGrid(gridPos))
            {
                return;
            }
            if (!currentGameLevel.IsTileInteractable(gridPos))
            {
                DisplayCrossBillboard();
                return;
            }

            clickedPosition = gridPos;
            MoveSceneToClickedPosition(screenPos);
            Show();
        }
Пример #3
0
 private static bool IsSpecialAttackPossible(Vector2D pos)
 {
     return(Player.Current.Avatar.SpecialAttackAIsActivated ||
            Player.Current.Avatar.SpecialAttackBIsActivated &&
            Level.Current.IsInsideLevelGrid(GameLevelExtensions.GetGridPosition(pos)));
 }
Пример #4
0
 public Vector2D GetRealPosition(Vector2D point)
 {
     //return GameLevelExtensions.GetGridPosition(point) + Vector2D.Half;
     return(GetWorldCoordinates(GameLevelExtensions.GetGridPosition(point)));
 }