22 lines
656 B
C#
22 lines
656 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Saltosion.OneWeapon {
|
|
public class Health : MonoBehaviour {
|
|
public float MaxHealth;
|
|
public float CurrentHealth;
|
|
|
|
private PlayerFun PlayerFun;
|
|
|
|
private void Start() {
|
|
PlayerFun = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerFun>();
|
|
}
|
|
|
|
public void Damage(float amount, Vector2 fromDirection) {
|
|
BloodLauncher.Splatter(transform.position, -fromDirection, (int)(amount), 100f, 100);
|
|
CurrentHealth -= amount * (1 + PlayerFun.CurrentDamageBoost);
|
|
}
|
|
}
|
|
}
|