当前位置: 首页>>代码示例>>C#>>正文


C# PlayerIndex.ToString方法代码示例

本文整理汇总了C#中PlayerIndex.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerIndex.ToString方法的具体用法?C# PlayerIndex.ToString怎么用?C# PlayerIndex.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PlayerIndex的用法示例。


在下文中一共展示了PlayerIndex.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: XInputPad

 public XInputPad(PlayerIndex number)
 {
     padNumber = number;
     if (!XPad.GetState(number).IsConnected)
     {
         throw new NoDeviceException("XInputパッド" + number.ToString() + "は接続されていない");
     }
     Config = PadConfig.GetDefault();
 }
开发者ID:MasakiMuto,项目名称:MasaLibs,代码行数:9,代码来源:XInputPad.cs

示例2: PlayerScoreDisplay

 public PlayerScoreDisplay(EasyTopDownGame game, PlayerIndex playerIndex, string fontName)
     : base(game, fontName)
 {
     Name = "Player " + playerIndex.ToString();
     Score = 0;
     Scale = 1.0f;
     SecondsToLive = -1;
     LayerDepth = LayerDepths.Front;
 }
开发者ID:pinh3ad,项目名称:EasyXNA,代码行数:9,代码来源:PlayerScoreDisplay.cs

示例3: GetMap

        public Buttons? GetMap(string mapName, PlayerIndex player)
        {
            if (string.IsNullOrEmpty(mapName))
                throw new GamepadManagerException("map name is null or empty!");

            GamepadMap map = _maps.FirstOrDefault(x => x.Player == player && string.Equals(x.Name, mapName));
            if (map == null)
                throw new GamepadManagerException(string.Format("the map \"{0}\" is not registered for player \"{1}\"!", mapName, player.ToString()));

            return map.Button;
        }
开发者ID:gabry90,项目名称:BIOXFramework,代码行数:11,代码来源:GamepadManager.cs

示例4: InitialsOf

        public static string InitialsOf(PlayerIndex index)
        {
            #if WINDOWS
            StreamReader reader = new StreamReader(OptionsMenuScreen.FolderPath + "/initials.txt");
            #endif
            #if XBOX
            StreamReader reader = new StreamReader(StorageHelper.OpenFile("initials.txt", FileMode.Open));
            #endif
            string toReturn = "";
            while (reader.ReadLine() != "[" + index.ToString() + "]")
            {
            }
            toReturn = reader.ReadLine();
            reader.Close();

            return toReturn;
        }
开发者ID:LostCodeStudios,项目名称:SpaceHordes,代码行数:17,代码来源:InitialEntryScreen.cs

示例5: HandleGuide

 /// <summary>
 /// Begins showing the on-screen keyboard for text input via gamepad.
 /// </summary>
 /// <param name="pi"></param>
 private void HandleGuide(PlayerIndex pi)
 {
     if (Manager.UseGuide && !Guide.IsVisible)
     {
         Guide.BeginShowKeyboardInput(pi, "Enter Text", "", Text, GetText, pi.ToString());
     }
 }
开发者ID:Rfvgyhn,项目名称:Neoforce,代码行数:11,代码来源:TextBox.cs

示例6: displayName

 public String displayName(PlayerIndex player)
 {
     if (gamertag(player) != null)
         return gamertag(player);
     else return player.ToString();
 }
开发者ID:spdemille,项目名称:Baffled,代码行数:6,代码来源:HUD.cs

示例7: Register

        public void Register(string mapName, Buttons? button, PlayerIndex player)
        {
            if (string.IsNullOrEmpty(mapName))
                throw new GamepadManagerException("map name is null or empty!");

            if (_maps.FirstOrDefault(x => string.Equals(x.Name, mapName)) != null)
                throw new GamepadManagerException(string.Format("the map \"{0}\" is already registered!", mapName));

            if (_maps.FirstOrDefault(x => x.Player == player && string.Equals(x.Button, button)) != null)
                throw new GamepadManagerException(string.Format("the button \"{0}\" is already registered in \"{1}\" map for player \"{2}\"!", button.ToString(), mapName, player.ToString()));

            lock (_maps) { _maps.Add(new GamepadMap { Name = mapName, Button = button, Player = player }); }
        }
开发者ID:gabry90,项目名称:BIOXFramework,代码行数:13,代码来源:GamepadManager.cs

示例8: Unregister

        public void Unregister(string mapName, PlayerIndex player)
        {
            if (string.IsNullOrEmpty(mapName))
                throw new GamepadManagerException("map name is null or empty!");

            GamepadMap map = _maps.FirstOrDefault(x => x.Player == player && string.Equals(x.Name, mapName));
            if (map == null)
                throw new GamepadManagerException(string.Format("the map \"{0}\" is not registered for player \"{1}\"!", mapName, player.ToString()));

            lock (_maps) { _maps.Remove(map); }
        }
开发者ID:gabry90,项目名称:BIOXFramework,代码行数:11,代码来源:GamepadManager.cs

示例9: DisplayName

 string DisplayName(PlayerIndex player)
 {
     if (GetGamerTag(player) != null)
         return GetGamerTag(player);
     else
         return "Player " + player.ToString();
 }
开发者ID:MarcusKhoo,项目名称:FlightOfGlory,代码行数:7,代码来源:HUD.cs


注:本文中的PlayerIndex.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。