healPlayer() public method

public healPlayer ( int healing ) : void
healing int
return void
Example #1
0
    void OnTriggerEnter2D(Collider2D hit)
    {
        playerHealth playerHeartsController = hit.GetComponent <playerHealth>();

        if (playerHeartsController != null)
        {
            StatsController.HeartPickups++;
            Collider.enabled = false;
            Renderer.enabled = false;
            playerHeartsController.healPlayer(HeartAmmount);
        }
    }