38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using UnityEngine;
|
|
using Fusion;
|
|
|
|
public enum TrapType
|
|
{
|
|
BearTrap,
|
|
PoisonGasTrap,
|
|
AlarmTrap,
|
|
FlashbangTrap
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "NewTrapData", menuName = "BabaYaga/TrapData")]
|
|
public class TrapDataSO : ScriptableObject
|
|
{
|
|
[Header("Basic Info")]
|
|
public string TrapName;
|
|
public TrapType Type;
|
|
public NetworkPrefabRef TrapPrefab;
|
|
public GameObject GhostPrefab; // Preview mesh for Trapper client
|
|
|
|
[Header("Gameplay Variables")]
|
|
public float Cooldown = 5f;
|
|
public float ArmingDelay = 1.5f; // Time before trap becomes active
|
|
public float Lifetime = 60f; // Time before trap despawns automatically
|
|
public float PlacementMaxDistance = 5f;
|
|
|
|
[Header("Specific Effects")]
|
|
public float Damage = 30f;
|
|
public float EffectDuration = 3f; // Stun/Blind/Alarm duration
|
|
public float EffectRadius = 4f; // For AoE traps like gas/flashbang
|
|
|
|
[Header("Audio & Visuals")]
|
|
public Sprite Icon;
|
|
public AudioClip PlaceSFX;
|
|
public AudioClip TriggerSFX;
|
|
public GameObject TriggerVFX;
|
|
}
|