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


C# Positions.ToString方法代码示例

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


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

示例1: GetImpressionsPerCampaignCredit

		public static int GetImpressionsPerCampaignCredit(Positions position)
		{
			switch (position)
			{
				case Positions.Hotbox: return Settings.HotboxCredits;
				case Positions.Leaderboard: return Settings.LeaderboardCredits;
				case Positions.Skyscraper: return Settings.SkyscaperCredits;
				case Positions.PhotoBanner: return Settings.PhotoBannerCredits;
				case Banner.Positions.EmailBanner: return Settings.EmailBannerCredits;
				default: throw new Exception("Unexpected banner position: " + position.ToString());
			}
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:12,代码来源:Banner.cs

示例2: SetSpecialTeamPosition

        /// <summary>
        /// 
        /// </summary>
        /// <param name="team"></param>
        /// <param name="stPosition"></param>
        /// <param name="pos"></param>
        /// <param name="depth">Depth 1-based (CB1 ==> first CB)</param>
        public void SetSpecialTeamPosition(string team, SpecialTeamer stPosition, Positions pos, int depth)
        {
            int index = -1;
            int teamIndex = GetTeamIndex(team);
            int teamPlayerPointersStart = teamIndex * cTeamDiff + m49ersPlayerPointersStart;
            List<int> playerIndexes = GetPlayerIndexesForTeam(team);
            int testDepth = 0;
            string position = pos.ToString();
            for (int i = 0; i < playerIndexes.Count; i++)
            {
                if (GetPlayerPosition(playerIndexes[i]) == position)
                {
                    testDepth++;
                    if (testDepth == depth)
                    {
                        index = i;
                        break;
                    }
                }
            }

            if (index > -1)
            {
                SetByte(teamPlayerPointersStart + (int)stPosition, (byte)index);
            }
            else
            {
                throw new InvalidOperationException(string.Format("Depth {0} at position {1} does not exist", depth, pos.ToString()));
            }
        }
开发者ID:BAD-AL,项目名称:NFL2K5Tool,代码行数:37,代码来源:GamesaveTool.cs

示例3: ChangePosition

    public void ChangePosition(string character, Positions newPosition = Positions.Offscreen, Facings facing = Facings.auto, float fadeSpeed = 0, float easeSpeed = 0)
    {
        if(fadeSpeed == 0)
        {
            fadeSpeed = defaultDeltaAlpha;
        }
        if (easeSpeed == 0)
        {
            easeSpeed = defaultEasingDuration;
        }
        changingPortraits.Add(character);

        if(newPosition == Positions.Offscreen)
            fadeSpeed *= -1;

        Debug.Log( "<color=green>[Char Man]</color> Char trying to change pose:" + character + "To Position -" + newPosition.ToString());
        Debug.Assert( IsCharacter( character ), "CHRACTER IS NOT A CHARACTER" );

        characterList[character.ToLower()].SetForMovement(newPosition, facing, fadeSpeed, easeSpeed);
    }
开发者ID:CloudyIce,项目名称:violet-light,代码行数:20,代码来源:CharacterManager.cs


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