public static UICommandSurface Instantiate(UICommandSurface prefab, Transform parent, Vector3 pos, int nIndex, BattleCommand iCommand, Action onSetCommandUnit) { UICommandSurface uICommandSurface = UnityEngine.Object.Instantiate(prefab); uICommandSurface.transform.parent = parent; uICommandSurface.transform.localScale = uICommandSurface._vReductionSize; uICommandSurface.transform.localPosition = pos; uICommandSurface.Init(nIndex, iCommand, onSetCommandUnit); return(uICommandSurface); }
public static UICommandSurface Instantiate(UICommandSurface prefab, Transform parent, Vector3 pos, int nIndex, BattleCommand iCommand, Action onSetCommandUnit) { UICommandSurface uICommandSurface = Object.Instantiate <UICommandSurface>(prefab); uICommandSurface.get_transform().set_parent(parent); uICommandSurface.get_transform().set_localScale(uICommandSurface._vReductionSize); uICommandSurface.get_transform().set_localPosition(pos); uICommandSurface.Init(nIndex, iCommand, onSetCommandUnit); return(uICommandSurface); }