diff --git a/game_scene.tscn b/game_scene.tscn new file mode 100644 index 0000000..f31f0bf --- /dev/null +++ b/game_scene.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=2 format=3 uid="uid://ct8axfbvd2wn4"] + +[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://test_channel.tscn" id="1_mlf6e"] + +[node name="GameScene" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="GridContainer" type="GridContainer" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +columns = 3 + +[node name="Control" parent="GridContainer" instance=ExtResource("1_mlf6e")] +layout_mode = 2 + +[node name="ColorRect" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect2" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect3" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect4" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect5" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect6" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect7" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ColorRect8" type="ColorRect" parent="GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 diff --git a/move_test.gd b/move_test.gd new file mode 100644 index 0000000..ba6ec29 --- /dev/null +++ b/move_test.gd @@ -0,0 +1,6 @@ +extends Node2D + +func _process(delta: float) -> void: + var direction := Input.get_axis("ui_left", "ui_right") + if direction: + position.x += direction * 10 diff --git a/move_test.gd.uid b/move_test.gd.uid new file mode 100644 index 0000000..4881b13 --- /dev/null +++ b/move_test.gd.uid @@ -0,0 +1 @@ +uid://dlqr0ghj0sh6a diff --git a/project.godot b/project.godot index 216c5f6..79d10bf 100644 --- a/project.godot +++ b/project.godot @@ -11,9 +11,15 @@ config_version=5 [application] config/name="Alternate - Playmakers Jam" +run/main_scene="uid://ct8axfbvd2wn4" config/features=PackedStringArray("4.4", "GL Compatibility") config/icon="res://icon.svg" +[display] + +window/size/viewport_width=640 +window/size/viewport_height=360 + [rendering] renderer/rendering_method="gl_compatibility" diff --git a/test_channel.tscn b/test_channel.tscn new file mode 100644 index 0000000..458a886 --- /dev/null +++ b/test_channel.tscn @@ -0,0 +1,45 @@ +[gd_scene load_steps=4 format=3 uid="uid://63rik2noj8id"] + +[ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_iix04"] +[ext_resource type="Script" uid="uid://dlqr0ghj0sh6a" path="res://move_test.gd" id="2_jbg2j"] + +[sub_resource type="ViewportTexture" id="ViewportTexture_iix04"] +viewport_path = NodePath("SubViewport") + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = SubResource("ViewportTexture_iix04") +expand_mode = 1 +stretch_mode = 6 + +[node name="SubViewport" type="SubViewport" parent="."] +size = Vector2i(640, 360) + +[node name="ColorRect" type="TextureRect" parent="SubViewport"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("1_iix04") + +[node name="Node2D" type="Node2D" parent="SubViewport"] +script = ExtResource("2_jbg2j") + +[node name="Sprite2D" type="Sprite2D" parent="SubViewport/Node2D"] +texture = ExtResource("1_iix04")