public Item getItem(ITEMS type) { switch (type) { case ITEMS.LOG: return(log); case ITEMS.STICK: return(stick); case ITEMS.STONE: return(stone); case ITEMS.FLINT: return(flint); case ITEMS.HERB: return(herb); case ITEMS.WATER: return(water); case ITEMS.BERRY: return(berry); case ITEMS.CAMP_FIRE: return(campFire); } return(null); }
public int getMaxStack(ITEMS type) { switch (type) { case ITEMS.LOG: return(log.getMaxStack()); case ITEMS.STICK: return(stick.getMaxStack()); case ITEMS.STONE: return(stone.getMaxStack()); case ITEMS.FLINT: return(flint.getMaxStack()); case ITEMS.HERB: return(herb.getMaxStack()); case ITEMS.WATER: return(water.getMaxStack()); case ITEMS.BERRY: return(berry.getMaxStack()); case ITEMS.CAMP_FIRE: return(campFire.getMaxStack()); } return(-1); }
public void AddItem(Item item) { if (item is CannedFood || item is Ammo) { item.Use(); return; } if (m_items.Contains(item)) { if (item is Consumable) { (m_items[m_items.IndexOf(item)] as Consumable).amount += (item as Consumable).amount; } else { return; } } else { m_items.Add(item); } ITEMS?.Invoke(m_items); }
public int getMaxStack(ITEMS type) { switch (type) { case ITEMS.LOG: return(LOG.getMaxStack()); case ITEMS.STICK: return(STICK.getMaxStack()); case ITEMS.STONE: return(STONE.getMaxStack()); case ITEMS.FLINT: return(FLINT.getMaxStack()); case ITEMS.HERB: return(HERB.getMaxStack()); case ITEMS.WATER: return(WATER.getMaxStack()); case ITEMS.BERRY: return(BERRY.getMaxStack()); } return(-1); }
// Use this for initialization void Start() { if (Application.isEditor) { C_Stats.ACT = 1f; } else if (Application.isMobilePlatform) { C_Stats.ACT = 1.0f; ChatGUI.addLine("MobilePlatform Spotted!"); } Get = this; ChatGUI.addLine("This Is The Path for Textures!"); ChatGUI.addLine("Put Textures folder in there, then reload everything to implement the change!"); ChatGUI.addLine(Application.persistentDataPath); ItemCreator = new ITEMS(); ITEMS.main = ItemCreator; ItemCreator.ADDITEMS(); ITEMS.main.CreateStatEnchanter(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, " Range_Enchanter", AgilityIcon); //ITEMS.main.CreateStatEnchanter(0,55,0,0,0,0,0,0,0,0,0,3,0, " Rang2", AgilityIcon); //ITEMS.main.CreateStatEnchanter(0,0,55,0,0,0,0,0,0,0,0,3,0, " Rang3r", AgilityIcon); Add_items = add; les = GetComponent <LoadExternalAsSprite>(); StartCoroutine(load_items()); }
public Item getItem(ITEMS type) { switch (type) { case ITEMS.LOG: return(LOG); case ITEMS.STICK: return(STICK); case ITEMS.STONE: return(STONE); case ITEMS.FLINT: return(FLINT); case ITEMS.HERB: return(HERB); case ITEMS.WATER: return(WATER); case ITEMS.BERRY: return(BERRY); } return(null); }
public async Task <IActionResult> registrar([FromBody] ITEMS iTEMS) { try { await _GenericRepository.Add(iTEMS); _UnitOfWork.Commit(); return(Ok(new Request() { status = true, message = "El Item se registro correctamente", data = iTEMS })); } catch (Exception ex) { return(Ok(new Request() { status = false, message = "El Item no se registro correctamente!!", data = ex.Message })); } }
public async Task <IActionResult> modificar([FromBody] ITEMS iTEMS) { try { await _GenericRepository.Update(iTEMS); _UnitOfWork.Commit(); return(Ok(new Request() { status = true, message = "Esta accion se ejecuto correctamente", data = iTEMS })); } catch (Exception ex) { return(Ok(new Request() { status = false, message = "Se produjo un error inesperado!!", data = ex.Message })); } }
public int getItemCount(ITEMS type) { switch (type) { case ITEMS.LOG: return(LOG.getCurrentAmount()); case ITEMS.STICK: return(STICK.getCurrentAmount()); case ITEMS.STONE: return(STONE.getCurrentAmount()); case ITEMS.FLINT: return(FLINT.getCurrentAmount()); case ITEMS.HERB: return(HERB.getCurrentAmount()); case ITEMS.WATER: return(WATER.getCurrentAmount()); case ITEMS.BERRY: return(BERRY.getCurrentAmount()); } return(-1); }
public void clear() { COMPARTMENTS.Clear(); TAGS.Clear(); CONTAINER.Clear(); ITEMS.Clear(); }
void Start() { text = "Pick Up Item 'S'"; Canvas = GameObject.FindGameObjectWithTag("Canvas"); player = GameObject.FindGameObjectWithTag("Player"); item = this.GetComponent <PublicItems>().item; }
public static void TripleQ() { var target = TargetSelector.GetTarget(Player.AttackRange, TargetSelector.DamageType.Physical); if (target != null && target.IsValidTarget() && !target.IsZombie) { if (Player.Mana == 5) { if (Champion.Q.IsReady()) { if (MenuConfig.UseItem) { ITEMS.CastYoumoo(); } Champion.Q.Cast(); } if (Champion.E.IsReady()) { Champion.E.Cast(target); } if (Champion.W.IsReady()) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(target.ServerPosition); } if (Champion.Q.IsReady()) { Champion.Q.Cast(); } } if (Player.Mana < 5) { if (Champion.Q.IsReady()) { Champion.Q.Cast(); } if (Champion.E.IsReady()) { Champion.E.Cast(target); } if (Champion.W.IsReady()) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(target.ServerPosition); } if (Champion.Q.IsReady()) { Champion.Q.Cast(); } } } }
public void UseItem(Item item) { if (m_items.Contains(item)) { item.Use(); } ITEMS?.Invoke(m_items); }
public ActionResult DeleteConfirmed(int id) { ITEMS iTEMS = db.ITEMS.Find(id); db.ITEMS.Remove(iTEMS); db.SaveChanges(); return(RedirectToAction("Index")); }
public override void Interact() { this.GetComponent <PublicItems>().ReCreate(); item = this.GetComponent <PublicItems>().item; itemDesc.transform.FindChild("Text").GetComponent <Text> ().text = item.itemName + " x " + item.curStack; player.GetComponent <Equip> ().FindEmpty(item, true); itemDesc.active = true; pickUp.active = false; }
public void EquipItem(int index, int number) { CheckForActiveDup(inventory.get(index).itemName); items[number] = inventory.get(index); if (curItem == null) { curItem = items[number]; curPos = number; } }
public ActionResult Edit([Bind(Include = "ITEM_ID,ITEM_DESRIPTION,CATEGORY_ID,isActive")] ITEMS iTEMS) { if (ModelState.IsValid) { db.Entry(iTEMS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(iTEMS)); }
bool CallItemActive(ITEMS methodId, params object[] args) { string methodName = methodId.ToString(); Type type = typeof(ItemActive); MethodInfo method = type.GetMethod(methodName); ItemActive c = new ItemActive(); return((bool)method.Invoke(c, args)); }
private Items GeneradorItems() { Items items = new Items(); ITEMS tipo = (ITEMS)random.Next(0, 3); items.SetItems(tipo); items.SetNombre(GetTipoNombres(tipo)); items.SetCosto(random.Next(0, 500) + 1); return(items); }
public static void Jungle() { var mobs = MinionManager.GetMinions(Player.AttackRange + 75, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Count == 0 || Player.Mana == 5 && MenuConfig.Passive) { return; } var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff"); foreach (var m in mobs) { if (Player.Mana == 5) { if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(m); } if (Champion.Q.IsReady()) { Champion.Q.Cast(m); } else if (Champion.E.IsReady() && !hasPassive) { Champion.E.Cast(m); } } if (Player.Mana < 5) { if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(m); } if (Champion.Q.IsReady()) { Champion.Q.Cast(m); } else if (Champion.E.IsReady() && !hasPassive) { Champion.E.Cast(m); } } } }
public ActionResult Create([Bind(Include = "ITEM_ID,ITEM_DESRIPTION,CATEGORY_ID,isActive")] ITEMS iTEMS) { if (ModelState.IsValid) { db.ITEMS.Add(iTEMS); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(iTEMS)); }
public static void Lane() { var minions = MinionManager.GetMinions(Player.AttackRange); if (minions == null || Player.Mana == 5 && MenuConfig.Passive) { return; } var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff"); foreach (var m in minions) { if (Player.Mana == 5) { if (Champion.Q.IsReady()) { Champion.Q.Cast(m); } if (Champion.E.IsReady() && !hasPassive) { Champion.E.Cast(m); } if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(m); } } if (Player.Mana < 5) { if (Champion.Q.IsReady()) { Champion.Q.Cast(m); } if (Champion.E.IsReady() && !hasPassive) { Champion.E.Cast(m); } if (Champion.W.IsReady() && m.Distance(Player) <= Champion.W.Range) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(m); } } } }
public void manageIntventory() { ITEMS thisItemDataType = node.determineItemData(); ImprovedInventory.instance.addItem(thisItemDataType, 1); #region Legacy Code - Add to inventory myBox.addItem(thisItemDataType, 1); #endregion updateInventoryText(thisItemDataType); }
public static void Combo() { var hasPassive = Player.HasBuff("RengarRBuff") || Player.HasBuff("RengarPassiveBuff"); var target = TargetSelector.GetTarget(Player.AttackRange, TargetSelector.DamageType.Physical); if (target.IsValidTarget() && !target.IsZombie && target.Distance(Player) <= Champion.E.Range) { if (Player.Mana == 5) { if (Champion.E.IsReady() && target.Distance(Player) <= 600) { if (MenuConfig.UseItem) { ITEMS.CastYoumoo(); } Champion.E.Cast(target); } if (Champion.Q.IsReady()) { Champion.Q.Cast(target); } if (Champion.W.IsReady()) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(target); } } if (Player.Mana < 5) { if (Champion.Q.IsReady()) { Champion.Q.Cast(target); } if (Champion.W.IsReady()) { if (MenuConfig.UseItem) { ITEMS.CastHydra(); } Champion.W.Cast(target); } if (Champion.E.IsReady()) { Champion.E.Cast(target); } } } }
public ActionResult Create(ITEMS collection) { try { db.ITEMS.Add(collection); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public void deleteCurItem() // { items[curPos] = null; curItem = null; for (int i = 0; i < 4 && curItem == null; i++) { if (items [i] != null) { curPos = i; curItem = items [curPos]; } } }
// GET: ITEMS/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ITEMS iTEMS = db.ITEMS.Find(id); if (iTEMS == null) { return(HttpNotFound()); } return(View(iTEMS)); }
public ActionResult Edit(int id, ITEMS collection) { try { // TODO: Add update logic here db.ITEMS.AddOrUpdate(collection); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
private void iTEMSToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Form f in this.MdiChildren) { if (f.GetType() == typeof(ITEMS)) { f.Activate(); return; } } Form ITEMS = new ITEMS(); ITEMS.MdiParent = this; ITEMS.Show(); }
public void DropItem(Consumable item, int amount) { var consumable = (m_items[m_items.IndexOf(item)] as Consumable); consumable.amount -= amount; if (consumable.amount <= 0) { m_items.Remove(consumable); } else { m_items[m_items.IndexOf(consumable)] = consumable; } ITEMS?.Invoke(m_items); }
public void insertItem(ITEMS item) { items.Add(item); }