From d42d913f296d9a58d7458cbdc0fe6fd8224ab32e Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 9 Sep 2019 14:53:44 -0500 Subject: [PATCH] Remove sample game and refactor plugin for use in separate games. The standalone game will probably be refactored to an accessible starter game. --- Globals.gd | 8 --- .../accessibility.gd => accessibility.gd | 0 .../accessible.gd => accessible.gd | 0 main.gd | 13 ----- main.tscn | 10 ---- player.gd | 20 -------- player.tscn | 6 --- addons/accessibility/plugin.cfg => plugin.cfg | 0 project.godot | 49 ------------------- 9 files changed, 106 deletions(-) delete mode 100644 Globals.gd rename addons/accessibility/accessibility.gd => accessibility.gd (100%) rename addons/accessibility/accessible.gd => accessible.gd (100%) delete mode 100644 main.gd delete mode 100644 main.tscn delete mode 100644 player.gd delete mode 100644 player.tscn rename addons/accessibility/plugin.cfg => plugin.cfg (100%) delete mode 100644 project.godot diff --git a/Globals.gd b/Globals.gd deleted file mode 100644 index 6c4fef6..0000000 --- a/Globals.gd +++ /dev/null @@ -1,8 +0,0 @@ -extends Node - -const TTS = preload("res://addons/godot-tts/godot_tts.gdns") -var tts - -# Called when the node enters the scene tree for the first time. -func _ready(): - tts = TTS.new() diff --git a/addons/accessibility/accessibility.gd b/accessibility.gd similarity index 100% rename from addons/accessibility/accessibility.gd rename to accessibility.gd diff --git a/addons/accessibility/accessible.gd b/accessible.gd similarity index 100% rename from addons/accessibility/accessible.gd rename to accessible.gd diff --git a/main.gd b/main.gd deleted file mode 100644 index 03b9fc6..0000000 --- a/main.gd +++ /dev/null @@ -1,13 +0,0 @@ -extends Node - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass diff --git a/main.tscn b/main.tscn deleted file mode 100644 index 8fd87ac..0000000 --- a/main.tscn +++ /dev/null @@ -1,10 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://main.gd" type="Script" id=1] -[ext_resource path="res://player.tscn" type="PackedScene" id=2] - -[node name="Main" type="Node"] -editor/display_folded = true -script = ExtResource( 1 ) - -[node name="Player" parent="." instance=ExtResource( 2 )] diff --git a/player.gd b/player.gd deleted file mode 100644 index 5228b44..0000000 --- a/player.gd +++ /dev/null @@ -1,20 +0,0 @@ -extends Area2D - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - -# Called when the node enters the scene tree for the first time. -func _ready(): - Globals.tts.speak("Hello, world.", true) - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - if Input.is_action_just_pressed("speak_coordinates"): - Globals.tts.speak("%s, %s" % [position.x, position.y], true) - elif Input.is_action_just_pressed("speak_heading"): - Globals.tts.speak("%s degrees" % global_rotation_degrees, true) - elif Input.is_action_pressed("quit"): - get_tree().quit() - elif Input.is_action_pressed("stop_speech"): - Globals.tts.stop() diff --git a/player.tscn b/player.tscn deleted file mode 100644 index e09d146..0000000 --- a/player.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://player.gd" type="Script" id=1] - -[node name="Player" type="Area2D"] -script = ExtResource( 1 ) diff --git a/addons/accessibility/plugin.cfg b/plugin.cfg similarity index 100% rename from addons/accessibility/plugin.cfg rename to plugin.cfg diff --git a/project.godot b/project.godot deleted file mode 100644 index e52095f..0000000 --- a/project.godot +++ /dev/null @@ -1,49 +0,0 @@ -; Engine configuration file. -; It's best edited using the editor UI and not directly, -; since the parameters that go here are not all obvious. -; -; Format: -; [section] ; section goes between [] -; param=value ; assign values to parameters - -config_version=4 - -_global_script_classes=[ ] -_global_script_class_icons={ - -} - -[application] - -run/main_scene="res://main.tscn" - -[autoload] - -Globals="*res://Globals.gd" - -[editor_plugins] - -enabled=[ "accessibility" ] - -[input] - -speak_coordinates={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null) - ] -} -speak_heading={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":72,"unicode":0,"echo":false,"script":null) - ] -} -stop_speech={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"unicode":0,"echo":false,"script":null) - ] -} -quit={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null) - ] -}