enemy spawner
This commit is contained in:
23
Game/Scripts/Vfx/ProjectileImpactVfxSettings.cs
Normal file
23
Game/Scripts/Vfx/ProjectileImpactVfxSettings.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace MegaKoop.Game.Vfx
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ProjectileImpactVfxSettings", menuName = "MegaKoop/VFX/Projectile Impact Settings")]
|
||||
public class ProjectileImpactVfxSettings : ScriptableObject
|
||||
{
|
||||
public const string ResourcePath = "ProjectileImpactVfxSettings";
|
||||
|
||||
[SerializeField] private GameObject heroImpactPrefab;
|
||||
[SerializeField] private GameObject enemyImpactPrefab;
|
||||
[SerializeField] private float fallbackLifetime = 4f;
|
||||
|
||||
public GameObject HeroImpactPrefab => heroImpactPrefab;
|
||||
public GameObject EnemyImpactPrefab => enemyImpactPrefab;
|
||||
public float FallbackLifetime => Mathf.Max(0.5f, fallbackLifetime);
|
||||
|
||||
public static ProjectileImpactVfxSettings LoadFromResources()
|
||||
{
|
||||
return Resources.Load<ProjectileImpactVfxSettings>(ResourcePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user