コード例 #1
0
    public void AddAttribute(AttributeUI attribute)
    {
        if (attribute == null)
        {
            return;
        }

        attribute.AddAttribute();

        availableAttributePoints--;

        UpdateAvailablePoints();
    }
コード例 #2
0
	private AttributeUI spawnPrefab(AttributeUI UIElement){
		GameObject go = NGUITools.AddChild(gameObject, UIElement.gameObject);
		AttributeUI aUI = go.GetComponent<AttributeUI>();
		/*GameObject go = (GameObject)GameObject.Instantiate (UIElement.gameObject);
		AttributeUI aUI = go.GetComponent<AttributeUI>();
		go.transform.parent = this.transform;
		go.transform.localScale = Vector3.one;*/
		return aUI;
	}