Player Controller has two methods:
- Interact With Combat
- Interact With Movement
These jobs need to be mutually exclusive with preference given to the Interact With Combat method.
Cursor To World
Cursor To World is an abstract class that serves as a base class for the Click To Move and the Click To Attack objects.
Layer Mask :: LayerMask
The layer mask is used to restrict the ray cast to objects in a specific layer.
Range :: float
The maximum distance of the ray cast.
Raycast To World ( ) :bool
This method fires a ray cast from the camera to a point in the game world. It stores a reference to the Raycast Hit object generated by a successful ray cast and returns true.
Click To Move
Click To Move inherits from the Cursor To World base class.
Serializable Inner Class
Vector 3 Event : Unity Event <Vector 3>
Move To Location : Vector 3 Event
This is event is used by Move To Location to pass the location discovered by the last Raycast To World call.
Move To Location ( )
This method fires the Move To Location event, passing in the location discovered by the last Raycast To World call.
Click To Attack
Click To Attack inherits from the Cursor To World base class.
Attack Target : Target . Target Event
This is event is used by Attack Target to pass the Target discovered by the last Raycast To World call.
Attack Target ( )
This method fires the Attack Target event, passing in the Target discovered by the last Raycast To World call.