void Awake() { _button = GameObject.Find("RandomButton").GetComponent <Button>(); _button.onClick.AddListener(Generate); _equipmentGenerator = GameObject.Find("Scripts").GetComponent <EquipmentGenerator>(); _consumableGenerator = GameObject.Find("Scripts").GetComponent <ConsumableGenerator>(); }
public string GetGeoJsonCollection() { var generator = new EquipmentGenerator(); var equipments = generator.GenerateEquipments(); return(equipments.ToGeoJsonString()); }
public static void GenerateMainHand() { EquipmentGenerator gen = new EquipmentGenerator(); gen.SetTier(99).SetRarity(Rarity.Unique).SetName("Bugbuster"); PlayerSession.GetInventory().list.Add(gen.Generate()); }
void Awake() { if (Instance == null) { Instance = this; } _equipmentGenerator = new EquipmentGenerator(); }
public void Equipment() { // Chance for loot if (tpd.RollPercent(currentMob.lootChance)) { var equipmentGenerator = new EquipmentGenerator(sim); var eq = equipmentGenerator.Generate(); sim.AddEvent(PlayerEvent.Loot(eq)); } }
public MapGenerator(int width, int height, int maxRooms, int roomMaxSize, int roomMinSize, int level) { _width = width; _height = height; _maxRooms = maxRooms; _roomMaxSize = roomMaxSize; _roomMinSize = roomMinSize; _level = level; _map = new DungeonMap(); _equipmentGenerator = new EquipmentGenerator(level); }
IEnumerator LootCoroutine() { yield return(new WaitForSeconds(1)); GameObject obj = Instantiate(Resources.Load("Props/Items/Prefarbs/Gold")) as GameObject; obj.transform.position = gameObject.transform.position; EquipmentGenerator.GenerateRandomItemObj(); Destroy(gameObject); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); return; } else { _instance = this; } }
List<PlayerEvent> Dev_RandomLoot() { var list = new List<PlayerEvent>(); var eqGen = new EquipmentGenerator(sim); var rand = Random.Range(7, 15); var eRand = Random.Range(1, 4); for (int i = 0; i < rand; i++) { var eq = eqGen.Generate(); var ev = PlayerEvent.Loot(eq); for (int j = 0; j < eRand; j++) { // list.Add(fill); } list.Add(ev); } return list; }
List <PlayerEvent> Dev_RandomLoot() { var list = new List <PlayerEvent>(); var eqGen = new EquipmentGenerator(sim); var rand = Random.Range(7, 15); var eRand = Random.Range(1, 4); for (int i = 0; i < rand; i++) { var eq = eqGen.Generate(); var ev = PlayerEvent.Loot(eq); for (int j = 0; j < eRand; j++) { // list.Add(fill); } list.Add(ev); } return(list); }
void LoadTradersGoods() { int j = 0; shop.items.Clear(); for (int i = 0; i < 7; i++) { int k = 0; while (k < 3) { npcSlots[j].ClearSlot(); Equipment generatedItem = null; switch (i) { case 0: { generatedItem = EquipmentGenerator.GenerateRandomAmulet(); break; } case 1: { generatedItem = EquipmentGenerator.GenerateRandomArmor(); break; } case 2: { generatedItem = EquipmentGenerator.GenerateRandomHelmet(); break; } case 3: { generatedItem = EquipmentGenerator.GenerateRandomRing(); break; } case 4: { generatedItem = EquipmentGenerator.GenerateRandomShield(); break; } case 5: { generatedItem = EquipmentGenerator.GenerateRandomStone(); break; } case 6: { generatedItem = EquipmentGenerator.GenerateRandomWeapon(); break; } } generatedItem.BuyPrice = Utilities.ComputePrice(generatedItem); shop.Add(generatedItem); npcSlots[j].AddItem(generatedItem, closeButton: false, buyItem: true); k++; j++; } } }
void Awake() { Instance = this; }
public IEnumerable <OEquipment> GetEquipments() { var generator = new EquipmentGenerator(); return(generator.GenerateEquipments()); }
public void Equipment() { // Chance for loot if (tpd.RollPercent(currentMob.lootChance)) { var equipmentGenerator = new EquipmentGenerator(sim); var eq = equipmentGenerator.Generate(); sim.AddEvent(PlayerEvent.Loot(eq)); } }