diff --git a/.gitignore b/.gitignore index 822b784..e57b3b9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ export_presets.cfg .mono/ data_*/ +cards/.vs diff --git a/cards/.gitattributes b/cards/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/cards/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/cards/.gitignore b/cards/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/cards/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/cards/Card.cs b/cards/Card.cs new file mode 100644 index 0000000..99557ee --- /dev/null +++ b/cards/Card.cs @@ -0,0 +1,16 @@ +using Godot; +using System; + +public partial class Card : Node2D +{ + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + this.Position += new Vector2(12.0f * (float)delta,0f); + } +} diff --git a/cards/Ship.cs b/cards/Ship.cs new file mode 100644 index 0000000..0ddf1a1 --- /dev/null +++ b/cards/Ship.cs @@ -0,0 +1,8 @@ +using Godot; +using System; +using System.Runtime.CompilerServices; + +public partial class Ship : Node +{ + +} diff --git a/cards/ShipStats.cs b/cards/ShipStats.cs new file mode 100644 index 0000000..95760ff --- /dev/null +++ b/cards/ShipStats.cs @@ -0,0 +1,24 @@ +using Godot; +using System; + +public class ShipStats +{ + public string Name; + public int Cost; + public float Speed; + public float ROF; + public float Range; + public float BulletSpeed; + public float MaxHealth; + + int _health; + public float Health + { + get => _health; + set + { + _health = (int)Mathf.Clamp(value, 0, MaxHealth); + } + } + +} diff --git a/cards/card.tscn b/cards/card.tscn new file mode 100644 index 0000000..70ed0b7 --- /dev/null +++ b/cards/card.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=2 format=3 uid="uid://0j42r27nq3qa"] + +[ext_resource type="Script" path="res://Card.cs" id="1_etv3e"] + +[node name="Card" type="Node2D"] +script = ExtResource("1_etv3e") + +[node name="ColorRect" type="ColorRect" parent="."] +offset_right = 250.0 +offset_bottom = 250.0 + +[node name="name" type="Label" parent="ColorRect"] +offset_left = -0.0592442 +offset_top = 17.0686 +offset_right = 249.941 +offset_bottom = 195.069 +rotation = 0.000558799 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 33 +text = "Scout" +horizontal_alignment = 1 + +[node name="cost" type="Label" parent="ColorRect"] +offset_left = -7.07186 +offset_top = -5.92755 +offset_right = 242.928 +offset_bottom = 172.072 +rotation = 0.000558799 +theme_override_colors/font_color = Color(0, 0.533333, 0, 1) +theme_override_font_sizes/font_size = 33 +text = "2" +horizontal_alignment = 2 diff --git a/cards/cards.csproj b/cards/cards.csproj new file mode 100644 index 0000000..198256e --- /dev/null +++ b/cards/cards.csproj @@ -0,0 +1,8 @@ + + + net6.0 + net7.0 + net8.0 + true + + \ No newline at end of file diff --git a/cards/cards.sln b/cards/cards.sln new file mode 100644 index 0000000..438cacf --- /dev/null +++ b/cards/cards.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cards", "cards.csproj", "{CAFED15B-89C9-4635-A5B3-6173DDA6A654}" +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 + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {CAFED15B-89C9-4635-A5B3-6173DDA6A654}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/cards/icon.svg b/cards/icon.svg new file mode 100644 index 0000000..b370ceb --- /dev/null +++ b/cards/icon.svg @@ -0,0 +1 @@ + diff --git a/cards/icon.svg.import b/cards/icon.svg.import new file mode 100644 index 0000000..fad8d0d --- /dev/null +++ b/cards/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwjvy0ue7u4sj" +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/cards/main.tscn b/cards/main.tscn new file mode 100644 index 0000000..92280e9 --- /dev/null +++ b/cards/main.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://dd1rbd75rjwcl"] + +[ext_resource type="PackedScene" uid="uid://0j42r27nq3qa" path="res://card.tscn" id="1_n48to"] +[ext_resource type="Texture2D" uid="uid://dud6h2mq6b52m" path="res://starfield.jpeg" id="2_s71fx"] + +[node name="Node2D" type="Node2D"] + +[node name="Starfield" type="Sprite2D" parent="."] +position = Vector2(960, 540) +texture = ExtResource("2_s71fx") + +[node name="LeftPlayerHand" type="Node2D" parent="."] + +[node name="Card" parent="." instance=ExtResource("1_n48to")] +position = Vector2(23, 189) diff --git a/cards/new_script.cs b/cards/new_script.cs new file mode 100644 index 0000000..e753a2d --- /dev/null +++ b/cards/new_script.cs @@ -0,0 +1,6 @@ +using Godot; +using System; + +public partial class new_script : Node2D +{ +} diff --git a/cards/project.godot b/cards/project.godot new file mode 100644 index 0000000..2e1b0c4 --- /dev/null +++ b/cards/project.godot @@ -0,0 +1,25 @@ +; 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="cards" +run/main_scene="res://main.tscn" +config/features=PackedStringArray("4.2", "C#", "Forward Plus") +config/icon="res://icon.svg" + +[display] + +window/size/viewport_width=1920 +window/size/viewport_height=1080 + +[dotnet] + +project/assembly_name="cards" diff --git a/cards/starfield.jpeg b/cards/starfield.jpeg new file mode 100644 index 0000000..79220db Binary files /dev/null and b/cards/starfield.jpeg differ diff --git a/cards/starfield.jpeg.import b/cards/starfield.jpeg.import new file mode 100644 index 0000000..95986c3 --- /dev/null +++ b/cards/starfield.jpeg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dud6h2mq6b52m" +path="res://.godot/imported/starfield.jpeg-ae8ce81b389d8cac53ad5959cad5e59a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://starfield.jpeg" +dest_files=["res://.godot/imported/starfield.jpeg-ae8ce81b389d8cac53ad5959cad5e59a.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