diff --git a/2d/pong/paddle.gd b/2d/pong/paddle.gd index ffa9bc14..6753066a 100644 --- a/2d/pong/paddle.gd +++ b/2d/pong/paddle.gd @@ -10,7 +10,7 @@ func _process(delta): # move up and down based on input if (Input.is_action_pressed(which+"_move_up") and position.y > 0): position.y -= MOVE_SPEED * delta - if (Input.is_action_pressed(which+"_move_down") and position.y < 640): + if (Input.is_action_pressed(which+"_move_down") and position.y < get_viewport_rect().size.y): position.y += MOVE_SPEED * delta diff --git a/old/gui/drag_and_drop/drag_and_drop.scn b/old/gui/drag_and_drop/drag_and_drop.scn deleted file mode 100644 index 944ccc73..00000000 Binary files a/old/gui/drag_and_drop/drag_and_drop.scn and /dev/null differ diff --git a/old/gui/drag_and_drop/drag_drop_script.gd b/old/gui/drag_and_drop/drag_drop_script.gd deleted file mode 100644 index 719c42fe..00000000 --- a/old/gui/drag_and_drop/drag_drop_script.gd +++ /dev/null @@ -1,20 +0,0 @@ - -extends ColorPickerButton - - -func get_drag_data(pos): - # Use another colorpicker as drag preview - var cpb = ColorPickerButton.new() - cpb.set_color(get_color()) - cpb.set_size(Vector2(50, 50)) - set_drag_preview(cpb) - # Return color as drag data - return get_color() - - -func can_drop_data(pos, data): - return typeof(data) == TYPE_COLOR - - -func drop_data(pos, data): - set_color(data) diff --git a/old/gui/drag_and_drop/engine.cfg b/old/gui/drag_and_drop/engine.cfg deleted file mode 100644 index 49b9b935..00000000 --- a/old/gui/drag_and_drop/engine.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[application] - -name="Drag & Drop (GUI)" -main_scene="res://drag_and_drop.scn" -icon="res://icon.png" diff --git a/old/gui/drag_and_drop/icon.png b/old/gui/drag_and_drop/icon.png deleted file mode 100644 index f900d8d4..00000000 Binary files a/old/gui/drag_and_drop/icon.png and /dev/null differ diff --git a/old/gui/input_mapping/controls.gd b/old/gui/input_mapping/controls.gd deleted file mode 100644 index f3373537..00000000 --- a/old/gui/input_mapping/controls.gd +++ /dev/null @@ -1,56 +0,0 @@ - -extends Control - -# Note for the reader: -# -# This demo conveniently uses the same names for actions and for the container nodes -# that hold each remapping button. This allow to get back to the button based simply -# on the name of the corresponding action, but it might not be so simple in your project. -# -# A better approach for large-scale input remapping might be to do the connections between -# buttons and wait_for_input through the code, passing as arguments both the name of the -# action and the node, e.g.: -# button.connect("pressed", self, "wait_for_input", [ button, action ]) - -# Member variables -var player_actions = [ "move_up", "move_down", "move_left", "move_right", "jump" ] -var action # To register the action the UI is currently handling -var button # Button node corresponding to the above action - - -func wait_for_input(action_bind): - action = action_bind - # See note at the beginning of the script - button = get_node("bindings").get_node(action).get_node("Button") - get_node("contextual_help").set_text("Press a key to assign to the '" + action + "' action.") - set_process_input(true) - - -func _input(event): - # Handle the first pressed key - if (event.type == InputEvent.KEY): - # Register the event as handled and stop polling - get_tree().set_input_as_handled() - set_process_input(false) - # Reinitialise the contextual help label - get_node("contextual_help").set_text("Click a key binding to reassign it, or press the Cancel action.") - if (not event.is_action("ui_cancel")): - # Display the string corresponding to the pressed key - button.set_text(OS.get_scancode_string(event.scancode)) - # Start by removing previously key binding(s) - for old_event in InputMap.get_action_list(action): - InputMap.action_erase_event(action, old_event) - # Add the new key binding - InputMap.action_add_event(action, event) - - -func _ready(): - # Initialise each button with the default key binding from InputMap - var input_event - for action in player_actions: - # We assume that the key binding that we want is the first one (0), if there are several - input_event = InputMap.get_action_list(action)[0] - # See note at the beginning of the script - var button = get_node("bindings").get_node(action).get_node("Button") - button.set_text(OS.get_scancode_string(input_event.scancode)) - button.connect("pressed", self, "wait_for_input", [action]) diff --git a/old/gui/input_mapping/controls.scn b/old/gui/input_mapping/controls.scn deleted file mode 100644 index 7894212f..00000000 Binary files a/old/gui/input_mapping/controls.scn and /dev/null differ diff --git a/old/gui/input_mapping/engine.cfg b/old/gui/input_mapping/engine.cfg deleted file mode 100644 index 811635ce..00000000 --- a/old/gui/input_mapping/engine.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[application] - -name="Input Mapping GUI" -main_scene="res://controls.scn" -icon="res://icon.png" - -[display] - -width=640 -height=480 - -[input] - -move_up=[key(Up)] -move_down=[key(Down)] -move_left=[key(Left)] -move_right=[key(Right)] -jump=[key(Space)] diff --git a/old/gui/input_mapping/icon.png b/old/gui/input_mapping/icon.png deleted file mode 100644 index 5a1abf4f..00000000 Binary files a/old/gui/input_mapping/icon.png and /dev/null differ diff --git a/old/gui/rich_text_bbcode/OFL.txt b/old/gui/rich_text_bbcode/OFL.txt deleted file mode 100644 index 723d4560..00000000 --- a/old/gui/rich_text_bbcode/OFL.txt +++ /dev/null @@ -1,92 +0,0 @@ -Copyright (c) 2009-2011 by Accademia di Belle Arti di Urbino and students of MA course of Visual design. Some rights reserved. -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/old/gui/rich_text_bbcode/TitilliumWeb-Bold.ttf b/old/gui/rich_text_bbcode/TitilliumWeb-Bold.ttf deleted file mode 100644 index 0af0fe7d..00000000 Binary files a/old/gui/rich_text_bbcode/TitilliumWeb-Bold.ttf and /dev/null differ diff --git a/old/gui/rich_text_bbcode/TitilliumWeb-BoldItalic.ttf b/old/gui/rich_text_bbcode/TitilliumWeb-BoldItalic.ttf deleted file mode 100644 index 77425eaa..00000000 Binary files a/old/gui/rich_text_bbcode/TitilliumWeb-BoldItalic.ttf and /dev/null differ diff --git a/old/gui/rich_text_bbcode/TitilliumWeb-Italic.ttf b/old/gui/rich_text_bbcode/TitilliumWeb-Italic.ttf deleted file mode 100644 index 42f2c10f..00000000 Binary files a/old/gui/rich_text_bbcode/TitilliumWeb-Italic.ttf and /dev/null differ diff --git a/old/gui/rich_text_bbcode/TitilliumWeb-Regular.ttf b/old/gui/rich_text_bbcode/TitilliumWeb-Regular.ttf deleted file mode 100644 index 6da82193..00000000 Binary files a/old/gui/rich_text_bbcode/TitilliumWeb-Regular.ttf and /dev/null differ diff --git a/old/gui/rich_text_bbcode/engine.cfg b/old/gui/rich_text_bbcode/engine.cfg deleted file mode 100644 index 5f68b6a0..00000000 --- a/old/gui/rich_text_bbcode/engine.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[application] - -name="Rich Text Label (BBCode)" -main_scene="res://rich_text_bbcode.scn" -icon="res://icon.png" diff --git a/old/gui/rich_text_bbcode/icon.png b/old/gui/rich_text_bbcode/icon.png deleted file mode 100644 index 6db48a3a..00000000 Binary files a/old/gui/rich_text_bbcode/icon.png and /dev/null differ diff --git a/old/gui/rich_text_bbcode/rich_text_bbcode.gd b/old/gui/rich_text_bbcode/rich_text_bbcode.gd deleted file mode 100644 index 79a08c13..00000000 --- a/old/gui/rich_text_bbcode/rich_text_bbcode.gd +++ /dev/null @@ -1,6 +0,0 @@ - -extends Panel - - -func _on_RichTextLabel_meta_clicked(meta): - OS.shell_open(meta) diff --git a/old/gui/rich_text_bbcode/rich_text_bbcode.scn b/old/gui/rich_text_bbcode/rich_text_bbcode.scn deleted file mode 100644 index c908d44d..00000000 Binary files a/old/gui/rich_text_bbcode/rich_text_bbcode.scn and /dev/null differ diff --git a/old/gui/rich_text_bbcode/titilium-bold.fnt b/old/gui/rich_text_bbcode/titilium-bold.fnt deleted file mode 100644 index 7920ca74..00000000 Binary files a/old/gui/rich_text_bbcode/titilium-bold.fnt and /dev/null differ diff --git a/old/gui/rich_text_bbcode/titilium-bolditalic.fnt b/old/gui/rich_text_bbcode/titilium-bolditalic.fnt deleted file mode 100644 index cc2d650d..00000000 Binary files a/old/gui/rich_text_bbcode/titilium-bolditalic.fnt and /dev/null differ diff --git a/old/gui/rich_text_bbcode/titilium-italic.fnt b/old/gui/rich_text_bbcode/titilium-italic.fnt deleted file mode 100644 index f2e8edf2..00000000 Binary files a/old/gui/rich_text_bbcode/titilium-italic.fnt and /dev/null differ diff --git a/old/gui/rich_text_bbcode/titilium-regular.fnt b/old/gui/rich_text_bbcode/titilium-regular.fnt deleted file mode 100644 index fc3b789e..00000000 Binary files a/old/gui/rich_text_bbcode/titilium-regular.fnt and /dev/null differ diff --git a/old/gui/rich_text_bbcode/unicorn_icon.png b/old/gui/rich_text_bbcode/unicorn_icon.png deleted file mode 100644 index a14517e1..00000000 Binary files a/old/gui/rich_text_bbcode/unicorn_icon.png and /dev/null differ diff --git a/old/gui/translation/controls.gd b/old/gui/translation/controls.gd deleted file mode 100644 index ae2e2636..00000000 --- a/old/gui/translation/controls.gd +++ /dev/null @@ -1,9 +0,0 @@ - -extends Panel - - -func _on_back_pressed(): - var s = load("res://main.scn") - var si = s.instance() - get_parent().add_child(si) - queue_free() diff --git a/old/gui/translation/controls.scn b/old/gui/translation/controls.scn deleted file mode 100644 index 055ac90b..00000000 Binary files a/old/gui/translation/controls.scn and /dev/null differ diff --git a/old/gui/translation/engine.cfg b/old/gui/translation/engine.cfg deleted file mode 100644 index dcd3d198..00000000 --- a/old/gui/translation/engine.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[application] - -name="Translation Demo" -main_scene="res://main.scn" -icon="res://icon.png" - -[locale] - -translations=["res://translations/text.en.xl", "res://translations/text.es.xl", "res://translations/text.ja.xl"] -translation_remaps={"res://flag_uk.png":["res://flag_spain.png:es", "res://flag_japan.png:ja"]} diff --git a/old/gui/translation/flag_japan.png b/old/gui/translation/flag_japan.png deleted file mode 100644 index 4cc8267a..00000000 Binary files a/old/gui/translation/flag_japan.png and /dev/null differ diff --git a/old/gui/translation/flag_spain.png b/old/gui/translation/flag_spain.png deleted file mode 100644 index 4d00f935..00000000 Binary files a/old/gui/translation/flag_spain.png and /dev/null differ diff --git a/old/gui/translation/flag_uk.png b/old/gui/translation/flag_uk.png deleted file mode 100644 index 53fbef3d..00000000 Binary files a/old/gui/translation/flag_uk.png and /dev/null differ diff --git a/old/gui/translation/icon.png b/old/gui/translation/icon.png deleted file mode 100644 index 4be5ac11..00000000 Binary files a/old/gui/translation/icon.png and /dev/null differ diff --git a/old/gui/translation/main.gd b/old/gui/translation/main.gd deleted file mode 100644 index c3e788f8..00000000 --- a/old/gui/translation/main.gd +++ /dev/null @@ -1,32 +0,0 @@ - -extends Panel - - -func _goto_scene(): - var s = load("res://controls.scn") - var si = s.instance() - get_parent().add_child(si) - queue_free() - - -func _on_system_pressed(): - # Will autodetect based on system, then fall back - # to english if not found - _goto_scene() - -# NOTE: Changing locale will not change the text in the controls, -# The scene must be reloaded for changes to take effect. - -func _on_english_pressed(): - TranslationServer.set_locale("en") - _goto_scene() - - -func _on_spanish_pressed(): - TranslationServer.set_locale("es") - _goto_scene() - - -func _on_japanese_pressed(): - TranslationServer.set_locale("ja") - _goto_scene() diff --git a/old/gui/translation/main.scn b/old/gui/translation/main.scn deleted file mode 100644 index c92270a8..00000000 Binary files a/old/gui/translation/main.scn and /dev/null differ diff --git a/old/gui/translation/noto.fnt b/old/gui/translation/noto.fnt deleted file mode 100644 index e019615f..00000000 Binary files a/old/gui/translation/noto.fnt and /dev/null differ diff --git a/old/gui/translation/text.csv b/old/gui/translation/text.csv deleted file mode 100644 index 0f4c148b..00000000 --- a/old/gui/translation/text.csv +++ /dev/null @@ -1,3 +0,0 @@ -,en,es,ja -KEY_HELLO,Hello!,Hola!,こんにちは -KEY_PUSH,Push Me!,Aprétame!,私をプッシュ \ No newline at end of file diff --git a/old/gui/translation/translations/text.en.xl b/old/gui/translation/translations/text.en.xl deleted file mode 100644 index 7bcba63e..00000000 Binary files a/old/gui/translation/translations/text.en.xl and /dev/null differ diff --git a/old/gui/translation/translations/text.es.xl b/old/gui/translation/translations/text.es.xl deleted file mode 100644 index 4474d955..00000000 Binary files a/old/gui/translation/translations/text.es.xl and /dev/null differ diff --git a/old/gui/translation/translations/text.ja.xl b/old/gui/translation/translations/text.ja.xl deleted file mode 100644 index b3d1f0bf..00000000 Binary files a/old/gui/translation/translations/text.ja.xl and /dev/null differ diff --git a/old/viewport/2d_in_3d/pong3d.scn b/old/viewport/2d_in_3d/pong3d.scn index 2e60764a..c7336ad1 100644 Binary files a/old/viewport/2d_in_3d/pong3d.scn and b/old/viewport/2d_in_3d/pong3d.scn differ diff --git a/old/viewport/3d_in_2d/main.scn b/old/viewport/3d_in_2d/main.scn index d6c4deea..a0bbfcf4 100644 Binary files a/old/viewport/3d_in_2d/main.scn and b/old/viewport/3d_in_2d/main.scn differ diff --git a/old/viewport/gui_in_3d/gui_3d.scn b/old/viewport/gui_in_3d/gui_3d.scn index 0541e7b1..b51116fb 100644 Binary files a/old/viewport/gui_in_3d/gui_3d.scn and b/old/viewport/gui_in_3d/gui_3d.scn differ diff --git a/visual_script/visual_pong/ball.png b/visual_script/visual_pong/ball.png new file mode 100644 index 00000000..c0f6da4f Binary files /dev/null and b/visual_script/visual_pong/ball.png differ diff --git a/visual_script/visual_pong/ball.png.import b/visual_script/visual_pong/ball.png.import new file mode 100644 index 00000000..110a99ab --- /dev/null +++ b/visual_script/visual_pong/ball.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ball.png-9a4ca347acb7532f6ae347744a6b04f7.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/visual_script/visual_pong/ball.vs b/visual_script/visual_pong/ball.vs new file mode 100644 index 00000000..239ecd37 Binary files /dev/null and b/visual_script/visual_pong/ball.vs differ diff --git a/visual_script/visual_pong/ceiling_floor.vs b/visual_script/visual_pong/ceiling_floor.vs new file mode 100644 index 00000000..80ed90c8 Binary files /dev/null and b/visual_script/visual_pong/ceiling_floor.vs differ diff --git a/visual_script/visual_pong/icon.png b/visual_script/visual_pong/icon.png new file mode 100644 index 00000000..eab34de5 Binary files /dev/null and b/visual_script/visual_pong/icon.png differ diff --git a/visual_script/visual_pong/icon.png.import b/visual_script/visual_pong/icon.png.import new file mode 100644 index 00000000..627820bd --- /dev/null +++ b/visual_script/visual_pong/icon.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/visual_script/visual_pong/left_pallete.png b/visual_script/visual_pong/left_pallete.png new file mode 100644 index 00000000..f0d4b549 Binary files /dev/null and b/visual_script/visual_pong/left_pallete.png differ diff --git a/visual_script/visual_pong/left_pallete.png.import b/visual_script/visual_pong/left_pallete.png.import new file mode 100644 index 00000000..1507466d --- /dev/null +++ b/visual_script/visual_pong/left_pallete.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/left_pallete.png-bc33611074a0f886142e37c77bd2545a.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/visual_script/visual_pong/paddle.vs b/visual_script/visual_pong/paddle.vs new file mode 100644 index 00000000..b4845cfe Binary files /dev/null and b/visual_script/visual_pong/paddle.vs differ diff --git a/visual_script/visual_pong/pong.tscn b/visual_script/visual_pong/pong.tscn new file mode 100644 index 00000000..c0c15314 --- /dev/null +++ b/visual_script/visual_pong/pong.tscn @@ -0,0 +1,188 @@ +[gd_scene load_steps=13 format=2] + +[ext_resource path="res://paddle.vs" type="Script" id=1] +[ext_resource path="res://left_pallete.png" type="Texture" id=2] +[ext_resource path="res://right_pallete.png" type="Texture" id=3] +[ext_resource path="res://ball.vs" type="Script" id=4] +[ext_resource path="res://ball.png" type="Texture" id=5] +[ext_resource path="res://separator.png" type="Texture" id=6] +[ext_resource path="res://wall.vs" type="Script" id=7] +[ext_resource path="res://ceiling_floor.vs" type="Script" id=8] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 4, 16 ) + +[sub_resource type="RectangleShape2D" id=2] + +custom_solver_bias = 0.0 +extents = Vector2( 4, 4 ) + +[sub_resource type="RectangleShape2D" id=3] + +custom_solver_bias = 0.0 +extents = Vector2( 10, 200 ) + +[sub_resource type="RectangleShape2D" id=4] + +custom_solver_bias = 0.0 +extents = Vector2( 320, 10 ) + +[node name="game" type="Node2D"] + +[node name="left" type="Area2D" parent="."] + +position = Vector2( 67.6285, 192.594 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 1 ) +_sections_unfolded = [ "Transform" ] +ball_dir = 1.0 + +[node name="sprite" type="Sprite" parent="left"] + +texture = ExtResource( 2 ) +_sections_unfolded = [ "Transform" ] + +[node name="collision" type="CollisionShape2D" parent="left"] + +shape = SubResource( 1 ) + +[node name="right" type="Area2D" parent="."] + +position = Vector2( 563.815, 188.919 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 1 ) +ball_dir = -1.0 + +[node name="sprite" type="Sprite" parent="right"] + +texture = ExtResource( 3 ) +_sections_unfolded = [ "Transform" ] + +[node name="collision" type="CollisionShape2D" parent="right"] + +shape = SubResource( 1 ) + +[node name="ball" type="Area2D" parent="."] + +position = Vector2( 320.5, 191.124 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 4 ) +_sections_unfolded = [ "Transform" ] + +[node name="sprite" type="Sprite" parent="ball"] + +texture = ExtResource( 5 ) +_sections_unfolded = [ "Transform" ] + +[node name="collision" type="CollisionShape2D" parent="ball"] + +shape = SubResource( 2 ) + +[node name="separator" type="Sprite" parent="."] + +position = Vector2( 320, 200 ) +texture = ExtResource( 6 ) + +[node name="left_wall" type="Area2D" parent="."] + +position = Vector2( -10, 200 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 7 ) +_sections_unfolded = [ "Transform" ] + +[node name="collision" type="CollisionShape2D" parent="left_wall"] + +shape = SubResource( 3 ) + +[node name="right_wall" type="Area2D" parent="."] + +position = Vector2( 650, 200 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 7 ) +_sections_unfolded = [ "Transform" ] + +[node name="collision" type="CollisionShape2D" parent="right_wall"] + +shape = SubResource( 3 ) + +[node name="ceiling" type="Area2D" parent="."] + +position = Vector2( 320, -10 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 8 ) +_sections_unfolded = [ "Transform" ] +y_direction = 1.0 + +[node name="collision" type="CollisionShape2D" parent="ceiling"] + +shape = SubResource( 4 ) + +[node name="floor" type="Area2D" parent="."] + +position = Vector2( 320, 410 ) +input_pickable = true +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 8 ) +_sections_unfolded = [ "Transform" ] +y_direction = -1.0 + +[node name="collision" type="CollisionShape2D" parent="floor"] + +shape = SubResource( 4 ) + +[connection signal="area_entered" from="left" to="left" method="_on_area_entered"] + +[connection signal="area_entered" from="right" to="right" method="_on_area_entered"] + +[connection signal="area_entered" from="left_wall" to="left_wall" method="_on_area_entered"] + +[connection signal="area_entered" from="right_wall" to="right_wall" method="_on_area_entered"] + +[connection signal="area_entered" from="ceiling" to="ceiling" method="_on_area_entered"] + +[connection signal="area_entered" from="floor" to="floor" method="_on_area_entered"] + + diff --git a/visual_script/visual_pong/project.godot b/visual_script/visual_pong/project.godot new file mode 100644 index 00000000..fce8a6d1 --- /dev/null +++ b/visual_script/visual_pong/project.godot @@ -0,0 +1,23 @@ +[application] + +icon = "res://icon.png" +main_scene = "pong.tscn" +name = "Visual Pong" + +[display] + +stretch_2d = true +window/height = 400 +window/width = 640 + +[input] + +left_move_down = [ InputEvent(KEY,90) ] +left_move_up = [ InputEvent(KEY,65) ] +right_move_down = [ InputEvent(KEY,16777234) ] +right_move_up = [ InputEvent(KEY,16777232) ] + +[rendering] + +viewport/default_clear_color = Color( 0, 0, 0, 1 ) + diff --git a/visual_script/visual_pong/right_pallete.png b/visual_script/visual_pong/right_pallete.png new file mode 100644 index 00000000..3cdb673a Binary files /dev/null and b/visual_script/visual_pong/right_pallete.png differ diff --git a/visual_script/visual_pong/right_pallete.png.import b/visual_script/visual_pong/right_pallete.png.import new file mode 100644 index 00000000..e1ee6687 --- /dev/null +++ b/visual_script/visual_pong/right_pallete.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/right_pallete.png-fc6e4a6a7c8197834656482b94708e47.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/visual_script/visual_pong/separator.png b/visual_script/visual_pong/separator.png new file mode 100644 index 00000000..56874a59 Binary files /dev/null and b/visual_script/visual_pong/separator.png differ diff --git a/visual_script/visual_pong/separator.png.import b/visual_script/visual_pong/separator.png.import new file mode 100644 index 00000000..01df17d9 --- /dev/null +++ b/visual_script/visual_pong/separator.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/separator.png-f981c8489b9148e2e1dc63398273da74.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true diff --git a/visual_script/visual_pong/wall.vs b/visual_script/visual_pong/wall.vs new file mode 100644 index 00000000..d12b14f5 Binary files /dev/null and b/visual_script/visual_pong/wall.vs differ