本文整理汇总了C#中AnimatedSprite.Load方法的典型用法代码示例。如果您正苦于以下问题:C# AnimatedSprite.Load方法的具体用法?C# AnimatedSprite.Load怎么用?C# AnimatedSprite.Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnimatedSprite
的用法示例。
在下文中一共展示了AnimatedSprite.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAnimation
/// <summary>
/// Returns the proper animation for the given tile
/// </summary>
/// <param name="name">Name of the tile that needs to be animated</param>
/// <returns></returns>
private AnimatedSprite GetAnimation(string name)
{
string concatName = name.Substring(name.LastIndexOf('\\') + 1);
AnimatedSprite newAnimation = new AnimatedSprite();
wallEngine.colorScheme = concatName;
switch (concatName)
{
case "Green":
if(mUseVert)
newAnimation.Load(mContent, "GreenVert", 4, 0.15f);
else newAnimation.Load(mContent, "GreenHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "Pink":
if(mUseVert)
newAnimation.Load(mContent, "PinkVert", 4, 0.15f);
else newAnimation.Load(mContent, "PinkHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "Blue":
if(mUseVert)
newAnimation.Load(mContent, "BlueVert", 4, 0.15f);
else newAnimation.Load(mContent, "BlueHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "Yellow":
if(mUseVert)
newAnimation.Load(mContent, "YellowVert", 4, 0.15f);
else newAnimation.Load(mContent, "YellowHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "Purple":
if(mUseVert)
newAnimation.Load(mContent, "PurpleVert", 4, 0.15f);
else newAnimation.Load(mContent, "PurpleHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "Orange":
if(mUseVert)
newAnimation.Load(mContent, "OrangeVert", 4, 0.15f);
else newAnimation.Load(mContent, "OrangeHor", 4, 0.15f);
mUseVert = !mUseVert;
break;
case "GreenDiamond":
newAnimation.Load(mContent, "GreenDiamond", 3, 0.225f);
break;
case "BlueDiamond":
newAnimation.Load(mContent, "BlueDiamond", 3, 0.225f);
break;
case "OrangeDiamond":
newAnimation.Load(mContent, "OrangeDiamond", 3, 0.225f);
break;
case "PinkDiamond":
newAnimation.Load(mContent, "PinkDiamond", 3, 0.225f);
break;
case "PurpleDiamond":
newAnimation.Load(mContent, "PurpleDiamond", 3, 0.225f);
break;
case "YellowDiamond":
newAnimation.Load(mContent, "YellowDiamond", 3, 0.225f);
break;
case "BlueGem":
newAnimation.Load(mContent, "BlueGem", 6, 0.15f);
break;
case "OrangeGem":
newAnimation.Load(mContent, "OrangeGem", 6, 0.15f);
break;
case "PinkGem":
newAnimation.Load(mContent, "PinkGem", 6, 0.15f);
break;
case "PurpleGem":
newAnimation.Load(mContent, "PurpleGem", 6, 0.15f);
break;
case "GreenGem":
newAnimation.Load(mContent, "GreenGem", 6, 0.15f);
break;
case "YellowGem":
newAnimation.Load(mContent, "YellowGem", 6, 0.15f);
break;
default:
newAnimation.Load(mContent, "NoAnimation", 1, 0.5f);
break;
}
return newAnimation;
}