Example #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Enemy Object")
        {
            player_stats.ModifyPlayerHealth(damage_amount);
        }

        if (collision.gameObject.tag == "Health Object")
        {
            player_stats.ModifyPlayerHealth(heal);
        }

        if (collision.gameObject.tag == "Objective")
        {
            manager.score_player += score_amount;
        }
    }
Example #2
0
 public void ChangePlayerHealth(Stats.PlayerStats stats, int mod)
 {
     stats.ModifyPlayerHealth(mod);
 }