hard.gd 749 B

12345678910111213141516171819
  1. extends Sprite2D
  2. func ok():
  3. var characterselect = load("res://characterselect.tscn").instantiate() as Node2D
  4. (self.find_parent("StartMenu").get_node("AnimationPlayer") as AnimationPlayer).play_backwards("new_animation")
  5. (self.find_parent("StartMenu").get_node("AnimationPlayer2") as AnimationPlayer).play("hard_selected")
  6. get_tree().current_scene.add_child(characterselect)
  7. # Called when the node enters the scene tree for the first time.
  8. func _ready() -> void:
  9. pass # Replace with function body.
  10. # Called every frame. 'delta' is the elapsed time since the previous frame.
  11. func _process(delta: float) -> void:
  12. self.set_region_rect(Rect2(256,160,256,80))
  13. if(self.get_meta("selected") == true):
  14. self.set_region_rect(Rect2(0,160,256,80))