public void PlayGEMAni(Action callback, Item_Type item_Type) { GameObject asset = Resources.Load("Prefabs/effect/eff_gem") as GameObject; System.Random rd = new System.Random(); Sequence arg_50_0 = DOTween.Sequence(); Sequence actions = DOTween.Sequence(); arg_50_0.AppendCallback(delegate { GameObject prefab = UnityEngine.Object.Instantiate <GameObject>(asset); prefab.transform.SetParent(this.panel_maxTop.transform, false); prefab.transform.localPosition = new Vector3((float)rd.Next(-80, 80), (float)rd.Next(0, 80), 0f); prefab.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); Vector3 position = this.icon_gem.transform.position; Tweener t = prefab.transform.DOMove(position, 0.8f, false).SetEase(Ease.InBack).OnComplete(delegate { UnityEngine.Object.Destroy(prefab); }); actions.Insert(0f, t); }).AppendInterval(0.01f).SetLoops(10); actions.OnComplete(delegate { Action expr_06 = callback; if (expr_06 == null) { return; } expr_06(); }); }
// removes an item from players inventory public void RemoveItem(Item_Type item) { if (player_inventory.Contains(item)) { player_inventory.Remove(item); } }
public Item(string name, int value, Item_Type iType, string description = "") { this.name = name; this.description = description; this.value = value; itemType = iType; }
public void PlayitemAni(Item_Type item_Type) { AudioManager.GetInstance().PlayEffect("sound_eff_item_get"); GameObject asset = Resources.Load("Prefabs/effect/eff_gem") as GameObject; System.Random rd = new System.Random(); Sequence arg_50_0 = DOTween.Sequence(); Sequence actions = DOTween.Sequence(); arg_50_0.AppendCallback(delegate { GameObject prefab = UnityEngine.Object.Instantiate <GameObject>(asset); prefab.GetComponentInChildren <Image>().sprite = itme_sp[(int)item_Type]; prefab.transform.SetParent(this.panel_maxTop.transform, false); prefab.transform.localPosition = new Vector3((float)rd.Next(-80, 80), (float)rd.Next(0, 80), 0f); prefab.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); Vector3 position = this.icon_gem.transform.position; Tweener t = prefab.transform.DOMove(position, 0.8f, false).SetEase(Ease.InBack).OnComplete(delegate { UnityEngine.Object.Destroy(prefab); }); actions.Insert(0f, t); }).AppendInterval(0.01f).SetLoops(10); }
public ActionResult DeleteConfirmed(int id) { Item_Type item_Type = db.Item_Type.Find(id); db.Item_Type.Remove(item_Type); db.SaveChanges(); return(RedirectToAction("Index")); }
public Item(string name, int id, string desc, int sp1, Item_Type type) { item_Name = name; item_ID = id; item_Desc = desc; item_Icon = Resources.Load <Texture2D>("Item Icons/" + name); item_Sp1 = sp1; item_Type = type; }
public Item(String fname, Item_Type ftype, int fcost, Character.Stats.Traits fmod, OtherEffect fce) { effect = fce; cost = fcost; mod = fmod; name = fname; type = ftype; }
public Item(String fname, Item_Type ftype, int fcost, Character.Stats.Traits fmod) { effect = new OtherEffect(); effect.hp = 0; effect.mp = 0; cost = fcost; mod = fmod; name = fname; type = ftype; }
private static void ChangePlayerItem(Item_Type item) { if (holdByPlayer > 0 && holdByPlayer < Item_Type.Size) // Desativa o item antigo { itemsImages[(int)holdByPlayer].SetActive(false); } if (item > 0 && item < Item_Type.Size) // Ativa o item novo { itemsImages[(int)item].SetActive(true); } }
public Item(string name, int id, string desc, Item_Type type, GameObject prefab, int stack, bool l0ck) { item_Name = name; item_ID = id; item_Desc = desc; item_Icon = Resources.Load <Texture2D>("Item Icons/" + name); item_Type = type; item_Prefab = prefab; item_Stack = stack; item_Lock = l0ck; }
public ActionResult Edit([Bind(Include = "Id,Id_Item,Id_ItemType")] Item_Type item_Type) { if (ModelState.IsValid) { db.Entry(item_Type).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id_Item = new SelectList(db.Item, "Id", "barcode", item_Type.Id_Item); ViewBag.Id_ItemType = new SelectList(db.ItemType, "Id", "Name", item_Type.Id_ItemType); return(View(item_Type)); }
protected void insertdata() { Item_Type newobject = new Item_Type(); newobject.Item_Type_Name = TextBoxContacttype.Text; newobject.RecTime = DateTime.Now; newobject.Item_Type_Notes = ""; newobject.UserId = Convert.ToInt32(Session["userid"]); newobject.IsDisable = false; DB.Item_Types.InsertOnSubmit(newobject); DB.SubmitChanges(); }
// GET: Item_Type/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Item_Type item_Type = db.Item_Type.Find(id); if (item_Type == null) { return(HttpNotFound()); } return(View(item_Type)); }
// GET: Item_Type/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Item_Type item_Type = db.Item_Type.Find(id); if (item_Type == null) { return(HttpNotFound()); } ViewBag.Id_Item = new SelectList(db.Item, "Id", "info", item_Type.Id_Item); ViewBag.Id_ItemType = new SelectList(db.ItemType, "Id", "Name", item_Type.Id_ItemType); return(View(item_Type)); }
public void set_gift(int type, int val) { this.reward_Type = Reward_popop_type.Gift; this.item_Type = (Item_Type)type; this.type = type; img_main.sprite = item_sp[(int)item_Type]; img_ads.sprite = item_sp[(int)item_Type]; this.val = val; txt_val.text = "x" + val; txt_ads_val.text = "x" + val * 2; }
void OnGUI(){ LoadDataBase(); EditorGUILayout.BeginVertical(); Item = (Item_Type)EditorGUILayout.EnumPopup("Type:" , Item); Name = EditorGUILayout.TextField("Name",Name); price = (int)EditorGUILayout.IntSlider("Price",price ,1, 30000); rank = (int)EditorGUILayout.IntSlider("Rank",rank ,1, 10); sprite = (Sprite)EditorGUILayout.ObjectField (sprite, typeof(Sprite), false); if(GUILayout.Button("Done")){ if(click_count == 0){ NewItemSelect(); click_count = 1; } this.Close(); this.EndWindows(); } EditorGUILayout.EndVertical(); }
public void set_Achive(int type) { this.reward_Type = Reward_popop_type.Achive; this.item_Type = Item_Type.coin; this.type = type; LocalData localData = AchiveData.GetInstance().Get(type); TAchive tAchive = Configs.TAchives[localData.key.ToString()]; img_main.sprite = item_sp[(int)item_Type]; img_ads.sprite = item_sp[(int)item_Type]; this.val = tAchive.Item; txt_val.text = "x" + val; txt_ads_val.text = "x" + val * 2; }
void OnGUI() { LoadDataBase(); EditorGUILayout.BeginVertical(); Item = (Item_Type)EditorGUILayout.EnumPopup("Type:", Item); Name = EditorGUILayout.TextField("Name", Name); price = (int)EditorGUILayout.IntSlider("Price", price, 1, 30000); rank = (int)EditorGUILayout.IntSlider("Rank", rank, 1, 10); sprite = (Sprite)EditorGUILayout.ObjectField(sprite, typeof(Sprite), false); if (GUILayout.Button("Done")) { if (click_count == 0) { NewItemSelect(); click_count = 1; } this.Close(); this.EndWindows(); } EditorGUILayout.EndVertical(); }
public void set_Task(int id) { item_sp = FindObjectOfType <MainScene>().itme_sp; this.reward_Type = Reward_popop_type.Task; this.item_Type = Item_Type.coin; this.type = id; LocalData data = TaskData.GetInstance().Get(this.type); TTask tTask = Configs.TTasks[data.key.ToString()]; img_main.sprite = item_sp[(int)item_Type]; img_ads.sprite = item_sp[(int)item_Type]; this.val = tTask.Item; txt_val.text = "x" + val; txt_ads_val.text = "x" + val * 2; }
public Weapon(Item item, float damage, float critDamage, float critChance, float range, Item_Type type, Func <Unit, Unit, Weapon, bool> callback) { this.name = item.name; this.description = item.description; this.ID = item.ID; this.actionPoints = item.actionPoints; if (mesh != null) { this.mesh = item.mesh; } if (icon != null) { this.icon = item.icon; } this.damage = damage; this.critChance = critChance; this.critDamage = critDamage; this.itemType = type; this.range = range; this.callback = callback; }
// adds item to players inventory public void AddItem(Item_Type item) { player_inventory.Add(item); }
public Pokeball(string name, int value, Item_Type type = Item_Type.Pokeball, string description = "") : base(name, value, Item_Type.Pokeball, description) { this.name = name; this.description = description; this.value = value; }
public Medicine(string name, int value, Item_Type type = Item_Type.Medicine, string description = "") : base(name, value, Item_Type.Medicine, description) { this.name = name; this.description = description; this.value = value; }
public BattleItem(string name, int value, Item_Type type = Item_Type.Battle_Item, string description = "") : base(name, value, Item_Type.Battle_Item, description) { this.name = name; this.description = description; this.value = value; }
public Item(String n) { name = n; Item_Notes = ""; item_type = Item_Type.Default; }
public Item(String n, String new_notes) { name = n; Item_Notes = new_notes; item_type = Item_Type.Default; }
public static Sprite Get_Item_Sp(Item_Type num) { return(Resources.Load <Sprite>("Item/item_" + (int)num)); }
public void AddDiscardItem(Item_Type item) { player_discards.Add(item); }