Skip to main content

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.

Constructors​

MemberWhat it is
PowerCrossSlash()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

7 private and internal fields
MemberWhat it is
private float damageMultiplierShare of the hit's damage the projectile deals (default 0.5).
private NetworkPrefab slashProjectileProjectile prefab to fire.
private float slashSpeedProjectile speed.
private ImpactChannel targetChannelImpact channel the tool needs.
private PooledObjectDefinition targetDefinitionPooled target shown to the player.
private float targetDistanceHow far in front of the head the target appears.
private float targetHeightFromeyeLevelTarget height relative to the eyes (default -0.2).

Methods​

MemberWhat 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.