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

View File

@@ -0,0 +1,18 @@
extends StraightMapNode
signal turnEvent
var is_left_turn = false
var turn = false
var turn_node : MapNode
func _on_train_entered(train):
super._on_train_entered(train)
turnEvent.emit()
func _on_train_exit(train):
if(turn):
turn_node._on_train_entered(train)
current_trains.erase(train)
else:
super._on_train_exit(train)