コード例 #1
0
    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> ();
    }
コード例 #2
0
ファイル: Callback.cs プロジェクト: mrcrassi/multisweeper
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
        public async Task <IActionResult> UpdatePlayerScore(UpdatePlayerScore command)
        {
            var result = await Mediator.Send(command);

            if (result != null)
            {
                return(Ok());
            }
            return(BadRequest());
        }
コード例 #5
0
    private void Awake()
    {
        scoreKeeper = FindObjectOfType <ScoreKeeper>();

        if (gameObject.CompareTag("Player"))
        {
            HUD = FindObjectOfType <Canvas>();

            playerRank = HUD.GetComponentInChildren <UpdatePlayerScore>();
        }
    }