public void create_UI() { for (int i = 0; i < objectStatus.item_list.Count; i++) { //gameManager.pools.objectBodyPool.get_body((ItemUIType)(((ItemBase)_item).itemType), position); ItemUIList.Add(gameManager.pools.objectBodyPool.get_body((ItemUIType)(objectStatus.item_list[i]), node_now.position + new Vector3(0.8f, 0.35f * i + 0.1f, 0), false)); ItemUIList[i].transform.localScale *= 0.35f; ItemUIList[i].GetComponent <ItemUI>().BackGround.GetComponent <SpriteRenderer>().color = new Color(1, 0.5f, 1); } }
public override void use_item(int item_idx) { base.use_item(item_idx); if (!objectStatus.item_list[item_idx].ToString().Contains("RED")) { gameManager.sub_managers.animManager.animCoroutinePool.run_coroutine_withoutbase(ItemUIList[item_idx], AnimType.DEATH, 0); //call shield break effect. ItemUIList.RemoveAt(item_idx); } arrange_UI(); }
protected override void Init() { firstKeyUP = false; base.Init(); //清理之前的道具 ItemUIList.Init(); //更新商店 base.UpdateBusinessman(); //显示包裹道具 List <PlayGoods> playGoodsList = playerState.PlayerAllGoods.Where(temp => temp.GoodsLocation == GoodsLocation.Package).ToList(); ResetItems(playGoodsList); }
protected override void Init() { firstKeyUP = false; base.Init(); //清理之前的道具 ItemUIList.Init(); //更新商店 base.UpdateBusinessman(); //显示商品道具 if (businessman != null) { List <PlayGoods> allPlayGoodses = new List <PlayGoods>(); allPlayGoodses.AddRange(businessman.BaseList); //首先添加基础商品 allPlayGoodses.AddRange(businessman.SellPropsList); //然后添加回购商品 ResetItems(allPlayGoodses); } }