Пример #1
0
        public PlayerNotifiers(GameLogic.Player player)
        {
            this.Player = player;
            List <PlayerAugmentation> list = GameLogic.Binder.PlayerAugmentationResources.getOrderedList();

            for (int i = 0; i < list.Count; i++)
            {
                this.m_inspectedAugNotifiers.Add(list[i], false);
            }
            this.refreshAugShopInspectedFlag();
        }
Пример #2
0
        public static float Progress_BeatBoss(GameLogic.Player player, string id, int tier, out double current, out double required)
        {
            int num = player.getHighestFloorReached();

            required = ConfigAchievements.SHARED_DATA[id].TierRequirements[tier];
            if (num > required)
            {
                current = required;
            }
            else
            {
                current = 0.0;
            }
            return(Mathf.Clamp01((float)(current / required)));
        }
Пример #3
0
    private void Start_Game()
    {
        current_player = GameLogic.Player.circle;
        for (int row = 0; row < game_logic.NumRow; row++)
        {
            for (int col = 0; col < game_logic.NumCol; col++)
            {
                int current_row = row;
                int current_col = col;

                UnityAction button_register = () =>
                {
                    Game_Play(current_row, current_col);
                };

                view.RegisterButtonListener(row, col, button_register);
            }
        }
    }
Пример #4
0
    private void Game_Play(int row, int col)
    {
        if (game_over_flag)
        {
            game_logic.Restart();
            current_player = GameLogic.Player.circle;
            game_over_flag = false;
            game_result    = new GameLogic.GameResult();

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    view.Draw_Move(i, j, 0);
                }
            }

            view.Clear_GameOver();
        }

        else
        {
            if (game_logic.Make_Move(current_player, row, col) && !(game_over_flag))
            {
                view.Draw_Move(row, col, (int)current_player);
                game_result    = game_logic.Check_Game_Over();
                current_player = (GameLogic.Player)(-(int)current_player);
            }

            if (game_result.Is_Game_Over && !(game_over_flag))
            {
                PlayerViewData      player_view_data       = (PlayerViewData)((int)game_result.Winning_Player);
                WinningTypeViewData winning_type_view_data = (WinningTypeViewData)((int)game_result.Winning_Type);
                int winning_pos = game_result.Winning_Pos;

                GameResultViewData game_result_view_data = new GameResultViewData(player_view_data, winning_type_view_data, winning_pos);
                view.Draw_GameOver(game_result_view_data);
                game_over_flag = true;
            }
        }
    }
 public PlayerAllowedToDeclareMoveAttackEvent(GameLogic.Player player, bool allowed)
 {
     // TODO: Complete member initialization
     this.Player  = player;
     this.Allowed = allowed;
 }
Пример #6
0
 public static float Progress_UpgradeItems(GameLogic.Player player, string id, int tier, out double current, out double required)
 {
     current  = player.CumulativeRetiredHeroStats.ItemUpgrades + player.ActiveCharacter.HeroStats.ItemUpgrades;
     required = ConfigAchievements.SHARED_DATA[id].TierRequirements[tier];
     return(Mathf.Clamp01((float)(current / required)));
 }
Пример #7
0
 public static float Progress_RetireHero(GameLogic.Player player, string id, int tier, out double current, out double required)
 {
     current  = player.CumulativeRetiredHeroStats.HeroesRetired;
     required = ConfigAchievements.SHARED_DATA[id].TierRequirements[tier];
     return(Mathf.Clamp01((float)(current / required)));
 }