24 lines
733 B
C#
24 lines
733 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Saltosion.OneWeapon.Player;
|
|
using Saltosion.OneWeapon.Effects;
|
|
|
|
namespace Saltosion.OneWeapon.Enemies {
|
|
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);
|
|
}
|
|
}
|
|
}
|