Class EnemyAsset
- Namespace
- SurvivorsMaker.Data
- Assembly
- SurvivorsMaker.Data.dll
Inspector-authored enemy data converted to a cached runtime definition.
[CreateAssetMenu(menuName = "Survivor Roguelite Maker/Content/Enemy", fileName = "Enemy")]
public sealed class EnemyAsset : ContentDefinitionAsset<EnemyDef>, IContentTextSource
- Inheritance
-
ObjectScriptableObjectEnemyAsset
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Constructors
EnemyAsset()
public EnemyAsset()
Fields
AlwaysDropHeal
Always request a healing pickup on death, regardless of the normal drop roll.
[Tooltip("Always request a healing pickup on death, regardless of the normal drop roll.")]
public bool AlwaysDropHeal
Field Value
Attack
Special attack settings; None disables the special attack.
[Tooltip("Special attack settings; None disables the special attack.")]
public EnemyAttackEntry Attack
Field Value
BodyRadius
Body radius in world units; 0 uses Enemy Settings default body radius.
[Tooltip("Body radius in world units; 0 uses Enemy Settings default body radius.")]
public float BodyRadius
Field Value
CanDropHeal
Allow the normal healing-pickup drop roll on death.
[Tooltip("Allow the normal healing-pickup drop roll on death.")]
public bool CanDropHeal
Field Value
ContactDamage
Contact damage points scaled by wave; 0 causes no contact damage.
[Tooltip("Contact damage points scaled by wave; 0 causes no contact damage.")]
public Scaled ContactDamage
Field Value
DeathSpawn
Child spawn request on death. Count 0 disables it.
[Tooltip("Child spawn request on death. Count 0 disables it.")]
public EnemyDeathSpawnEntry DeathSpawn
Field Value
Description
Plain text description shown with the name; empty = no description.
[Tooltip("Plain description shown with the name.")]
[TextArea(2, 5)]
public string Description
Field Value
DisplayName
Display label; empty uses a name derived from the content id.
[Tooltip("Name shown in menus, cards, alerts and records. Empty = derived from the Id.")]
public string DisplayName
Field Value
Health
Health points scaled by wave, then clamped to the authored minimum.
[Tooltip("Health points scaled by wave, then clamped to the authored minimum.")]
public Scaled Health
Field Value
HitRadius
Weapon hit radius in world units; 0 uses the resolved body radius.
[Tooltip("Weapon hit radius in world units; 0 uses the resolved body radius.")]
public float HitRadius
Field Value
Id
Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.
[Tooltip("Stable, nonempty content id. Keep unique within its content kind and unchanged for saved runs.")]
public string Id
Field Value
IsBoss
Mark this enemy as a boss for events, phases and boss-ending waves.
[Tooltip("Mark this enemy as a boss for events, phases and boss-ending waves.")]
public bool IsBoss
Field Value
KnockbackResistance
Fraction of knockback resisted, from 0 to 1; 1 = no displacement.
[Tooltip("Fraction of knockback resisted, from 0 to 1; 1 = no displacement.")]
public float KnockbackResistance
Field Value
Movement
Movement behaviour and parameters; empty behaviour ids use the built-in enum choice.
[Tooltip("Movement behaviour and parameters; empty behaviour ids use the built-in enum choice.")]
public MovementDef Movement
Field Value
Phases
Boss phases checked in list order against remaining health ratio. Empty = no phase changes.
[Tooltip("Boss phases checked in list order against remaining health ratio. Empty = no phase changes.")]
public List<BossPhaseEntry> Phases
Field Value
Speed
Base movement speed in world units per second; 0 = stationary.
[Tooltip("Base movement speed in world units per second; 0 = stationary.")]
public float Speed
Field Value
SpeedJitter
Maximum symmetric speed variation in world units per second; 0 = fixed speed.
[Tooltip("Maximum symmetric speed variation in world units per second; 0 = fixed speed.")]
public float SpeedJitter
Field Value
StatusImmunities
Built-in status kinds this enemy ignores. Empty = no built-in immunities.
[Tooltip("Built-in status kinds this enemy ignores. Empty = no built-in immunities.")]
public List<StatusKind> StatusImmunities
Field Value
StatusImmunityIds
Status behaviour ids this enemy ignores (custom statuses).
[Tooltip("Registered status ids this enemy ignores. Empty = no custom immunities.")]
public List<string> StatusImmunityIds
Field Value
Support
Optional nearby-enemy healing; disabled by default.
[Tooltip("Optional nearby-enemy healing; disabled by default.")]
public SupportDef Support
Field Value
TextKey
Optional localization key base; empty uses the content kind and id.
[Tooltip("Optional localization key base: \"<key>.name\" and \"<key>.description\". Empty = \"enemy.<Id>\".")]
public string TextKey
Field Value
Value
Nonnegative base reward value before wave and elite modifiers.
[Tooltip("Nonnegative base reward value before wave and elite modifiers.")]
public int Value
Field Value
Methods
Populate(EnemyDef)
Fills the already-cached definition shell; resolve asset references through their conversion caches.
protected override void Populate(EnemyDef def)
Parameters
defEnemyDef
ToEnemyDef()
Returns the cached runtime definition for this asset revision; repeated references preserve object identity.
public EnemyDef ToEnemyDef()
Returns
Validate()
Returns authoring problems without repairing or changing serialized fields; an empty list means valid.
public override List<string> Validate()