本文整理汇总了C#中NPC.getBubbleBorderColor方法的典型用法代码示例。如果您正苦于以下问题:C# NPC.getBubbleBorderColor方法的具体用法?C# NPC.getBubbleBorderColor怎么用?C# NPC.getBubbleBorderColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPC
的用法示例。
在下文中一共展示了NPC.getBubbleBorderColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: generateBubble
public BubbleData generateBubble(NPC cha, string text, GameObject talker = null)
{
BubbleData bubble = new BubbleData (text, new Vector2 (40, 60), new Vector2 (40, 45));
Color textColor, textOutline, background, border;
ColorUtility.TryParseHtmlString (cha.getTextFrontColor (), out textColor);
ColorUtility.TryParseHtmlString (cha.getTextBorderColor (), out textOutline);
ColorUtility.TryParseHtmlString (cha.getBubbleBkgColor (), out background);
ColorUtility.TryParseHtmlString (cha.getBubbleBorderColor (), out border);
bubble.TextColor = textColor;
bubble.TextOutlineColor = textOutline;
bubble.BaseColor = background;
bubble.OutlineColor = border;
if (talker != null) {
Vector2 position = talker.transform.localPosition;
position.y += talker.transform.localScale.y / 2;
bubble.Destiny = position;
bubble.Origin = new Vector2 (position.x, position.y - 10f);
} else {
bubble.Origin = new Vector2 (40, 60);
bubble.Destiny = new Vector2 (40, 45);
}
return bubble;
}
示例2: generateFor
public static Texture2D generateFor(NPC npc)
{
Texture2D ret;
if (npc.getShowsSpeechBubbles ()) {
ret = new Texture2D (32, 32);
Color background = Color.white;
Color border = Color.black;
ColorUtility.TryParseHtmlString (npc.getBubbleBkgColor (), out background);
ColorUtility.TryParseHtmlString (npc.getBubbleBorderColor (), out background);
BorderGenerator.Circle (ret, 16, 16, 15, border);
} else {
if (transparent == null) {
transparent = Resources.Load ("1x1") as Texture2D;
}
ret = transparent;
}
return ret;
}