コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }