2023-01-22 16:38:23 +01:00
|
|
|
|
using System;
|
|
|
|
|
using ABI.CCK.Scripts;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.Events;
|
|
|
|
|
|
|
|
|
|
namespace ABI.CCK.Components
|
|
|
|
|
{
|
|
|
|
|
public class CombatSystem : Health
|
|
|
|
|
{
|
|
|
|
|
[Header("General settings")]
|
|
|
|
|
public bool friendlyFire = false;
|
|
|
|
|
|
|
|
|
|
public enum RespawnBehavior
|
|
|
|
|
{
|
|
|
|
|
RespawnOnWorld = 0,
|
|
|
|
|
RespawnOnPoint = 1,
|
|
|
|
|
RespawnInPlace = 2,
|
|
|
|
|
None = 3,
|
|
|
|
|
}
|
|
|
|
|
[Header("Respawn Behavior")]
|
|
|
|
|
public RespawnBehavior respawnBehavior = RespawnBehavior.RespawnOnWorld;
|
|
|
|
|
public Transform respawnPoint;
|
|
|
|
|
public float respawnTime = 10f;
|
|
|
|
|
|
|
|
|
|
[Header("Events")]
|
|
|
|
|
public UnityEvent playerDownEvent = new UnityEvent();
|
2023-07-30 01:20:46 +02:00
|
|
|
|
public UnityEvent playerHitEvent = new UnityEvent();
|
2023-01-22 16:38:23 +01:00
|
|
|
|
public UnityEvent playerRespawnEvent = new UnityEvent();
|
|
|
|
|
public UnityEvent playerRevitalizeEvent = new UnityEvent();
|
|
|
|
|
|
|
|
|
|
[Header("PVP Events")]
|
|
|
|
|
public UnityEvent playerDownedEvent = new UnityEvent();
|
|
|
|
|
public UnityEvent downedAnotherPlayerEvent = new UnityEvent();
|
2023-07-30 01:20:46 +02:00
|
|
|
|
public UnityEvent playerGotHitEvent = new UnityEvent();
|
|
|
|
|
public UnityEvent hitAnotherPlayerEvent = new UnityEvent();
|
2023-01-22 16:38:23 +01:00
|
|
|
|
|
|
|
|
|
private void Reset()
|
|
|
|
|
{
|
|
|
|
|
referenceID = Guid.NewGuid().ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|