private void OnPlayerSpawned(GameObject player) { _playerHealth = player.GetComponent <PlayerHealth>(); _playerWallet = player.GetComponent <PlayerWallet>(); SetWave(_currentWaveNumber); }
private void GatherComponents() { dialogueManager = GetComponent <DialogueManager>(); windowCloser = GetComponent <CloseOpenWindows>(); playerWallet = GetComponent <PlayerWallet>(); playerManager = GetComponent <PlayerManager>(); unitReactionManager = GetComponent <UnitReactionManager>(); }
// Start is called before the first frame update void Start() { billetera = new PlayerWallet(); SM = new StoreManager(billetera); SM.billetera.dineroJugador[0] = bc.goldCounterA; SM.billetera.dineroJugador[1] = bc.goldCounterB; }
protected override void GatherComponents() { base.GatherComponents(); equipmentManager = GetComponent <EquipmentManager>(); inventory = InventoryManager.GetInstance().GetInventory(); wallet = ScriptToolbox.GetInstance().GetPlayerWallet(); myBody = GetComponent <BodyPartController>(); combatSkills = GetComponent <CombatSkills>(); }
public void SetUp() { _wallet = new PlayerWallet(); _repository = Substitute.For <WalletRepository>(); _repository.Get().Returns(Observable.Return(_wallet)); _walletService = new WalletService(_repository); }
void Start() { playerWallet = ScriptToolbox.GetInstance().GetPlayerWallet(); inv = InventoryManager.GetInstance().GetInventory(); shop = InventoryManager.GetInstance().GetShopInventory(); shopDialogue = InventoryManager.GetInstance().GetShopDialogue(); qntyPrompt = InventoryManager.GetInstance().GetQuantityPrompt(); psm = ScriptToolbox.GetInstance().GetPlayerManager().playerStateMachine; }
public IEnumerator Start() { wallet = PlayerWallet.instance; wallet.savingModule.changeWalletValue += ChangeWalletValue; ChangeWalletValue(wallet.Wallet); yield return(null); toggle_playerPrefs.isOn = wallet.savingModule.SavingInPlayerPrefs; toggle_file.isOn = wallet.savingModule.SavingInFile; toggle_binFile.isOn = wallet.savingModule.SavingInBinFile; }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { PlayerWallet currentWallet = other.GetComponent <PlayerWallet>(); if (currentWallet) { currentWallet.AddCoin(coinCost); gameObject.SetActive(false); } } }
// Start is called before the first frame update void Start() { if (GameOverScreen) { return; } _playerAttack = FindObjectOfType <PlayerAttack>(); _upgradeable = Upgradeable.GetComponent <Upgradeable>(); // SpriteImage.sprite = _upgradeable.GetSprite(); _playerWallet = Player.GetComponent <PlayerWallet>(); _fadeToBlack = GameObject.FindGameObjectWithTag("FadeToBlack").GetComponent <Animator>(); }
IEnumerator CreateNewWallet(int loadWay) { wallet.savingModule.changeWalletValue -= ChangeWalletValue; Destroy(wallet); yield return(null); GameObject newWallet = GameObject.Find("Wallet"); if (newWallet == null) { newWallet = new GameObject("Wallet"); } wallet = newWallet.AddComponent <PlayerWallet>(); wallet.savingModule = new SavingWalletData(toggle_playerPrefs.isOn, toggle_file.isOn, toggle_binFile.isOn, toggle_server.isOn, (SavingWalletData.LoadingPreset)loadWay); wallet.savingModule.changeWalletValue += ChangeWalletValue; ChangeWalletValue(wallet.Wallet); toggle_playerPrefs.isOn = wallet.savingModule.SavingInPlayerPrefs; toggle_file.isOn = wallet.savingModule.SavingInFile; toggle_binFile.isOn = wallet.savingModule.SavingInBinFile; toggle_binFile.isOn = wallet.savingModule.SavingOnServer; }
private void Start() { playerWallet = PlayerInstant.Instance.transform.gameObject.GetComponent <PlayerWallet>(); }
void Start() { slotClickHelper = InventoryManager.GetInstance().GetSlotClickHelpers(); playerWallet = ScriptToolbox.GetInstance().GetPlayerWallet(); }
public void SetWallet() { Wallet = this; }
public static void SetWallet(PlayerWallet wallet) { Wallet = wallet; }
private void OnPlayerSpawned(GameObject player) { _playerWallet = player.GetComponent <PlayerWallet>(); _playerWallet.MoneyChanged += OnMoneyChanged; }
public void specialLandProcess(PlayMoving thePlayer, PlayerWallet theWallet, ArrayList spLand) { var tempCounter = 0; //railroads if (((int)spLand [1] == 5) || ((int)spLand [1] == 15) || ((int)spLand [1] == 25) || ((int)spLand [1] == 35)) { var tempOwner = getOwner(spLand); //checks if the railroad is owned if (tempOwner != null) { for (int i = 0; i < theWallet.myLandList.Count - 1; i++) { var tempArr = (ArrayList)theWallet.myLandList [i]; if (tempArr [3].ToString() == "r") { tempCounter++; } } getOwner(spLand).addMoney(tempCounter * 75); //probalby need to fix these lines for datastructures theWallet.subtractMoney(tempCounter * 75); print("railroad rent paid"); } else if (theWallet.getWalletAmount() > 200) { monopolyGame.LocationLibrary.getLand(thePlayer.currentSpaceNum).Add(theWallet); theWallet.subtractMoney(200); print(thePlayer.getName() + "bought railroad"); } else { print("player doesnt have enough money to buy railroad"); } } //utility else if (((int)spLand [1] == 12) || ((int)spLand [1] == 28)) { var tempOwner = getOwner(spLand); //checks if the railroad is owned if (tempOwner != null) { for (int i = 0; i < theWallet.myLandList.Count - 1; i++) { var tempArr = (ArrayList)theWallet.myLandList [i]; if (tempArr [3].ToString() == "u") { tempCounter++; } } var number = Random.Range(2, 12); getOwner(spLand).addMoney(tempCounter * 4 * number); //probalby need to fix these lines for datastructures theWallet.subtractMoney(tempCounter * 4 * number); print("utilities paid"); } else if (theWallet.getWalletAmount() > 150) { monopolyGame.LocationLibrary.getLand(thePlayer.currentSpaceNum).Add(theWallet); theWallet.subtractMoney(150); print(thePlayer.getName() + "bought utility"); } else { print("player doesnt have enough money to buy utility"); } } //income tax --addmoney to communityvault else if ((int)spLand [1] == 4) { var tempMoney = (int)(theWallet.getWalletAmount() * 0.15); theWallet.subtractMoney(tempMoney); monopolyGame.updateCV_money(tempMoney); print("taxes paid"); monopolyGame.consoleText = thePlayer.getName() + " has paid taxes!"; } //luxury tax else if ((int)spLand [1] == 38) { theWallet.subtractMoney(75); print("luxury tax paid"); } //community chest else if (((int)spLand [1] == 2) || ((int)spLand [1] == 17) || ((int)spLand [1] == 33)) { CCdeck.CCnumber = Random.Range(1, 7); } //chance else if (((int)spLand [1] == 7) || ((int)spLand [1] == 22) || ((int)spLand [1] == 36)) { chanceDeck.ChanceNumber = Random.Range(1, 7); } else if ((int)spLand [1] == 20) //landed on free parking { theWallet.addMoney(monopolyGame.getCV_money()); monopolyGame.updateCV_money(-monopolyGame.getCV_money()); print("player cleared the community vault"); monopolyGame.consoleText = "Community Vault has been emptied by: " + thePlayer.getName(); } else if (((int)spLand [1] == 0)) { monopolyGame.consoleText = thePlayer.getName() + " is on GO! "; thePlayer.passedGO = true; } else { print("merp, nothing special"); //monopolyGame.consoleText = "Not a special place"; } }
void Awake() { instance = this; }
private void Awake() { playerWallet = FindObjectOfType <PlayerWallet>(); }
/** * Update the texts for a wallet. */ public void UpdateWallet(PlayerWallet wallet) { points.text = wallet.points.ToString(); coins.text = wallet.coins.ToString(); lifes.text = wallet.lifes.ToString(); }
public IObservable <PlayerWallet> Get() { var currencies = _playerDataRepository.GetWallet().Wait(); return(Observable.Return(_wallet ?? (_wallet = MapWallet(currencies)))); }
private void OnDestroy() { Instance = null; }
private void Awake() { Instance = this; }
private void OnPlayerSpawned(GameObject player) { _playerWallet = player.GetComponent <PlayerWallet>(); _playerWeapons = player.GetComponent <PlayerWeapons>(); _playerWallet.MoneyChanged += ChangeWeaponsStatus; }
private void Start() { betFields = FindObjectsOfType <BetField>().ToList(); playerWallet = FindObjectOfType <PlayerWallet>(); }
private void Start() { text = GetComponent <Text>(); playerWallet = PlayerInstant.Instance.GetComponent <PlayerWallet>(); }