Ejemplo n.º 1
0
        public static ProdMapOpen Instantiate(ProdMapOpen prefab, BattleResultModel resultModel, Transform parent, KeyControl keyControl, MapManager mapManager, int nPanelDepth)
        {
            ProdMapOpen prodMapOpen = UnityEngine.Object.Instantiate(prefab);

            prodMapOpen.transform.parent        = parent;
            prodMapOpen.transform.localScale    = Vector3.one;
            prodMapOpen.transform.localPosition = Vector3.zero;
            prodMapOpen._init();
            prodMapOpen._keyControl  = keyControl;
            prodMapOpen._resultModel = resultModel;
            prodMapOpen._openMapIDs  = prodMapOpen._resultModel.NewOpenMapIDs;
            prodMapOpen._isOpenMap   = new bool[prodMapOpen._resultModel.NewOpenMapIDs.Length];
            for (int i = 0; i < prodMapOpen._resultModel.NewOpenMapIDs.Length; i++)
            {
                prodMapOpen._isOpenMap[i] = true;
            }
            for (int j = 0; j < prodMapOpen._resultModel.NewOpenMapIDs.Length; j++)
            {
                if (prodMapOpen._isOpenMap[j])
                {
                    prodMapOpen._isOpenMap[j] = false;
                    prodMapOpen.GetOpenIds(prodMapOpen._resultModel.NewOpenMapIDs[j]);
                    break;
                }
            }
            prodMapOpen.SetMapTexture();
            return(prodMapOpen);
        }
Ejemplo n.º 2
0
        public static ProdMapOpen Instantiate(ProdMapOpen prefab, int[] NewOpenAreaIDs, int[] NewOpenMapIDs, Transform parent, KeyControl keyControl, int nPanelDepth)
        {
            ProdMapOpen prodMapOpen = UnityEngine.Object.Instantiate(prefab);

            prodMapOpen.transform.parent        = parent;
            prodMapOpen.transform.localScale    = Vector3.one;
            prodMapOpen.transform.localPosition = Vector3.zero;
            prodMapOpen._init();
            prodMapOpen._keyControl = keyControl;
            prodMapOpen._openMapIDs = NewOpenMapIDs;
            prodMapOpen._isOpenMap  = new bool[NewOpenMapIDs.Length];
            for (int i = 0; i < prodMapOpen._openMapIDs.Length; i++)
            {
                prodMapOpen._isOpenMap[i] = true;
            }
            for (int j = 0; j < prodMapOpen._openMapIDs.Length; j++)
            {
                if (prodMapOpen._isOpenMap[j])
                {
                    prodMapOpen._isOpenMap[j] = false;
                    prodMapOpen.GetOpenIds(prodMapOpen._openMapIDs[j]);
                    break;
                }
            }
            prodMapOpen.SetMapTexture();
            prodMapOpen.SetActive(isActive: false);
            return(prodMapOpen);
        }
Ejemplo n.º 3
0
        public static ProdMapOpen Instantiate(ProdMapOpen prefab, int[] NewOpenAreaIDs, int[] NewOpenMapIDs, Transform parent, KeyControl keyControl, int nPanelDepth)
        {
            ProdMapOpen prodMapOpen = Object.Instantiate <ProdMapOpen>(prefab);

            prodMapOpen.get_transform().set_parent(parent);
            prodMapOpen.get_transform().set_localScale(Vector3.get_one());
            prodMapOpen.get_transform().set_localPosition(Vector3.get_zero());
            prodMapOpen._init();
            prodMapOpen._keyControl = keyControl;
            prodMapOpen._openMapIDs = NewOpenMapIDs;
            prodMapOpen._isOpenMap  = new bool[NewOpenMapIDs.Length];
            for (int i = 0; i < prodMapOpen._openMapIDs.Length; i++)
            {
                prodMapOpen._isOpenMap[i] = true;
            }
            for (int j = 0; j < prodMapOpen._openMapIDs.Length; j++)
            {
                if (prodMapOpen._isOpenMap[j])
                {
                    prodMapOpen._isOpenMap[j] = false;
                    prodMapOpen.GetOpenIds(prodMapOpen._openMapIDs[j]);
                    break;
                }
            }
            prodMapOpen.SetMapTexture();
            prodMapOpen.SetActive(false);
            return(prodMapOpen);
        }