waited far too long for an initial commit but here we are
This commit is contained in:
19
PCs/Universal/ClassCards/GlueLauncher/stickyweapon.gd
Normal file
19
PCs/Universal/ClassCards/GlueLauncher/stickyweapon.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends Weapon
|
||||
class_name StickyWeapon
|
||||
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
func shoot():
|
||||
if other_cooldown <= 0 and stats != null:
|
||||
other_cooldown = cooldown
|
||||
$AnimationPlayer.play("shoot")
|
||||
if $RayCast3D.is_colliding():
|
||||
var target = $RayCast3D.get_collider()
|
||||
if target != null:
|
||||
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
|
||||
if target_hitbox is Hitbox:
|
||||
var status = StatusSticky.new()
|
||||
status.stats = status_stats
|
||||
status.affected = target.get_parent()
|
||||
status.affected.status_manager.add_effect(status)
|
||||
target.add_child(status)
|
||||
Reference in New Issue
Block a user