From ccaa363c2fd7dbf6297c3694ba94779af94ad9b0 Mon Sep 17 00:00:00 2001 From: Sascha Date: Fri, 1 Sep 2023 08:50:48 +0200 Subject: [PATCH] init --- .gitattributes | 2 ++ .gitignore | 5 +++ .idea/.idea.Tutorial1/.idea/.gitignore | 13 ++++++++ .idea/.idea.Tutorial1/.idea/indexLayout.xml | 8 +++++ .idea/.idea.Tutorial1/.idea/vcs.xml | 6 ++++ Sprite.cs | 15 +++++++++ Sprite.tscn | 9 +++++ Tutorial1.csproj | 6 ++++ Tutorial1.sln | 19 +++++++++++ icon.svg | 1 + icon.svg.import | 37 +++++++++++++++++++++ project.godot | 20 +++++++++++ 12 files changed, 141 insertions(+) create mode 100644 .gitattributes create mode 100644 .idea/.idea.Tutorial1/.idea/.gitignore create mode 100644 .idea/.idea.Tutorial1/.idea/indexLayout.xml create mode 100644 .idea/.idea.Tutorial1/.idea/vcs.xml create mode 100644 Sprite.cs create mode 100644 Sprite.tscn create mode 100644 Tutorial1.csproj create mode 100644 Tutorial1.sln create mode 100644 icon.svg create mode 100644 icon.svg.import create mode 100644 project.godot diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore index bf83296..47769a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +<<<<<<< HEAD # ---> Godot # Godot 4+ specific ignores .godot/ @@ -15,3 +16,7 @@ export_presets.cfg data_*/ mono_crash.*.json +======= +# Godot 4+ specific ignores +.godot/ +>>>>>>> b108b8a (init) diff --git a/.idea/.idea.Tutorial1/.idea/.gitignore b/.idea/.idea.Tutorial1/.idea/.gitignore new file mode 100644 index 0000000..bf4e5eb --- /dev/null +++ b/.idea/.idea.Tutorial1/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/modules.xml +/contentModel.xml +/.idea.Tutorial1.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.Tutorial1/.idea/indexLayout.xml b/.idea/.idea.Tutorial1/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.Tutorial1/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Tutorial1/.idea/vcs.xml b/.idea/.idea.Tutorial1/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.Tutorial1/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Sprite.cs b/Sprite.cs new file mode 100644 index 0000000..cd7cb79 --- /dev/null +++ b/Sprite.cs @@ -0,0 +1,15 @@ +using Godot; + +namespace Tutorial1; + +public partial class Sprite : Sprite2D { + private const int AMOUNT = 5; + public override void _Ready() { } + + public override void _Process(double delta) { + if (Input.IsKeyPressed(Key.W)) Position += new Vector2(0, -AMOUNT); + if (Input.IsKeyPressed(Key.S)) Position += new Vector2(0, AMOUNT); + if (Input.IsKeyPressed(Key.A)) Position += new Vector2(-AMOUNT, 0); + if (Input.IsKeyPressed(Key.D)) Position += new Vector2(AMOUNT, 0); + } +} \ No newline at end of file diff --git a/Sprite.tscn b/Sprite.tscn new file mode 100644 index 0000000..1ef963b --- /dev/null +++ b/Sprite.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=3 uid="uid://d00d571xqjd81"] + +[ext_resource type="Texture2D" uid="uid://b4phmd113v1ch" path="res://icon.svg" id="1_5v71i"] +[ext_resource type="Script" path="res://Sprite.cs" id="2_u7j2b"] + +[node name="Sprite2D" type="Sprite2D"] +position = Vector2(575, 340) +texture = ExtResource("1_5v71i") +script = ExtResource("2_u7j2b") diff --git a/Tutorial1.csproj b/Tutorial1.csproj new file mode 100644 index 0000000..02d136c --- /dev/null +++ b/Tutorial1.csproj @@ -0,0 +1,6 @@ + + + net6.0 + true + + \ No newline at end of file diff --git a/Tutorial1.sln b/Tutorial1.sln new file mode 100644 index 0000000..0f41da5 --- /dev/null +++ b/Tutorial1.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tutorial1", "Tutorial1.csproj", "{79BD862E-52EA-4DF7-8DB6-96C137274859}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {79BD862E-52EA-4DF7-8DB6-96C137274859}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79BD862E-52EA-4DF7-8DB6-96C137274859}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79BD862E-52EA-4DF7-8DB6-96C137274859}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {79BD862E-52EA-4DF7-8DB6-96C137274859}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {79BD862E-52EA-4DF7-8DB6-96C137274859}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {79BD862E-52EA-4DF7-8DB6-96C137274859}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..b370ceb --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..346de7e --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4phmd113v1ch" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..c6e083c --- /dev/null +++ b/project.godot @@ -0,0 +1,20 @@ +; 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=5 + +[application] + +config/name="Tutorial1" +run/main_scene="res://Sprite.tscn" +config/features=PackedStringArray("4.1", "C#", "Forward Plus") +config/icon="res://icon.svg" + +[dotnet] + +project/assembly_name="Tutorial1"