From 91657dd98873f4e0325f3ffc10f29108e783f482 Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 23 Jan 2018 00:40:45 -0500 Subject: [PATCH] Move hero 2 script to scripts/ folder Accidentally put it in the wrong place before --- scenes/heroes/2.gd | 18 ------------------ scripts/heroes/2.gd | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 scenes/heroes/2.gd create mode 100644 scripts/heroes/2.gd diff --git a/scenes/heroes/2.gd b/scenes/heroes/2.gd deleted file mode 100644 index 4224eae..0000000 --- a/scenes/heroes/2.gd +++ /dev/null @@ -1,18 +0,0 @@ -extends "res://scripts/player.gd" - -#func _ready(): -# get_node("Area").set_gravity_distance_scale(10) - -var is_repelling = false - -func _process(delta): - if Input.is_action_just_pressed("hero_2_switch_gravity"): - # Press button twice to cancel - var area = get_node("Area") - area.set_gravity(-area.get_gravity()) - is_repelling = !is_repelling - if is_repelling: - get_node("RepellingHUD").set_text("/\\") - else: - get_node("RepellingHUD").set_text("\\/") - #get_node("Area").set_gravity_vector(get_translation()) diff --git a/scripts/heroes/2.gd b/scripts/heroes/2.gd new file mode 100644 index 0000000..4224eae --- /dev/null +++ b/scripts/heroes/2.gd @@ -0,0 +1,18 @@ +extends "res://scripts/player.gd" + +#func _ready(): +# get_node("Area").set_gravity_distance_scale(10) + +var is_repelling = false + +func _process(delta): + if Input.is_action_just_pressed("hero_2_switch_gravity"): + # Press button twice to cancel + var area = get_node("Area") + area.set_gravity(-area.get_gravity()) + is_repelling = !is_repelling + if is_repelling: + get_node("RepellingHUD").set_text("/\\") + else: + get_node("RepellingHUD").set_text("\\/") + #get_node("Area").set_gravity_vector(get_translation())