diff --git a/project.godot b/project.godot index b084f39..ed8041f 100644 --- a/project.godot +++ b/project.godot @@ -60,6 +60,12 @@ move_down={ , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } +fullscreen={ +"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":16777254,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} [mono] diff --git a/scenes/Main.tscn b/scenes/Main.tscn index 336596f..66d1702 100644 --- a/scenes/Main.tscn +++ b/scenes/Main.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/World.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/Main.cs" type="Script" id=3] [node name="Main" type="Node2D"] +script = ExtResource( 3 ) [node name="World" parent="." instance=ExtResource( 2 )] diff --git a/scenes/Player.tscn b/scenes/Player.tscn index 82d76be..280a3a7 100644 --- a/scenes/Player.tscn +++ b/scenes/Player.tscn @@ -12,7 +12,7 @@ animations = [ { } ] [sub_resource type="CapsuleShape2D" id=2] -radius = 11.0 +radius = 46.0 height = 4.0 [node name="Player" type="Area2D"] @@ -22,7 +22,7 @@ __meta__ = { } [node name="AnimatedSprite" type="AnimatedSprite" parent="."] -scale = Vector2( 0.2, 0.2 ) +scale = Vector2( 0.7, 0.7 ) frames = SubResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/src/Main.cs b/src/Main.cs new file mode 100644 index 0000000..2395c6e --- /dev/null +++ b/src/Main.cs @@ -0,0 +1,23 @@ +using Godot; +using System; + +public class Main : Node2D +{ + // Declare member variables here. Examples: + // private int a = 2; + // private string b = "text"; + + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + + } + + public override async void _Process(float delta) + { + if (Input.IsActionJustReleased("fullscreen")) + { + OS.WindowFullscreen = !OS.WindowFullscreen; + } + } +}