commit 38b9d3a6c74c7e20b137e7da2959a8b7d03f76d2 Author: Cameron Date: Sun Apr 14 15:49:25 2024 -0500 initial commit 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 new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3028bee --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Play", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${env:GODOT4}", + "args": [], + "cwd": "${workspaceFolder}", + "stopAtEntry": false, + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7f33d99 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,22 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build" + ], + "problemMatcher": "$msCompile", + "presentation": { + "echo": true, + "reveal": "silent", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": false + } + } + ] +} \ No newline at end of file diff --git a/CardCollisionShape2D.cs b/CardCollisionShape2D.cs new file mode 100644 index 0000000..a466e27 --- /dev/null +++ b/CardCollisionShape2D.cs @@ -0,0 +1,17 @@ +using Godot; +using System; + +public partial class CardCollisionShape2D : CollisionShape2D +{ + private Vector2 MouseOffset { get; set; } + // 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) + { + } +} diff --git a/TierMaker.code-workspace b/TierMaker.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/TierMaker.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/TierMaker.csproj b/TierMaker.csproj new file mode 100644 index 0000000..198256e --- /dev/null +++ b/TierMaker.csproj @@ -0,0 +1,8 @@ + + + net6.0 + net7.0 + net8.0 + true + + \ No newline at end of file diff --git a/TierMaker.sln b/TierMaker.sln new file mode 100644 index 0000000..cd8848a --- /dev/null +++ b/TierMaker.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TierMaker", "TierMaker.csproj", "{08AED6D9-4B08-4196-8211-B04CD7ED8440}" +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 + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {08AED6D9-4B08-4196-8211-B04CD7ED8440}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/card.cs b/card.cs new file mode 100644 index 0000000..63a2fcf --- /dev/null +++ b/card.cs @@ -0,0 +1,34 @@ +using Godot; +using System; + +public partial class card : Area2D +{ + private Vector2 MouseOffset { get; set; } + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + InputPickable = true; + //TODO worry about dragging later, websocket control is more important + //InputEvent += MouseClick; + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + } + + private void MouseClick(Node viewport, InputEvent @event, long shapeIdx) + { + if (@event is InputEventMouse mouseEvent) + { + if (mouseEvent.IsActionPressed("click")) + { + + } + else if (mouseEvent.IsActionReleased("click")) + { + + } + } + } +} diff --git a/card.tscn b/card.tscn new file mode 100644 index 0000000..b7b1a78 --- /dev/null +++ b/card.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://bcmgf041scwb4"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_25ape"] + +[node name="Card" type="Area2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_25ape") + +[node name="Sprite2D" type="Sprite2D" parent="."] 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..da72e46 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://huksuwwaaq5m" +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..179ddc9 --- /dev/null +++ b/project.godot @@ -0,0 +1,19 @@ +; 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="TierMaker" +config/features=PackedStringArray("4.2", "Forward Plus") +config/icon="res://icon.svg" + +[dotnet] + +project/assembly_name="TierMaker" diff --git a/row.tscn b/row.tscn new file mode 100644 index 0000000..c7fdf57 --- /dev/null +++ b/row.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://d4j824viqwho2"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n14fa"] + +[node name="Row" type="Area2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_n14fa") diff --git a/websocket_client.cs b/websocket_client.cs new file mode 100644 index 0000000..be9703a --- /dev/null +++ b/websocket_client.cs @@ -0,0 +1,18 @@ +using Godot; +using System; + +public partial class websocket_client : Node +{ + private WebSocketPeer Socket { get; } = new(); + [Export] + public string URL; + // 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) + { + } +} diff --git a/websocket_client.tscn b/websocket_client.tscn new file mode 100644 index 0000000..1a223cb --- /dev/null +++ b/websocket_client.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://yk53icorys0s"] + +[ext_resource type="Script" path="res://websocket_client.cs" id="1_k5k6l"] + +[node name="WebsocketClient" type="Node"] +script = ExtResource("1_k5k6l")