start MapNodes

This commit is contained in:
2022-12-10 07:15:02 +01:00
parent 0d3aaf42d8
commit e4d130f581
8 changed files with 126 additions and 105 deletions

14
scripts/Logic/MapNode.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Node
class_name MapNode
const LENGTH = 10
const PICKUP = 0
var previous : MapNode
var current_trains = []
func _on_train_entered(train):
current_trains.append(train)
func _on_train_exit(train):
current_trains.erase(train)