當前位置: 首頁>>代碼示例>>C#>>正文


C# PlayerState.getWonderCards方法代碼示例

本文整理匯總了C#中SevenWondersGUI.PlayerState.getWonderCards方法的典型用法代碼示例。如果您正苦於以下問題:C# PlayerState.getWonderCards方法的具體用法?C# PlayerState.getWonderCards怎麽用?C# PlayerState.getWonderCards使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SevenWondersGUI.PlayerState的用法示例。


在下文中一共展示了PlayerState.getWonderCards方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PlayerGameBoard

        int g_index = 0;//needed to reset ZIndex to original value upon mouse events

        public PlayerGameBoard(Grid gameGrid, PlayerState p, GameState g)
        {
            player = p;
            parent = gameGrid;//only 1 child
            if (parent.Children.Count > 1)//handle the case where there is existing child when we change views
            {
                parent.Children.Remove(parent.Children[1]);
                //System.Console.WriteLine("Child Removed");
            }
            game = g;
            if (game.getAge() == 4)//game is over
            {
                ScoreWindow s = new ScoreWindow(game, parent);
                s.Show(); ;
            }

            playBoard = new Canvas();
            parent.Children.Add(playBoard);//now child[1], two children

            createCardStack("R", 179, 10, playBoard);//0-9
            createCardStack("M", 336, 10, playBoard);//10-19
            createCardStack("S", 493, 10, playBoard);//20-29
            createCardStack("Civ", 650, 10, playBoard);//30-39
            createCardStack("Com", 807, 10, playBoard);//40-49
            createCardStack("G", 964, 6, playBoard);//50-55
            createHandStack();//56-62
            updateAge(game.getAge());//63
            createWonderBoard(player.getBoard().getName());//64
            createPlayerButtons();//65-71
            createPlayerRedCircles();//72-78
            createPlayerBlueCircles();//79-85
            createMoveButtons();//86-89
            updateMoney();//90
            createWonderSpots(player.getBoard().getMaxWonderLevel());//[91-94] variable length
            createRulesButton();//variable base on above wonder
            updateWonderSpots(player.getWonderCards());
            updateHand(player.getHand());
            updateCards(player.getPlayedCards());            
        }
開發者ID:sunneh,項目名稱:7Wonders,代碼行數:41,代碼來源:PlayerGameBoard.cs


注:本文中的SevenWondersGUI.PlayerState.getWonderCards方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。