本文整理汇总了C#中TextBox.addText方法的典型用法代码示例。如果您正苦于以下问题:C# TextBox.addText方法的具体用法?C# TextBox.addText怎么用?C# TextBox.addText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextBox
的用法示例。
在下文中一共展示了TextBox.addText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
void Start()
{
TextBox = new TextBox();
if (Randomize == true)
{
int randomIndex = UnityEngine.Random.Range(0, RandomItems.Length);
Type = RandomItems[randomIndex];
Quantity = 1;
}
temp = new Item(Type);
temp.Quantity = Quantity;
if (Quantity == 1)
{
TextBox.addText("You received " + temp.Quantity + " " + temp.Name);
}
else if (Quantity > 1)
{
TextBox.addText("You received " + temp.Quantity + " " + temp.Name + "s");
}
sRenderer = GetComponent<SpriteRenderer>();
BoxColl = GetComponent<BoxCollider2D>();
Player = GameObject.FindWithTag("Player").GetComponent<PlayerControls>();
}
示例2: Start
// Use this for initialization
void Start () {
TextBox = new TextBox();
Quantity.Value = Quantity.Random;
Item i = new Item(itm);
TextBox.addText("Press \"c\" to pick up the " + i.Name);
textboxObj = Resources.Load("TextBox") as GameObject;
}
示例3: Start
// Use this for initialization
void Start () {
TextBox = new TextBox();
foreach (string s in Speech)
{
TextBox.addText(s);
}
//Make a bigger box collider
(GetComponent(typeof(BoxCollider2D)) as BoxCollider2D).size = new Vector2(0.46f, 0.46f);
}
示例4: Start
public void Start () {
transform.position = StartPosition;
gameObject.layer = 10;
Rigid = GetComponent<Rigidbody2D>();
SpriteRender = GetComponent<SpriteRenderer>();
ladderTB = new TextBox();
ladderTB.addText("Press \"c\" to use the ladder");
textbox = Resources.Load("TextBox") as GameObject;
tbTextMesh = textbox.GetComponentInChildren<TextMesh>();
smartText = textbox.GetComponentInChildren<SmartText>();
MyBoxCollider = GetComponent<BoxCollider2D>();
GM = GameObject.Find("GameManager").GetComponent<GameManagerScript>();
inventory = this.gameObject.GetComponent<Inventory>();
}