serialize some fields
This commit is contained in:
parent
ef5063c8a5
commit
fb945db872
3 changed files with 19 additions and 5 deletions
|
|
@ -12,13 +12,13 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 22b36bfcd0ae4af4098d908138e874e1, type: 3}
|
m_Script: {fileID: 11500000, guid: 22b36bfcd0ae4af4098d908138e874e1, type: 3}
|
||||||
m_Name: FireballSpell
|
m_Name: FireballSpell
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.BuilderSpells.FireballSpellDefinition
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.BuilderSpells.FireballSpellDefinition
|
||||||
DisplayName:
|
DisplayName: Fireball
|
||||||
Description:
|
Description: Shoot a fireball
|
||||||
Icon: {fileID: 0}
|
Icon: {fileID: 0}
|
||||||
Cooldown: 5
|
Cooldown: 5
|
||||||
TargetType: 0
|
TargetType: 0
|
||||||
Radius: 3
|
Radius: 3
|
||||||
enemyLayerMask:
|
enemyLayerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 128
|
m_Bits: 1024
|
||||||
Damage: 50
|
Damage: 50
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ MonoBehaviour:
|
||||||
Radius: 5
|
Radius: 5
|
||||||
enemyLayerMask:
|
enemyLayerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 128
|
m_Bits: 1024
|
||||||
SlowFactor: 0.5
|
SlowFactor: 0.5
|
||||||
EffectDuration: 3
|
EffectDuration: 3
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ namespace TD.Gameplay.BuilderSpells
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <see cref="BuilderSpellDefinition.TargetType"/> is <see cref="SpellTargetType.PointTarget"/>
|
/// <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
|
/// <see cref="BuilderSpellDefinition.Radius"/> is still used internally here as the splash
|
||||||
/// radius (0 = no splash, direct hit only).
|
/// radius (0 = no splash, direct hit only).
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|
@ -19,6 +19,14 @@ namespace TD.Gameplay.BuilderSpells
|
||||||
{
|
{
|
||||||
public override BuilderSpellKind Kind => BuilderSpellKind.Fireball;
|
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")]
|
[Header("Fireball")]
|
||||||
[Tooltip("Damage dealt to every enemy within Radius of the target point.")]
|
[Tooltip("Damage dealt to every enemy within Radius of the target point.")]
|
||||||
[Min(0f)]
|
[Min(0f)]
|
||||||
|
|
@ -43,5 +51,11 @@ namespace TD.Gameplay.BuilderSpells
|
||||||
|
|
||||||
return hitAny;
|
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