PowerCrossSlash
A class in Root.Township, the global namespace.
Charged skill asset: hitting the target in front of the player fires a slash projectile in the swing direction, dealing part of the hit's damage.
- Listed in Global namespace: P
- Inherits or implements
TargetBasedSkill - Derived types
PowerCrossSlash.Create - Nested types
Create
Constructors
| Member | What it is |
|---|---|
PowerCrossSlash() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private float damageMultiplier | Share of the hit's damage the projectile deals (default 0.5). |
private NetworkPrefab slashProjectile | Projectile prefab to fire. |
private float slashSpeed | Projectile speed. |
private ImpactChannel targetChannel | Impact channel the tool needs. |
private PooledObjectDefinition targetDefinition | Pooled target shown to the player. |
private float targetDistance | How far in front of the head the target appears. |
private float targetHeightFromeyeLevel | Target height relative to the eyes (default -0.2). |
Methods
| Member | What it is |
|---|---|
override void ExecuteWithHit(HeldPickupHandler handler, ImpactHitWithTool hitWithTool, bool hasHit = true) | Spawns slashProjectile at the hit, sets its damage and owner, and shoots it along the swing. |
override bool ValidatePickup(HeldPickupHandler pickupHandler) | True if the base check passes and the tool has targetChannel. |
protected override PooledObject PlaceTarget() | Client: places the target in front of the player's head, at the set distance and height. |