public override int GetHashCode() { int hash = 1; if (pokemonData_ != null) { hash ^= PokemonData.GetHashCode(); } if (item_ != null) { hash ^= Item.GetHashCode(); } if (pokedexEntry_ != null) { hash ^= PokedexEntry.GetHashCode(); } if (playerStats_ != null) { hash ^= PlayerStats.GetHashCode(); } if (playerCurrency_ != null) { hash ^= PlayerCurrency.GetHashCode(); } if (playerCamera_ != null) { hash ^= PlayerCamera.GetHashCode(); } if (inventoryUpgrades_ != null) { hash ^= InventoryUpgrades.GetHashCode(); } if (appliedItems_ != null) { hash ^= AppliedItems.GetHashCode(); } if (eggIncubators_ != null) { hash ^= EggIncubators.GetHashCode(); } if (candy_ != null) { hash ^= Candy.GetHashCode(); } if (quest_ != null) { hash ^= Quest.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (PokemonId != 0UL) { hash ^= PokemonId.GetHashCode(); } if (Item != 0) { hash ^= Item.GetHashCode(); } if (PokedexEntryId != 0) { hash ^= PokedexEntryId.GetHashCode(); } if (PlayerStats != false) { hash ^= PlayerStats.GetHashCode(); } if (PlayerCurrency != false) { hash ^= PlayerCurrency.GetHashCode(); } if (PlayerCamera != false) { hash ^= PlayerCamera.GetHashCode(); } if (InventoryUpgrades != false) { hash ^= InventoryUpgrades.GetHashCode(); } if (AppliedItems != false) { hash ^= AppliedItems.GetHashCode(); } if (EggIncubators != false) { hash ^= EggIncubators.GetHashCode(); } if (PokemonFamilyId != 0) { hash ^= PokemonFamilyId.GetHashCode(); } if (QuestType != 0) { hash ^= QuestType.GetHashCode(); } return(hash); }
void Start() { mRaycastHits = new RaycastHit[NumberOfRaycastHits]; mMap = GetComponentInChildren <Environment>(); Character.setCharacterType(1); //Setting up gameobjects paddockProfile = GameObject.Find("PaddockStats"); actionSprite = GameObject.Find("Sprite"); profile = GameObject.Find("DogStats"); deletionScreen = GameObject.Find("PaddockDeletion"); //Setting up gameobjects with the appropriate scripts paddockHandle = GameObject.Find("PaddockHandler").GetComponent <PaddockHandler>(); dog = GameObject.Find("DogHandler").GetComponent <DogHandler>(); environment = GameObject.Find("Environment").GetComponent <Environment>(); cam = GameObject.Find("MainCamera").GetComponent <CameraScript>(); currency = GameObject.Find("Currency").GetComponent <PlayerCurrency>(); park = GameObject.Find("ParkHandler").GetComponent <Park>(); vis = GameObject.Find("VisitorHandler").GetComponent <VisitorHandler>(); decorations = GameObject.Find("Decoration").GetComponent <Decorations>(); events = GameObject.Find("Event").GetComponent <Events>(); level = GameObject.Find("Levelling").GetComponent <LevelExp>(); //Set up the paddock colour - darker green than the tiles paddockColor = new Color32(60, 107, 62, 1); actionSprite.SetActive(false); //Three seperate colours for grass - used for when deleting paths grassColours.Add(new Color32(98, 214, 164, 1)); grassColours.Add(new Color32(122, 221, 159, 1)); grassColours.Add(new Color32(105, 229, 140, 1)); pauseScreen.SetActive(false); tutorialScreen.SetActive(false); deletionScreen.SetActive(false); ShowMenu(true); }
public void itemSelected() { string indexStr = EventSystem.current.currentSelectedGameObject.name; int index = int.Parse(indexStr); int price = int.Parse(EventSystem.current.currentSelectedGameObject.GetComponentInChildren <TextMeshProUGUI>().text); if ((PlayerCurrency.wealth - price) >= 0) { // Buying a Gun if (index != 10) { PlayerCurrency playerCurrency = player.GetComponent <PlayerCurrency>(); playerCurrency.UpdateCurrency(PlayerCurrency.wealth - price); PlayerInit.gunsFound[index] = true; // Buying Health Upgrade } else { playerHealth.BuyHP(); } } }
public override int GetHashCode() { int hash = 1; if (PokemonId != 0UL) { hash ^= PokemonId.GetHashCode(); } if (Item != 0) { hash ^= Item.GetHashCode(); } if (PokedexEntryId != 0) { hash ^= PokedexEntryId.GetHashCode(); } if (PlayerStats != false) { hash ^= PlayerStats.GetHashCode(); } if (PlayerCurrency != false) { hash ^= PlayerCurrency.GetHashCode(); } if (PlayerCamera != false) { hash ^= PlayerCamera.GetHashCode(); } if (InventoryUpgrades != false) { hash ^= InventoryUpgrades.GetHashCode(); } if (AppliedItems != false) { hash ^= AppliedItems.GetHashCode(); } if (EggIncubators != false) { hash ^= EggIncubators.GetHashCode(); } if (PokemonFamilyId != 0) { hash ^= PokemonFamilyId.GetHashCode(); } if (QuestType != 0) { hash ^= QuestType.GetHashCode(); } if (AvatarTemplateId.Length != 0) { hash ^= AvatarTemplateId.GetHashCode(); } if (RaidTickets != false) { hash ^= RaidTickets.GetHashCode(); } if (Quests != false) { hash ^= Quests.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
private void Start() { playerIdentifierComponent = ComponentLocator.instance.GetDependency <PlayerIdentifierComponent>(); currency = ComponentLocator.instance.singleObjectInstanceReferences.playerProfile.playerCurrency; IAP = ComponentLocator.instance.GetDependency <IAPPurchaseCanvasComponent>(); }
private void Awake() { _instance = this; _currency = 0; }
private void Awake() { inventory = ComponentLocator.instance.singleObjectInstanceReferences.playerProfile.playerItemInventory; playerCurrency = ComponentLocator.instance.singleObjectInstanceReferences.playerProfile.playerCurrency; }
public void MergeFrom(InventoryItemData other) { if (other == null) { return; } if (other.pokemonData_ != null) { if (pokemonData_ == null) { pokemonData_ = new global::POGOProtos.Data.PokemonData(); } PokemonData.MergeFrom(other.PokemonData); } if (other.item_ != null) { if (item_ == null) { item_ = new global::POGOProtos.Inventory.Item.ItemData(); } Item.MergeFrom(other.Item); } if (other.pokedexEntry_ != null) { if (pokedexEntry_ == null) { pokedexEntry_ = new global::POGOProtos.Data.PokedexEntry(); } PokedexEntry.MergeFrom(other.PokedexEntry); } if (other.playerStats_ != null) { if (playerStats_ == null) { playerStats_ = new global::POGOProtos.Data.Player.PlayerStats(); } PlayerStats.MergeFrom(other.PlayerStats); } if (other.playerCurrency_ != null) { if (playerCurrency_ == null) { playerCurrency_ = new global::POGOProtos.Data.Player.PlayerCurrency(); } PlayerCurrency.MergeFrom(other.PlayerCurrency); } if (other.playerCamera_ != null) { if (playerCamera_ == null) { playerCamera_ = new global::POGOProtos.Data.Player.PlayerCamera(); } PlayerCamera.MergeFrom(other.PlayerCamera); } if (other.inventoryUpgrades_ != null) { if (inventoryUpgrades_ == null) { inventoryUpgrades_ = new global::POGOProtos.Inventory.InventoryUpgrades(); } InventoryUpgrades.MergeFrom(other.InventoryUpgrades); } if (other.appliedItems_ != null) { if (appliedItems_ == null) { appliedItems_ = new global::POGOProtos.Inventory.AppliedItems(); } AppliedItems.MergeFrom(other.AppliedItems); } if (other.eggIncubators_ != null) { if (eggIncubators_ == null) { eggIncubators_ = new global::POGOProtos.Inventory.EggIncubators(); } EggIncubators.MergeFrom(other.EggIncubators); } if (other.candy_ != null) { if (candy_ == null) { candy_ = new global::POGOProtos.Inventory.Candy(); } Candy.MergeFrom(other.Candy); } if (other.quest_ != null) { if (quest_ == null) { quest_ = new global::POGOProtos.Data.Quests.Quest(); } Quest.MergeFrom(other.Quest); } if (other.avatarItem_ != null) { if (avatarItem_ == null) { avatarItem_ = new global::POGOProtos.Data.Avatar.AvatarItem(); } AvatarItem.MergeFrom(other.AvatarItem); } if (other.raidTickets_ != null) { if (raidTickets_ == null) { raidTickets_ = new global::POGOProtos.Inventory.RaidTickets(); } RaidTickets.MergeFrom(other.RaidTickets); } }
public PlayerProfile() { playerItemInventory = new PlayerItemInventory(); playerCurrency = new PlayerCurrency(); }
void Start() { player = GameObject.Find("obj_player"); playerCurr = player.GetComponent <PlayerCurrency>(); }
private void Start() { pMoney = player.GetComponent <PlayerCurrency> (); UpdateCurrencyText(); }
public void MergeFrom(InventoryItemData other) { if (other == null) { return; } if (other.pokemonData_ != null) { if (pokemonData_ == null) { pokemonData_ = new global::POGOProtos.Data.PokemonData(); } PokemonData.MergeFrom(other.PokemonData); } if (other.ItemId != null) { if (ItemId == null) { ItemId = new global::POGOProtos.Inventory.Item.ItemData(); } Item.MergeFrom(other.Item); } if (other.pokedexEntry_ != null) { if (pokedexEntry_ == null) { pokedexEntry_ = new global::POGOProtos.Data.PokedexEntry(); } PokedexEntry.MergeFrom(other.PokedexEntry); } if (other.playerStats_ != null) { if (playerStats_ == null) { playerStats_ = new global::POGOProtos.Data.Player.PlayerStats(); } PlayerStats.MergeFrom(other.PlayerStats); } if (other.playerCurrency_ != null) { if (playerCurrency_ == null) { playerCurrency_ = new global::POGOProtos.Data.Player.PlayerCurrency(); } PlayerCurrency.MergeFrom(other.PlayerCurrency); } if (other.playerCamera_ != null) { if (playerCamera_ == null) { playerCamera_ = new global::POGOProtos.Data.Player.PlayerCamera(); } PlayerCamera.MergeFrom(other.PlayerCamera); } if (other.inventoryUpgrades_ != null) { if (inventoryUpgrades_ == null) { inventoryUpgrades_ = new global::POGOProtos.Inventory.InventoryUpgrades(); } InventoryUpgrades.MergeFrom(other.InventoryUpgrades); } if (other.appliedItems_ != null) { if (appliedItems_ == null) { appliedItems_ = new global::POGOProtos.Inventory.AppliedItems(); } AppliedItems.MergeFrom(other.AppliedItems); } if (other.eggIncubators_ != null) { if (eggIncubators_ == null) { eggIncubators_ = new global::POGOProtos.Inventory.EggIncubators(); } EggIncubators.MergeFrom(other.EggIncubators); } if (other.candy_ != null) { if (candy_ == null) { candy_ = new global::POGOProtos.Inventory.Candy(); } Candy.MergeFrom(other.Candy); } }
private void Awake() { inventory = FindObjectOfType <Inventory>(); playerCurrency = FindObjectOfType <PlayerCurrency>(); AssignShopReferences(shopParent.transform); }
public override int GetHashCode() { int hash = 1; if (pokemonData_ != null) { hash ^= PokemonData.GetHashCode(); } if (item_ != null) { hash ^= Item.GetHashCode(); } if (pokedexEntry_ != null) { hash ^= PokedexEntry.GetHashCode(); } if (playerStats_ != null) { hash ^= PlayerStats.GetHashCode(); } if (playerCurrency_ != null) { hash ^= PlayerCurrency.GetHashCode(); } if (playerCamera_ != null) { hash ^= PlayerCamera.GetHashCode(); } if (inventoryUpgrades_ != null) { hash ^= InventoryUpgrades.GetHashCode(); } if (appliedItems_ != null) { hash ^= AppliedItems.GetHashCode(); } if (eggIncubators_ != null) { hash ^= EggIncubators.GetHashCode(); } if (candy_ != null) { hash ^= Candy.GetHashCode(); } if (quest_ != null) { hash ^= Quest.GetHashCode(); } if (avatarItem_ != null) { hash ^= AvatarItem.GetHashCode(); } if (raidTickets_ != null) { hash ^= RaidTickets.GetHashCode(); } if (quests_ != null) { hash ^= Quests.GetHashCode(); } if (giftBoxes_ != null) { hash ^= GiftBoxes.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }