C# Class RedBlueGames.Tools.AttackCast2D

Handles casting between this object and its position in the previous frame. It then sends a callback for each object hit.
Inheritance: UnityEngine.MonoBehaviour
Show file Open project: redbluegames/rb-unity-tools

Public Methods

Method Description
Begin ( ) : void

Begin the attack sweep

End ( ) : void

End the attack sweep

Private Methods

Method Description
CastForHits ( ) : IEnumerator
GetHitObject ( RaycastHit2D hit ) : GameObject
OnDrawGizmosSelected ( ) : void
OnHit ( HitEventArgs args ) : void
ReportHit ( RaycastHit2D hit ) : void

Apply the OnHit function to a specified Raycast hit. This should be made project-agnostic at some point, so that AttackCasts can be a tool.

ReportHits ( RaycastHit2D hits ) : void

Send Hits to hit objects, from a Raycast hit array.

Method Details

Begin() public method

Begin the attack sweep
public Begin ( ) : void
return void

End() public method

End the attack sweep
public End ( ) : void
return void