void Awake() { instance = this; coinCountTxt = coinCount.GetComponent <Text>(); DontDestroyOnLoad(gameObject); if (PlayerPrefs.HasKey("coins")) { //we had a previous session coins = PlayerPrefs.GetInt("coins", 0); currentWeaponIndex = PlayerPrefs.GetInt("currentWeaponIndex", 0); WeaponAvailability = PlayerPrefs.GetInt("weaponAvailability", 1); tripleBought = PlayerPrefs.GetInt("tripleBought", 0); sonicBought = PlayerPrefs.GetInt("sonicBought", 0); //Weapon Levels atomicMissileLevel = PlayerPrefs.GetInt("atomicLevel", 1); tripleThreadMissileLevel = PlayerPrefs.GetInt("tripleLevel", 1); superSonicMissileLevel = PlayerPrefs.GetInt("sonicLevel", 1); //Weapon Damages atomicMissileDamage = PlayerPrefs.GetInt("atomicDamage", 10); tripleThreadMissileDamage = PlayerPrefs.GetInt("tripleDamage", 60); superSonicMissileDamage = PlayerPrefs.GetInt("sonicDamage", 100); } else { Save(); } }
public PurchaseMeleeWeaponTests() { var weapons = new List <Weapon> (); var wpn1 = new Weapon("Mace", 0f, "1d6", DamageTypes.Bludgeoning, 20, 2, 0, WeaponType.OneHanded, WeaponGroup.Hammers, WeaponTrainingLevel.Simple); wpn1.Value = 3000; var wpn2 = new Weapon("Bow", 0, "1d6", DamageTypes.Piercing, 20, 2, 0, WeaponType.Ranged, WeaponGroup.Bows, WeaponTrainingLevel.Martial); var wpn3 = new Weapon("Never Pick", 0, "1d6", DamageTypes.Piercing, 20, 2, 0, WeaponType.Ranged, WeaponGroup.Bows, WeaponTrainingLevel.Exotic); weapons.Add(wpn1); weapons.Add(wpn2); weapons.Add(wpn3); shop = new WeaponShop(weapons); subject = new PurchaseMeleeWeapon(shop); var proficiencies = new string[] { "simple" }; character = CharacterTestTemplates.AverageBob(); character.Inventory.CoinPurse.SetValue(30000); character.Offense.AddWeaponProficiencies(proficiencies); }
public void ProvidesWeapons() { var shop = new WeaponShop(); var weapons = shop.GetInventory <IWeapon>(); Assert.NotEmpty(weapons); }
void Start() { Cursor.lockState = CursorLockMode.Locked; _characterController = GetComponent <CharacterController>(); _cam = GameObject.Find("Main Camera").GetComponent <Camera>(); _UI = GameObject.Find("Canvas").GetComponent <UIManager>(); _wpShop = GameObject.Find("Sharkman").GetComponent <WeaponShop>(); if (_wpShop == null) { Debug.Log("WeaponShop is null"); } if (_UI == null) { Debug.Log("UIManager is null"); } if (_characterController == null) { Debug.Log("CharacterController is null"); } if (_cam == null) { Debug.Log("Camera is null"); } _currentAmmo = _maxAmmo; _UI.UpdateAmmo(_currentAmmo); _muzzleFash.Stop(); _laserStreaks.Stop(); }
public void ProvidesMasterworkVersionsOfWeapons() { var shop = new WeaponShop(); var masterwork = shop.GetInventory <MasterworkWeapon>(); Assert.NotEmpty(masterwork); }
public static void InDoors(ICharacters character) { if (CityMap.PositionX == 20 && CityMap.PositionY == 19) { BuildingMessages.BuldingMessage("Arena"); Arena.FightInArena(character, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 26 && CityMap.PositionY == 11) { BuildingMessages.BuldingMessage("WeaponSmith"); Console.WriteLine("You have: " + character.Money + " money, " + character.Strength + " Strength!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetWeaponsAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Strength")); WeaponShop.Weapon(character, buildingitems, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 30 && CityMap.PositionY == 7) { BuildingMessages.BuldingMessage("ArmorSmith"); Console.WriteLine("You have: " + character.Money + " money, " + character.Durability + " Durability!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetArmorAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Durability")); ArmorSmith.Armor(character, buildingitems, OnInputWork.ChoiceHandler()); } else if (CityMap.PositionX == 16 && CityMap.PositionY == 4) { BuildingMessages.BuldingMessage("Shop"); Console.WriteLine("You have: " + character.Money + " money, " + character.Alchemics + " Alchemics!"); List <CreatingItems> buildingitems = new List <CreatingItems>(); buildingitems = ProductsInBuldings.GetShopAvailable(character); Console.WriteLine(ProductsInBuldings.ShowProductsAvailable(buildingitems, "Alchemics")); ItemShop.Item(character, buildingitems, OnInputWork.ChoiceHandler()); } }
public void AddSomeMagicWeaponsIntoTheMix() { var shop = new WeaponShop(); var magical = shop.GetInventory <MagicWeapon>(); Assert.NotEmpty(magical); }
void Awake() { if (!shop) { shop = GameObject.FindObjectOfType <WeaponShop>(); } NextLevel(); }
void Awake() { _Instance = this; tweenPosition = GetComponent <TweenPosition>(); gridGo = transform.Find("Scroll View/Grid").gameObject; grid = gridGo.GetComponent <UIGrid>(); scrollView = GetComponentInChildren <UIScrollView>(); weaponObjectIds = ObjectsInfo._Instance.GetObjectInfos(ObjectType.Equip); }
public WeaponsActor(ServerSession session, PlayerCharactersActor charactersActor) : base(session) { this.charactersActor = charactersActor; weaponShops = new Dictionary <int, WeaponShop>(); weaponShopPrefab = Resources.Load <WeaponShop>("Prefabs/Weapons/weapon_picker"); charactersActor.OnPlayerEntitySpawned += AllowWeaponForCharacter; charactersActor.OnPlayerEntityDestroy += DestroyWeaponShop; LoadResources(); }
void Start() { Time.timeScale = 1; weaponShopInfo = GameObject.Find("WeaponShoop").GetComponent <WeaponShop>(); armourShopInfo = GameObject.Find("ArmourShop").GetComponent <Shop>(); //money gold = gold.GetComponent <Text>(); crystals = crystals.GetComponent <Text>(); goldCostArUI = goldCostArUI.GetComponent <Text>(); crystalCostArUI = crystalCostArUI.GetComponent <Text>(); goldCostWUI = goldCostWUI.GetComponent <Text>(); crystalCostWUI = crystalCostWUI.GetComponent <Text>(); //EnergyBar notEnoughtEnergy = notEnoughtEnergy.GetComponent <Canvas>(); energyBar = energyBar.GetComponent <Image>(); energyBarIndicator = energyBarIndicator.GetComponent <Text>(); playerInfoMenu = GameObject.Find("PlayerInfoMenu"); playerInfoSC = playerInfoMenu.GetComponent <PlayerINFOScript>(); energyTimer = GameObject.Find("EventSystem").GetComponent <EnergyTimer>(); UpdateEnergyBar(); //Canvases secondQuestionWeapon = secondQuestionWeapon.GetComponent <Canvas>(); begginingMenu = begginingMenu.GetComponent <Canvas>(); mainMenu = mainMenu.GetComponent <Canvas>(); chaptersMenu = chaptersMenu.GetComponent <Canvas>(); levelMenu = levelMenu.GetComponent <Canvas>(); shopMenu = shopMenu.GetComponent <Canvas>(); armourMenu = armourMenu.GetComponent <Canvas>(); weaponMenu = weaponMenu.GetComponent <Canvas>(); //Buttons //shoping notEnoughMoney = notEnoughMoney.GetComponent <Canvas>(); notEnoughMoney.enabled = false; notEnoughMoneyText = notEnoughMoneyText.GetComponent <Text>(); //Enabling Menus notEnoughtEnergy.enabled = false; begginingMenu.enabled = true; mainMenu.enabled = false; chaptersMenu.enabled = false; levelMenu.enabled = false; shopMenu.enabled = false; armourMenu.enabled = false; weaponMenu.enabled = false; secondQuestion.enabled = false; secondQuestionWeapon.enabled = false; // results level1 timelevel1 = timelevel1.GetComponent <Text>(); }
public void SerializeJSON() { // Weapon sword = new Weapon("Sword of Doom", 100); WeaponShop shop = new WeaponShop(); shop.inventory = weaponInventory; string jsonString = JsonUtility.ToJson(shop, true); using (StreamWriter stream = File.CreateText(_jsonWeapons)) { stream.WriteLine(jsonString); } }
public CurrentBuilding( Building building = null, Church church = null, ArmorShop armorShop = null, WeaponShop weaponShop = null, ItemShop itemShop = null ) { Building = building; Church = church; ArmorShop = armorShop; WeaponShop = weaponShop; ItemShop = itemShop; }
public Location( string name, Coords coords, Building[] buildings, Citizen[] citizens, string category, Church church, ArmorShop armorShop, WeaponShop weaponShop, ItemShop itemShop ) { Name = name; Coords = coords; Buildings = buildings; Citizens = citizens; Category = category; Church = church; ArmorShop = armorShop; WeaponShop = weaponShop; ItemShop = itemShop; }
/// <summary> /// Initializes a new instance of the /// <see cref="SilverNeedle.Actions.CharacterGeneration.PurchaseMeleeWeapon"/> class. /// </summary> /// <param name="weapons">Weapons available for purchase</param> public PurchaseMeleeWeapon(WeaponShop shop) { this.shop = shop; }
/// <summary> /// Initializes a new instance of the /// <see cref="SilverNeedle.Actions.CharacterGeneration.PurchaseRangedWeapon"/> class. /// </summary> /// <param name="weapons">Weapons available for purchase</param> public PurchaseRangedWeapon(WeaponShop shop) { this.shop = shop; }
public PurchaseRangedWeapon() { this.shop = new WeaponShop(); }
private void LoadResources() { WeaponShop.LoadWeaponsPrefabs(WeaponShop.TeamWeapons(TeamType.Chaos)); WeaponShop.LoadWeaponsPrefabs(WeaponShop.TeamWeapons(TeamType.Rondo)); }
public PurchaseMeleeWeapon() { this.shop = new WeaponShop(); }
public void SetCurrentBuilding(WeaponShop weaponShop) { ResetBuildings(); WeaponShop = weaponShop; }
private void Awake() { _instance = this; }