Class SoldierAsset

Namespace
TDMaker.Unity.Authoring
Assembly
TDMaker.Unity.dll

A friendly unit produced by a barracks tower to block enemies.

[CreateAssetMenu(menuName = "2D Tower Defense Maker/Soldier", fileName = "Soldier", order = 12)]
public sealed class SoldierAsset : EntityAssetBase
Inheritance
Object
ScriptableObject
SoldierAsset
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.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Constructors

SoldierAsset()

public SoldierAsset()

Fields

engagement

Where this soldier stands beside the enemy it blocks (its share of the horizontal gap and a Y shift).

public EngagementGuestData engagement

Field Value

EngagementGuestData

flying

Flies (only anti-air attacks reach it). Meant for flying follower companions; barracks soldiers should stay on the ground.

[Tooltip("Flies: only anti-air attacks reach it. Needed by flying follower companions; keep it off for barracks soldiers and ground escorts.")]
public bool flying

Field Value

bool

health

Maximum hit points.

[Min(1)]
public float health

Field Value

float

interceptRadius

Radius around the rally point in which enemies are engaged.

[Min(0)]
public float interceptRadius

Field Value

float

magicalArmor

Magical damage reduction in [0, 1].

[Range(0, 1)]
public float magicalArmor

Field Value

float

melee

Melee attack; soldiers without melee cannot block.

public MeleeData melee

Field Value

MeleeData

physicalArmor

Physical damage reduction in [0, 1].

[Range(0, 1)]
public float physicalArmor

Field Value

float

rangedAttacks

Optional ranged attacks.

public List<RangedAttackData> rangedAttacks

Field Value

List<RangedAttackData>

speed

Movement speed in world units per second.

[Min(0)]
public float speed

Field Value

float

tags

Author-defined tag bits matched by effect and mechanic eligibility (Required/Rejected Tags).

public int tags

Field Value

int

Methods

BuildTemplate()

Builds the unresolved core template.

public override EntityTemplate BuildTemplate()

Returns

EntityTemplate

CollectProjectiles(List<ProjectileAsset>)

Adds projectile assets used by this asset's attacks.

public override void CollectProjectiles(List<ProjectileAsset> output)

Parameters

output List<ProjectileAsset>