Inheritance: MonoBehaviour
コード例 #1
0
ファイル: ItemBox.cs プロジェクト: melsov/MyLandz
    public static ItemBox InstantiateFromTemplate(ItemDisplayProxy itemDisplayProxy)
    {
        ItemBox itemBox = Prefabulator.CreatePrefabInstance <ItemBox>(PathMaster.ResourcesRelativeGenerateFolder, "ItemBox");

        itemBox.itemDisplayProxy = itemDisplayProxy;
        return(itemBox);
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        //Check if there is already an instance of SoundManager
        if (instance == null)
        {
            //if not, set it to this.
            instance = this;
        }
        //If instance already exists:
        else if (instance != this)
        {
            //Destroy this, this enforces our singleton pattern so there can only be one instance of SoundManager.
            Destroy(gameObject);
            BoltConsole.Write("ItemBox copy destroyed");
        }


        gamestate       = GameObject.Find("GameState(Clone)").GetComponent <NetworkGameState>();
        localPlayer     = GameObject.FindGameObjectWithTag("LocalPlayer").GetComponent <Player>();
        itemForGrabsStr = gamestate.ItemForGrabs();
        if (itemForGrabsStr != null && !itemForGrabsStr.Equals(""))
        {
            textStatus.text = yesItemHere;
            itemObjNetwork  = ItemList.instance.GetItemFromName(itemForGrabsStr);
            itemSlotButton.onClick.AddListener(() => inventory.ShowThirdPartyItemInfo(itemObjNetwork));
            itemForGrabsImage.sprite  = itemObjNetwork.sprite;
            itemForGrabsImage.enabled = true;
        }
        else
        {
            textStatus.text = noItemHere;
        }
    }
コード例 #3
0
    /// <summary>
    /// Remove both the display and the GameObject of the item.
    /// </summary>
    /// <param name="item">The item to remove.</param>
    public void Remove(Item item)
    {
        ItemBox boxToRemove = null;

        foreach (var box in itemBoxs)
        {
            if (box.item == item)
            {
                Destroy(box.gameObject);
                boxToRemove = box;
            }
        }
        if (boxToRemove)
        {
            itemBoxs.Remove(boxToRemove);
        }
        for (int i = 0; i < elementContainer.transform.childCount; i++)
        {
            GameObject child = elementContainer.transform.GetChild(i).gameObject;
            if (child.GetComponent <ItemBox>().item == item)
            {
                Destroy(child.GetComponent <ItemBox>().gameObject);
            }
        }

        StartCoroutine(DelayedDestroyItem(300, item));
        //Destroy(item.gameObject);
    }
コード例 #4
0
    public bool Restore(string filePath, GameObject gameObject)
    {
        if (!Caches.ContainsKey(filePath))
        {
            Debug.LogError("Restore Error! no Cache generated! filePath = " + filePath);
            return(false);
        }

        gameObject.SetActive(false);

        if (((FWNetworkManager)FWNetworkManager.singleton).isServer)
        {
            Enemy enemy = gameObject.GetComponent <Enemy>();
            if (enemy != null)
            {
                enemy.RpcSetActive(false);
            }

            Bullet bullet = gameObject.GetComponent <Bullet>();
            if (bullet != null)
            {
                bullet.RpcSetActive(false);
            }

            ItemBox item = gameObject.GetComponent <ItemBox>();
            if (item != null)
            {
                item.RpcSetActive(false);
            }
        }
        Caches[filePath].Enqueue(gameObject);
        return(true);
    }
コード例 #5
0
    public void HoldingItem(int index)
    {
        ItemBox itemBox = GetComponent <ItemBox>();
        Item    item    = itemBox.AccessItem(index);

        if (item != null)
        {
            if (holdingItemIndex != -1)
            {
                UnityEngine.Object.Destroy(holdingItem);
            }

            holdingItemIndex = index;
            holdingItem      = item.GetModel();

            Vector3 itemScale = Vector3.zero + holdingItem.transform.localScale;
            holdingItem.transform.parent           = rightHand.transform;
            holdingItem.layer                      = rightHand.layer;
            holdingItem.transform.localPosition    = new Vector3(0.45f, -0.45f, -0.2f);
            holdingItem.transform.localEulerAngles = Vector3.zero;
            holdingItem.transform.localScale       = new Vector3(
                itemScale.x / rightHand.transform.localScale.x,
                itemScale.y / rightHand.transform.localScale.y,
                itemScale.z / rightHand.transform.localScale.z);
            holdingItem.GetComponent <Animation>().Stop();
        }
    }
コード例 #6
0
 public void Remove(ItemBox box)
 {
     if (mItemBox.Remove(box.mID))
     {
         GameObject.Destroy(box.gameObject);
     }
 }
コード例 #7
0
 public ItemBoxUpdatedEventArgs(ItemBox box)
 {
     consumables = box.Consumables;
     ammo        = box.Ammo;
     materials   = box.Materials;
     decorations = box.Decorations;
 }
コード例 #8
0
 private void AddItem(object sender, RoutedEventArgs e)
 {
     if (ItemBox.Text != "" || PriceBox.Text != "")
     {
         float price = 0;
         price = Convert.ToUInt64(PriceBox.Text);
         using (var context = new LoginDBEntities())
         {
             var product = new ProductFromPeople()
             {
                 UserName    = Person.Login,
                 ProductName = ItemBox.Text,
                 Price       = price
             };
             context.ProductFromPeoples.Add(product);
             context.SaveChanges();
             ItemBox.Clear();
             PriceBox.Clear();
             MessageBox.Show("Wait , when admin to add your thing to the main list");
         }
     }
     else
     {
         MessageBox.Show("Incorrect");
     }
 }
コード例 #9
0
        //----------当个ItemBox行为

        /// <summary>
        /// 进入ItemBox  //切换
        /// </summary>
        private void itemBox_Enter(object sender, EventArgs e)
        {
            ItemBox ib = sender as ItemBox;

            nowSelectItemBox = ib;
            if (ib.Tag != null)
            {
                if (isItemMode(nowSeMode))
                {
                    if (ib.Tag != null)
                    {
                        SetItemIntroduce(ib.Tag.ToString());
                    }
                }
                else if (nowSeMode is XiaoChaoMode)
                {
                    ZIKU.DataBase.XiaoChao xc = ZIKU.DataBase.XiaoChao.getInstance(ib.Tag.ToString());
                    if (xc != null)
                    {
                        title_Label.Text   = xc.name;
                        ItemIntroduce.Text = xc.introduce;
                    }
                }
            }
        }
コード例 #10
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #11
0
        /// <summary>
        /// 执行if框
        /// </summary>
        /// <param name="box"></param>
        /// <returns></returns>
        protected void DoIfFunction(ItemBox box, WriteStreamCallBack wrs, IScriptLayout ml)
        {
            ScriptInput si = new ScriptInput();

            foreach (var item in box.InputDatas)
            {
                if (item.PIEnum != ParaItemEnum.INPUT)
                {
                    si.SetValue(item.Name, GetValue(item as ParatItem));
                }
            }

            //检测是否需要断点停止
            checkScriptRunForStopPoint(box, si, null);

            if (Convert.ToBoolean(si.GetFirst()))
            {
                RunningFunction((box as ItemBox).Children[0], wrs, ml);
            }
            else
            {
                RunningFunction((box as ItemBox).Children[1], wrs, ml);
            }
            si.Dispose();
            si = null;
        }
コード例 #12
0
ファイル: ItemPanel.cs プロジェクト: hippogyz/mc_unity
    public void Initialize(UIManager uiManager, GameObject player)
    {
        mManager         = uiManager;
        this.player      = player;
        this.itemLibrary = uiManager.allManager.itemLibrary;

        gameObject.SetActive(false);

        this.itemBox = player.GetComponent <ItemBox>();
        itemNum      = itemBox.maxItemNum;
        buttonList   = new ItemButton[itemNum];
        selectedItem = -1;
        chosenItem   = -1;

        emptyItemSprite    = Resources.Load <Sprite>(emptyImagePath);
        chosenItemSprite   = Resources.Load <Sprite>(chosenImagePath);
        selectedItemSprite = Resources.Load <Sprite>(selectedImagePath);

        string buttonName = "itemButton ";

        for (int i = 0; i < itemNum; i++)
        {
            buttonList[i] = transform.Find(buttonName + "(" + i + ")").gameObject.GetComponent <ItemButton>();

            if (buttonList[i] != null)
            {
                buttonList[i].Initialize(this, itemLibrary, itemBox.itemList[i], i);
            }
        }
    }
コード例 #13
0
        public static void Test()
        {
            ItemBox box = Gui.Instance.CreateWidget <ItemBox>("ItemBox", new IntCoord(20, 320, 100, 100), Align.Default, "Main");

            box.EventNotifyItem         += new ItemBox.HandleNotifyItem(box_EventNotifyItem);
            box.EventMouseItemActivate  += new ItemBox.HandleMouseItemActivate(box_EventMouseItemActivate);
            box.EventChangeItemPosition += new ItemBox.HandleChangeItemPosition(box_EventChangeItemPosition);
            box.EventSelectItemAccept   += new ItemBox.HandleSelectItemAccept(box_EventSelectItemAccept);
            box.RequestDrawItem         += new ItemBox.HandleDrawItem(box_RequestDrawItem);
            box.RequestCoordItem        += new ItemBox.HandleCoordItem(box_RequestCoordItem);
            box.RequestCreateWidgetItem += new ItemBox.HandleCreateWidgetItem(box_RequestCreateWidgetItem);

            box.AddItem("cell0");

            box.ResetDrag();
            Widget cell  = box.GetWidgetByIndex(0);
            uint   index = box.GetIndexByWidget(cell);
            Widget drag  = box.GetWidgetDrag();

            box.VerticalAlignment = !box.VerticalAlignment;
            box.ClearItemDataAt(0);
            box.SetItemDataAt(0, "new cell0");
            box.ClearIndexSelected();
            box.IndexSelected = 0;
            box.RedrawAllItems();
            box.RedrawItemAt(0);
            box.RemoveItemAt(0);
            box.RemoveAllItems();

            box.AddItem("cell0");
            box.SetItemDataAt(0, "new cell0");
            box.InsertItemAt(0, "insert cell0");
            uint count = box.ItemCount;
        }
コード例 #14
0
ファイル: Programs.cs プロジェクト: dfcvgb1234/FocusLock
        private void Save_but_Click(object sender, EventArgs e)
        {
            if (MainForm.KeyExists("Programs"))
            {
                key.SetValue("Programs", "");
            }

            for (int i = 0; i < ItemBox.Items.Count; i++)
            {
                string check;
                if (ItemBox.GetItemChecked(i))
                {
                    check = "TRUE";
                }
                else
                {
                    check = "FALSE";
                }

                key.SetValue("Programs", key.GetValue("Programs").ToString() + ItemBox.Items[i] + "," + tmpprocesslist[i] + "," + check + ";");

                //File.AppendAllText(@"C:\Windows\System32\drivers\etc\Programs.begeba", ItemBox.Items[i] + "," + tmpprocesslist[i] + "," + check + ";");
            }
            Program.CreateProgramArray();
            MainForm.CreateProgramArray(Program.checkedState, Program.processList);
            key.SetValue("ProgramsChanged", "TRUE");
            MessageBox.Show("Ændringerne er gemt", "ADVARSEL", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
コード例 #15
0
ファイル: UIForm.cs プロジェクト: DJZenose/SOA_A1
        /*
         * Method        : GrabTotalBtn_Click
         * Returns       : none
         * Parameters    : none
         * Description   : grabs the total of the selected items the user wishes to purchase
         *              : it also grabs the region, and passes all of that information to the
         *              : PurchaseTotaller to send to the service.
         */
        private void GrabTotalBtn_Click(object sender, EventArgs e)
        {
            double        totalItemPrice = 0;
            string        regionCode     = "";
            List <double> itemCosts      = new List <double>()
            {
                8.25, 2.99, 3.99, 5.00
            };

            itemTotal.Text  = "";
            hstTotal.Text   = "";
            pstTotal.Text   = "";
            gstTotal.Text   = "";
            totalPrice.Text = "";

            if (regionCheck.CheckedItems.Count != minimum)
            {
                regionCode = regionCheck.CheckedItems[firstIndex].ToString();
            }

            for (int i = 0; i < ItemBox.Items.Count; i++)
            {
                //check to see if the current index is checked
                if (ItemBox.GetItemChecked(i) == true)
                {
                    //add the price of the checked item to the item total
                    totalItemPrice += itemCosts[i];
                }
            }

            Call_PurchaseTotaller(Convert.ToDouble(Pricetxt.Text), regionCode);
        }
コード例 #16
0
ファイル: Main.cs プロジェクト: aedenthorn/mytimeatportia
        private static ItemBox CreateTreasure(Transform point, string prefabPath, int rewardId, bool playActorAnim, float scale)
        {
            GameObject gameObject = Singleton <ResMgr> .Instance.LoadSyncByType <GameObject>(AssetType.Mission, prefabPath);

            if (gameObject == null)
            {
                return(null);
            }
            GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject);

            Transform mItemBoxRoot = new GameObject("ItemBox").transform;

            mItemBoxRoot.parent        = TransRoot.self.transform;
            mItemBoxRoot.localPosition = Vector3.zero;

            gameObject2.transform.parent = mItemBoxRoot;
            ItemBox component = gameObject2.GetComponent <ItemBox>();

            if (component == null)
            {
                Dbgl("item box is null!");
                return(null);
            }
            Dbgl("Spawning chest!");
            component.name += "_cheat_a";
            component.path  = prefabPath;
            component.SetItems(rewardId, playActorAnim, scale);
            component.gamePos            = point.position;
            component.transform.position = point.position;
            component.transform.rotation = point.rotation;
            return(component);
        }
コード例 #17
0
 static ItemManager()
 {
     for (int f = 0; f < boxs.Length; f++)
     {
         boxs[f] = new ItemBox();
     }
 }
コード例 #18
0
        public IEnumerable <T> ReverseIterator()
        {
            for (int i = _toAdd.Count - 1; i >= 0; i--)
            {
                ItemBox box = _toAdd[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                yield return(box.Item);
            }

            for (int i = _items.Count - 1; i >= 0; i--)
            {
                ItemBox box = _items[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                yield return(box.Item);
            }
        }
コード例 #19
0
ファイル: Test_ItemBox.cs プロジェクト: Mu-L/mygui
 static void box_RequestCoordItem(ItemBox _sender, ref IntCoord _coord, bool _drag)
 {
     _coord.left   = 0;
     _coord.top    = 0;
     _coord.width  = 70;
     _coord.height = 70;
 }
コード例 #20
0
        public IEnumerator <T> GetEnumerator()
        {
            for (int i = 0; i < _items.Count; i++)
            {
                ItemBox box = _items[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                yield return(box.Item);
            }


            for (int i = 0; i < _toAdd.Count; i++)
            {
                ItemBox box = _toAdd[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                yield return(box.Item);
            }
        }
コード例 #21
0
        /// <summary>
        /// Removes and yields every item, including items added through iterator.
        /// </summary>
        public IEnumerable <T> Drain()
        {
            for (int i = 0; i < _items.Count; i++)
            {
                ItemBox box = _items[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                box.MarkedToRemove = true;
                yield return(box.Item);
            }


            for (int i = 0; i < _toAdd.Count; i++)
            {
                ItemBox box = _toAdd[i];

                if (box.MarkedToRemove)
                {
                    continue;
                }

                box.MarkedToRemove = true;
                yield return(box.Item);
            }
        }
コード例 #22
0
        public void CopyTo(T[] array, int arrayIndex)
        {
            int index = 0;

            for (int i = 0; i < _items.Count; i++)
            {
                ItemBox box = _items[i];
                if (box.MarkedToRemove)
                {
                    continue;
                }

                array[arrayIndex + index] = box.Item;
                index += 1;
            }

            for (int i = 0; i < _toAdd.Count; i++)
            {
                ItemBox box = _toAdd[i];
                if (box.MarkedToRemove)
                {
                    continue;
                }

                array[arrayIndex + index] = box.Item;
                index += 1;
            }
        }
コード例 #23
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_RequestCoordItem(ItemBox _sender, ref IntCoord _coord, bool _drag)
 {
     _coord.left = 0;
     _coord.top = 0;
     _coord.width = 70;
     _coord.height = 70;
 }
コード例 #24
0
        //abuse
        public void OnJoinGame(NetworkConnection conn, JoinMessage Join)
        {
            NetPlayer NP = Instantiate(playerPrefab).GetComponent <NetPlayer>();

            NetworkServer.AddPlayerForConnection(conn, NP.gameObject);

            PlayerBrain PB = Instantiate(GamePlayer);

            NetworkServer.Spawn(PB.gameObject, conn);

            for (int i = 0; i < 25; i++)
            {
                ItemBox IB = Instantiate(ItemBox);
                NetworkServer.Spawn(IB.gameObject);
                IB.Randomize();
            }
            for (int i = 0; i < 5; i++)
            {
                PlatBrain PlB = Instantiate(PlatGuy);
                PlB.transform.position = new Vector3(300, 300, 0) * Random.insideUnitCircle;
                NetworkServer.Spawn(PlB.gameObject);
                PlB.Die();
            }

            //Players.Add(NP.netId, NP);
            //PlayerBrains.Add(NP.netId, PB);

            JoinedMessage joined = new JoinedMessage();

            //Debug.Log(NP.netId+"|"+PB.netId);
            joined.id     = NP.netId;
            joined.Player = PB.netId;
            NetworkServer.SendToAll(joined);
        }
コード例 #25
0
        private void itemBox_DragFileDrop(object obj, string[] DragFileList)
        {
            ItemBox ib = obj as ItemBox;

            DragFilesList = DragFileList;
            if (DragFileList.Length > 0)
            {
                item_SeForm = ZIKU.DataBase.Item.getInstance(ib.Tag.ToString());
                if (item_SeForm != null)
                {
                    SetItemIntroduce(ib.Tag.ToString());
                    ToolStripMenuItem itemName_Menu  = new ToolStripMenuItem("项目的名称");
                    ToolStripMenuItem copyFiles_Menu = new ToolStripMenuItem("打开“项目资料目录”");
                    ToolStripMenuItem moveFiles_Menu = new ToolStripMenuItem("打开“项目资料目录”");
                    copyFiles_Menu.Click += CopyFiles_Menu_Click;
                    moveFiles_Menu.Click += MoveFiles_Menu_Click;
                    ContextMenuStrip cm = new ContextMenuStrip();
                    itemName_Menu.Enabled = false;
                    itemName_Menu.Text    = item_SeForm.name;
                    cm.Items.Add(itemName_Menu);
                    cm.Items.Add("-");
                    cm.Items.Add(copyFiles_Menu);
                    cm.Items.Add(moveFiles_Menu);
                    if (item_SeForm.iPathExpand != "")
                    {
                        if (Tools.checkFolderCreation(item_SeForm.iPathExpand))
                        {
                            copyFiles_Menu.Enabled = true;
                            copyFiles_Menu.Text    = "复制所有文件到“项目资料目录”";
                            moveFiles_Menu.Enabled = true;
                            moveFiles_Menu.Text    = "移动所有文件到“项目资料目录”";
                        }
                        else
                        {
                            copyFiles_Menu.Enabled = false;
                            copyFiles_Menu.Text    = "自定义“项目资料目录”无效";
                            moveFiles_Menu.Visible = false;
                        }
                    }
                    else
                    {
                        if (Tools.checkFolderCreation(ZIKU.DataBase.Config.Instance.dataFolderExpand))
                        {
                            copyFiles_Menu.Enabled = true;
                            copyFiles_Menu.Text    = "复制所有文件到“项目资料目录”";
                            moveFiles_Menu.Enabled = true;
                            moveFiles_Menu.Text    = "移动所有文件到“项目资料目录”";
                        }
                        else
                        {
                            copyFiles_Menu.Enabled = false;
                            copyFiles_Menu.Text    = "“项目资料总目录”无效,请检查数据库设置";
                            moveFiles_Menu.Visible = false;
                        }
                    }
                    cm.Show(MousePosition);
                }
            }
        }
コード例 #26
0
ファイル: Frm_Busca.cs プロジェクト: gguimaraes0/Cursos-Alura
        private void salvarToolStripButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            ItemBox ItemSelecionado = (ItemBox)Lst_Busca.Items[Lst_Busca.SelectedIndex];

            idSelect = ItemSelecionado.id;
            this.Close();
        }
コード例 #27
0
ファイル: ItemBox.cs プロジェクト: yamada4649/escape_game
    [SerializeField] Slot selectedSlot = null; //何のスロットを選んでいるのかどうかを決める


    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            slots    = GetComponentsInChildren <Slot>(); //itemBoxについている子要素を取得してくれる。
        }
    }
コード例 #28
0
        /// <summary>
        /// 创建代码块事件
        /// </summary>
        /// <param name="data"></param>
        public override void DataTree_CreateCallback(IItemBox data)
        {
            ItemBox box = new ItemBox();

            box.Copy(data);
            this.Add(box);
            HiddenTree();
        }
コード例 #29
0
 void OnItemChange(int p_index, ItemBox p_box)
 {
     if (p_index == index)
     {
         iconImage.sprite = p_box.itemData.icon;
         count            = p_box.count;
     }
 }
コード例 #30
0
 /// <summary>
 /// 鼠标点击
 /// </summary>
 private void itemBox_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         ItemBox ib = sender as ItemBox;
         nowSeMode.Execute(ib.Tag.ToString());
     }
 }
コード例 #31
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.layer == LayerMask.NameToLayer("Box"))
        {
            if (collision.transform.position.y >= transform.position.y + 0.7f)
            {
                ItemBox box = collision.transform.GetComponent <ItemBox>();
                if (box)
                {
                    box.OnHeadbutted();
                }
            }
        }

        if (collision.gameObject.layer == LayerMask.NameToLayer("Item"))
        {
            Item item = collision.transform.GetComponent <Item>();
            if (item)
            {
                item.OnItemGot(this);
            }
        }

        // 被敌人Enemy碰到
        if ((1 << collision.gameObject.layer & LayerMask.GetMask("Enemy", "Boss")) != 0)
        {
            // 如果在空中,要先检测是不是脚底踩到敌人
            if (cc.curMoveStatus == MoveStatus.Air)
            {
                float w = 0.3f;
                if (transform.localScale.x > 1.1f)
                {
                    w = 0.5f;
                }
                Collider2D[] colliders = Physics2D.OverlapBoxAll(groundCheck.position, new Vector2(w, 0.2f), 0, LayerMask.GetMask("Enemy", "Boss"));
                foreach (Collider2D c in colliders)
                {
                    RoleDie rd = c.GetComponent <RoleDie>();
                    if (rd != null)
                    {
                        rd.Die(c.transform);
                        // 反弹
                        rigid.velocity = new Vector2(rigid.velocity.x, 0);
                        rigid.AddForce(new Vector2(0, 300));
                    }
                }
                if (colliders.Length > 0)
                {
                    return;
                }
            }

            // 运行到这里说明没踩到敌人,碰撞死亡
            dead = true;
            Invoke("ResetGame", 3);
            BGMusic.Instance.PlayDeadMusic();
        }
    }
コード例 #32
0
 public override void OnInspectorGUI()
 {
     m_ItemBox = target as ItemBox;
     DrawAttr();
 }
コード例 #33
0
ファイル: Spawn.cs プロジェクト: yakolla/MarineVsAlien
 IEnumerator EffectSpawnItemBox(ItemBox itemBox, float time)
 {
     yield return new WaitForSeconds (time);
     itemBox.gameObject.SetActive(true);
 }
コード例 #34
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_RequestDrawItem(ItemBox _sender, Widget _item, IBDrawItemInfo _info)
 {
     EditBox cell = _item.UserData as EditBox;
     string str = _sender.GetItemDataAt(_info.index) as string;
     if (str != null) cell.OnlyText = str;
 }
コード例 #35
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_RequestCreateWidgetItem(ItemBox _sender, Widget _item)
 {
     EditBox cell = _item.CreateWidget<EditBox>("Edit", new IntCoord(0, 0, 50, 50), Align.Default);
     _item.UserData = cell;
 }
コード例 #36
0
 static void box_EventSelectItemAccept(ItemBox _sender, uint _index)
 {
     ExampleApplication.DebugOut("EventSelectItemAccept  index=" + _index.ToString());
 }
コード例 #37
0
ファイル: Test_ItemBox.cs プロジェクト: blunted2night/MyGUI
 static void box_EventChangeItemPosition(ItemBox _sender, uint _index)
 {
     Gui.Instance.Log("TestApp", LogLevel.Info, "EventChangeItemPosition  index=" + _index.ToString());
 }
コード例 #38
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_EventNotifyItem(ItemBox _sender, IBNotifyItemData _info)
 {
     Export.DebugOut("EventNotifyItem  notify=" + _info.notify.ToString());
 }
コード例 #39
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_EventMouseItemActivate(ItemBox _sender, uint _index)
 {
     Export.DebugOut("EventMouseItemActivate  index=" + _index.ToString());
 }
コード例 #40
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_EventChangeItemPosition(ItemBox _sender, uint _index)
 {
     Export.DebugOut("EventChangeItemPosition  index=" + _index.ToString());
 }
コード例 #41
0
ファイル: Test_ItemBox.cs プロジェクト: blunted2night/MyGUI
 static void box_EventSelectItemAccept(ItemBox _sender, uint _index)
 {
     Gui.Instance.Log("TestApp", LogLevel.Info, "EventSelectItemAccept  index=" + _index.ToString());
 }
コード例 #42
0
ファイル: Test_ItemBox.cs プロジェクト: blunted2night/MyGUI
 static void box_EventNotifyItem(ItemBox _sender, IBNotifyItemData _info)
 {
     Gui.Instance.Log("TestApp", LogLevel.Info, "EventNotifyItem  notify=" + _info.notify.ToString());
 }
コード例 #43
0
ファイル: Test_ItemBox.cs プロジェクト: blunted2night/MyGUI
 static void box_EventMouseItemActivate(ItemBox _sender, uint _index)
 {
     Gui.Instance.Log("TestApp", LogLevel.Info, "EventMouseItemActivate  index=" + _index.ToString());
 }
コード例 #44
0
ファイル: Element.cs プロジェクト: Rupini/Hexocracy
 public Element(ItemBox box, ElementData data)
     : base(box)
 {
     Kind = data.kind;
     Count = data.capacity;
 }
コード例 #45
0
ファイル: Test_ItemBox.cs プロジェクト: piaoasd123/Fwankie
 static void box_EventSelectItemAccept(ItemBox _sender, uint _index)
 {
     Export.DebugOut("EventSelectItemAccept  index=" + _index.ToString());
 }
コード例 #46
0
ファイル: UILevelPad.cs プロジェクト: MickPlaYer/PinBallRPG
 // Use this for initialization
 void Start()
 {
     _itemBox = new ItemBox();
     _gameLevel = PlayerPrefs.GetInt(CURRENT_LEVEL_KEY, 1);
     RectTransform rect = GetComponent<RectTransform>();
     rect.anchoredPosition = Vector2.zero;
     gameObject.SetActive(false);
 }
コード例 #47
0
ファイル: BombItem.cs プロジェクト: Rupini/Hexocracy
 public BombItem(ItemBox box, BombData data)
     : base(box)
 {
     Damage = data.damage;
 }
コード例 #48
0
ファイル: Item.cs プロジェクト: Rupini/Hexocracy
 protected Item(ItemBox box)
 {
     this.box = box;
 }