Advertisement
otorp2

nice signal stuff

Dec 24th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. extends Node2D
  2.  
  3. var x = 5
  4. var charOne
  5. signal game_over
  6.  
  7. func _ready():
  8. self.charOne = CharOne.new()
  9. self.connect("game_over",self.charOne,"Death")
  10. if x <10:
  11. character_died()
  12.  
  13. func character_died():
  14. emit_signal("game_over")
  15.  
  16. class CharOne extends Object:
  17. func Death():
  18. print("CharOne is dead")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement