当前位置: 首页>>代码示例>>C#>>正文


C# TextBox.addText方法代码示例

本文整理汇总了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>();
	}
开发者ID:BoolClub,项目名称:ProjectCrusade,代码行数:27,代码来源:Chest.cs

示例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;
	}
开发者ID:BoolClub,项目名称:ProjectCrusade,代码行数:8,代码来源:FloorItem.cs

示例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);
	}
开发者ID:BoolClub,项目名称:ProjectCrusade,代码行数:13,代码来源:NPC.cs

示例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>();
	}
开发者ID:BoolClub,项目名称:ProjectCrusade,代码行数:14,代码来源:PlayerControls.cs


注:本文中的TextBox.addText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。