-
-
Notifications
You must be signed in to change notification settings - Fork 101
TargetingArrow
Extends: Line2D
Handles drawing an Object's (primarily a card's) targeting arrow and specifying the final target
var is_targeting: bool
We use this to track multiple potential target objects when our owner_card is about to target them. If true, the targeting arrow will be drawn towards the mouse cursor
var target_object: Node
We use this to track multiple potential target objects when our owner_card is about to target them. If true, the targeting arrow will be drawn towards the mouse cursor Used to store a card succesfully targeted. It should be cleared from whichever effect requires a target. once it is used
var owner_object
We use this to track multiple potential target objects when our owner_card is about to target them. If true, the targeting arrow will be drawn towards the mouse cursor Used to store a card succesfully targeted. It should be cleared from whichever effect requires a target. once it is used Stores a reference to the Card that is hosting this node
func initiate_targeting() -> void
Will generate a targeting arrow on the card which will follow the mouse cursor. The top card hovered over by the mouse cursor will be highlighted and will become the target when complete_targeting() is called
func complete_targeting() -> void
Will end the targeting process.
The top targetable object which is hovered (if any) will become the target and inserted into the target_object property for future use.
- signal initiated_targeting(): Emitted whenever the object spawns a targeting arrow.
- signal target_selected(target): Emitted whenever the object spawns a targeting arrow. Emitted whenever the object has selected a target.
- signal potential_target_found(target): Emitted whenever the object spawns a targeting arrow. Emitted whenever the object has selected a target.