This repository has been archived on 2022-01-09. You can view files and clone it, but cannot push or open issues/pull-requests.
liblast/Game/Assets/Weapons/Weapon.gd

23 lines
581 B
GDScript
Raw Normal View History

2021-06-18 01:43:10 +02:00
extends Node3D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
#enum Trigger {TRIGGER_PRIMARY, TRIGGER_SECONDARY}
2021-06-18 02:36:20 +02:00
@remotesync func trigger(index: int, active: bool) -> void:
2021-06-18 01:43:10 +02:00
print("Weapon " + str(name) + ", Trigger " + str(index) + ", active: " + str(active))
if index == 0 and active:
$Flash/AnimationPlayer.play("Flash")
2021-06-18 01:43:10 +02:00
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass