delete gitignore files

This commit is contained in:
2022-12-10 09:38:18 +01:00
parent 7c076dbebb
commit 2fb20600e2
32 changed files with 974 additions and 0 deletions

33
scripts/Train.gd Normal file
View File

@@ -0,0 +1,33 @@
extends Node
class_name Train
signal hit(player, dmg)
signal game_over
var is_P1 = true
var current_distance = 0
var current_speed = 5
var CANNONS = []
var STORAGES = []
#@onready var ENGINE = $Module/Engine
@onready var root = get_tree().root.get_child(0) as Game
func _ready():
for child in get_children():
if(child is Cannon):
CANNONS.append(child)
if(child is Storage):
STORAGES.append(child)
root.shoot.connect(_on_signal_shooting)
func _on_signal_shooting():
for cannon in CANNONS:
if cannon.shoot():
hit.emit(is_P1,cannon.DAMAGE)
func is_dead():
if current_speed <= 0:
game_over.emit()