serialize some fields
This commit is contained in:
parent
ef5063c8a5
commit
fb945db872
3 changed files with 19 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ namespace TD.Gameplay.BuilderSpells
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <see cref="BuilderSpellDefinition.TargetType"/> is <see cref="SpellTargetType.PointTarget"/>
|
||||
/// — the cast controller shows only a fixed-size reticle, even though
|
||||
/// — the cast controller shows only a fixed-size reticule, even though
|
||||
/// <see cref="BuilderSpellDefinition.Radius"/> is still used internally here as the splash
|
||||
/// radius (0 = no splash, direct hit only).
|
||||
/// </remarks>
|
||||
|
|
@ -19,6 +19,14 @@ namespace TD.Gameplay.BuilderSpells
|
|||
{
|
||||
public override BuilderSpellKind Kind => BuilderSpellKind.Fireball;
|
||||
|
||||
[Header("Impact VFX")]
|
||||
[Tooltip("Prefab spawned at the target point on a successful cast. Optional — leave empty for no visual.")]
|
||||
[SerializeField] private GameObject impactVfxPrefab;
|
||||
|
||||
[Tooltip("Seconds before the spawned VFX instance is destroyed.")]
|
||||
[Min(0f)]
|
||||
[SerializeField] private float impactVfxLifetime = 2f;
|
||||
|
||||
[Header("Fireball")]
|
||||
[Tooltip("Damage dealt to every enemy within Radius of the target point.")]
|
||||
[Min(0f)]
|
||||
|
|
@ -43,5 +51,11 @@ namespace TD.Gameplay.BuilderSpells
|
|||
|
||||
return hitAny;
|
||||
}
|
||||
|
||||
public override void ClientPlayVfx(Vector3 targetPoint)
|
||||
{
|
||||
if (impactVfxPrefab != null)
|
||||
Destroy(Instantiate(impactVfxPrefab, targetPoint, Quaternion.identity), impactVfxLifetime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue