void Awake() { grunt = Resources.Load <AudioClip> ("Sounds/Grunt"); readyForGrunt = true; audioManager = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager> (); playerScore = 0; this.currentPlayerHealth = this.playerhealth; //loads playerHealth this.currentPlayerArmor = this.playerArmor; //loads playerArmor this.currentPlayerWillPower = this.playerWillPower; //loads player will power this.currentPlayerDamage = this.playerDamage; //loads player damage playerDamageText.text = this.currentPlayerDamage.ToString(); playerCritText.text = this.playerCritChance.ToString() + "%"; playerWillText.text = this.currentPlayerWillPower.ToString(); playerHealthText.text = this.currentPlayerHealth.ToString(); playerArmorText.text = this.currentPlayerArmor.ToString(); HealthActive.SetActive(false); CriticalActive.SetActive(false); WillPowerActive.SetActive(false); uiManager = GameObject.Find("scorePanel"); ups = uiManager.GetComponent <UpdatePlayerScore> (); popupText = GetComponent <GetPopupText> (); }
public Callback(UpdatePlayerGrid grid, UpdatePlayerScore score, GameMessageDelegate msg, ChatMessageDelegate chat) { m_curDispatch = Dispatcher.CurrentDispatcher; m_updateGrid += grid; m_updateScore += score; m_gameMessage += msg; m_chatMessage += chat; }
public async Task <IActionResult> UpdatePlayerScore(UpdatePlayerScore command) { var result = await Mediator.Send(command); if (result != null) { return(Ok()); } return(BadRequest()); }
private void Awake() { scoreKeeper = FindObjectOfType <ScoreKeeper>(); if (gameObject.CompareTag("Player")) { HUD = FindObjectOfType <Canvas>(); playerRank = HUD.GetComponentInChildren <UpdatePlayerScore>(); } }