26 lines
909 B
C#
26 lines
909 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using ZXK.Framework;
|
|
/*******************************************************************************
|
|
*Create By CG
|
|
*Function ¹¤¾ßÃæ°å¿ØÖÆ
|
|
*******************************************************************************/
|
|
namespace ZXK.BYSS
|
|
{
|
|
public class ToolsPanel : UIBase
|
|
{
|
|
public void Init(string[] tools)
|
|
{
|
|
Transform toolItemParent = GetWedage("Content_N").transform;
|
|
ToolItemPrefab toolItemPrefab = toolItemParent.GetComponentInChildren<ToolItemPrefab>(true);
|
|
|
|
for (int i = 0; i < tools.Length; i++)
|
|
{
|
|
GameObject toolitem = Instantiate(toolItemPrefab.gameObject, toolItemParent);
|
|
toolitem.GetComponent<ToolItemPrefab>().Init(tools[i]);
|
|
toolitem.SetActive(true);
|
|
}
|
|
}
|
|
}
|
|
} |