本文整理汇总了C#中Colour.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Colour.ToString方法的具体用法?C# Colour.ToString怎么用?C# Colour.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Colour
的用法示例。
在下文中一共展示了Colour.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetColour
public void SetColour(Colour colour)
{
Colour = colour;
// This doesn't work. Not sure why
if(sprite != null)
sprite.SetSprite("ColourChanger" + colour.ToString() + "F1");
if(spriteAnimator != null)
spriteAnimator.Play("ColourChanger" + colour.ToString());
}
示例2: SetColour
private void SetColour(Colour colour)
{
if(sprite != null)
sprite.SetSprite("LineInner" + colour.ToString());
SetLayer(colour);
}
示例3: SetColour
public void SetColour(Colour colour)
{
Colour = colour;
if(sprite != null)
sprite.SetSprite("Ball" + colour.ToString());
switch(colour)
{
case Colour.Purple:
gameObject.layer = (int)Layers.PurpleBall;
break;
case Colour.Green:
gameObject.layer = (int)Layers.GreenBall;
break;
case Colour.Blue:
gameObject.layer = (int)Layers.BlueBall;
break;
default: gameObject.layer = (int)Layers.Default;
break;
}
}
示例4: ReturnsCorrectValue
public void ReturnsCorrectValue(float h, float s, float l, String expected)
{
var colour = new Colour(h, s, l);
colour.ToString().Should().Be(expected);
}
示例5: SetColour
public void SetColour(Colour colour)
{
tk2dSprite sprite = GetComponent<tk2dSprite>();
sprite.SetSprite("LauncherInner" + colour.ToString());
}
示例6: SetColour
public void SetColour(Colour colour)
{
if(sprite != null)
sprite.SetSprite("TargetHit" + colour.ToString());
}
示例7: SetColour
private void SetColour(Colour colour)
{
Colour = colour;
if(sprite != null)
sprite.SetSprite("Target" + colour.ToString());
}