本文整理汇总了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());
}
}
示例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()));
}
}
示例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);
}