commit 540e0087b4a08967697089872ee0273b62a1cacd Author: Bobby Lucero Date: Thu Jun 5 00:31:32 2025 -0400 Initial Commit Didn't use git for a minute, oh well. diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 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..95e0e9b --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +# Godot-specific +.import/ +export.cfg +export_presets.cfg + +# Godot 4 specific +*.godot/ # Cache folder used in Godot 4.x + +# Builds +bin/ +build/ +*.exe +*.dll +*.so +*.dylib +*.apk +*.xcodeproj/ +*.xcworkspace/ +*.ios/ +*.pck + +# Mono (C# projects) +.mono/ +data_*/ # Generated Mono temp dirs +mono_crash.* + +# OS / IDE / editor files +.DS_Store +Thumbs.db +desktop.ini +*.log +*.tmp +*.bak +*.swp + +# VSCode +.vscode/ + +# JetBrains (Rider, CLion, etc.) +.idea/ + +# Godot Native C++ bindings (if applicable) +godot-cpp/bin/ +godot-cpp/gen/ +godot-cpp/build/ + +# Optional: ignore user config +.godot/ + +# Optional: ignore test files or backups +test/ +tests/ +*.orig \ No newline at end of file diff --git a/CenterDisplayController.cs b/CenterDisplayController.cs new file mode 100644 index 0000000..d5863f1 --- /dev/null +++ b/CenterDisplayController.cs @@ -0,0 +1,54 @@ +using Godot; +using System; + +public partial class CenterDisplayController : Node +{ + [ExportCategory(" ")] + [Export] private Node2D _background; + [Export] private Label _counterLabel; + [Export] private Label _togoLabel; + [Export] private Label _pbtsLabel; + [Export] private AnimationPlayer _pbstAnimationPlayer; + [Export] private AnimationPlayer _counterAnimationPlayer; + + + + private GameManager.State state; + public override void _Ready() + { + state = GameManager.CurrentState; + + OnStateChange(); + } + + public override void _Process(double delta) + { + if (GameManager.CurrentState != state) + { + state = GameManager.CurrentState; + OnStateChange(); + } + } + + private void OnStateChange() + { + if (state == GameManager.State.IDLE) + { + _pbstAnimationPlayer.Play("TextFade"); + _counterAnimationPlayer.Play("CounterOutIdle"); + } + else if (state == GameManager.State.PLAY) + { + _pbstAnimationPlayer.Play("TextOutIdle"); + _counterAnimationPlayer.Play("CounterFadeIn"); + } + else if (state == GameManager.State.LOSS) + { + + } + else if (state == GameManager.State.WIN) + { + + } + } +} diff --git a/CenterDisplayController.cs.uid b/CenterDisplayController.cs.uid new file mode 100644 index 0000000..33f1dfd --- /dev/null +++ b/CenterDisplayController.cs.uid @@ -0,0 +1 @@ +uid://dw1twisa1uie6 diff --git a/ExtensionMethods.cs b/ExtensionMethods.cs new file mode 100644 index 0000000..105066e --- /dev/null +++ b/ExtensionMethods.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace PopTheLockClone; + +public static class ExtensionMethods +{ + private static Random _random = new Random(); + + public static T ShitOutRandomChoice(this IList list) + { + if (list == null || list.Count == 0) + throw new InvalidOperationException("Cannot select a random element from an empty or null list."); + + int index = _random.Next(list.Count); + return list[index]; + } +} \ No newline at end of file diff --git a/GameManager.cs b/GameManager.cs new file mode 100644 index 0000000..1a0eda8 --- /dev/null +++ b/GameManager.cs @@ -0,0 +1,40 @@ +using Godot; +using System; + +public partial class GameManager : Node +{ + public enum State + { + IDLE, + PLAY, + LOSS, + WIN + } + + public bool playing = false; + + public static State CurrentState { get; private set; } + + + public override void _Ready() + { + CurrentState = State.IDLE; + } + + public override void _Process(double delta) + { + if (Input.IsActionJustPressed("Press")) + { + playing = !playing; + if (playing) + { + CurrentState = State.PLAY; + + } + else + { + CurrentState = State.IDLE; + } + } + } +} diff --git a/GameManager.cs.uid b/GameManager.cs.uid new file mode 100644 index 0000000..1394585 --- /dev/null +++ b/GameManager.cs.uid @@ -0,0 +1 @@ +uid://csmfx22swajfs diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e9b4efd --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Peter Kish + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PaddlePivotTest.cs b/PaddlePivotTest.cs new file mode 100644 index 0000000..004b838 --- /dev/null +++ b/PaddlePivotTest.cs @@ -0,0 +1,116 @@ +using Godot; +using System; +using System.Collections; +using System.Collections.Generic; +using PopTheLockClone; + +public partial class PaddlePivotTest : Node2D +{ + + [Export] public float RotationSpeed = 90; + [Export] public Label FPS; + [Export] public Label HitsLeft; + [Export] public Node2D[] shapes; + + private List myNums; + + private Color[] colors = new Color[] + { + Colors.RebeccaPurple, + Colors.SpringGreen, + Colors.GreenYellow, + Colors.AliceBlue, + Colors.AntiqueWhite + }; + + private bool direction = false; + + private float base_speed = 80; + private float max_speed = 200; + private int total_hits = 50; + private int hits_left; + + private Color round1 = Color.FromHtml("#7aed00"); + + private Color currentColor; + + private GameManager.State state; + + public override void _Ready() + { + Engine.MaxFps = 0; + hits_left = total_hits; + HitsLeft.Text = total_hits.ToString(); + myNums = new List(); + + currentColor = round1; + SetShapesColor(); + } + private void UpdateRotationSpeed() + { + int hits_done = total_hits - hits_left; + float progress = hits_done / (float)total_hits; + RotationSpeed = base_speed + (max_speed - base_speed) * progress; + } + + public override void _Process(double delta) + { + + FPS.Text = "FPS: " + Engine.GetFramesPerSecond(); + + if (GameManager.CurrentState != state) + { + state = GameManager.CurrentState; + OnStateChange(); + } + + if (Input.IsActionJustPressed("Press")) + { + UpdateRotationSpeed(); + direction = !direction; + + HitsLeft.Text = hits_left.ToString(); + + } + + + if (GameManager.CurrentState == GameManager.State.PLAY) + { + Rotation += Mathf.DegToRad((float)delta * (direction ? RotationSpeed : -RotationSpeed)); + } + + } + + private void SetShapesColor() + { + for (int i = 0; i < shapes.Length; i++) + { + shapes[i].Set("color", currentColor); + } + } + + private void OnStateChange() + { + if (state == GameManager.State.IDLE) + { + currentColor = round1; + SetShapesColor(); + + Rotation = 0; + } + else if (state == GameManager.State.PLAY) + { + currentColor = round1; + SetShapesColor(); + + } + else if (state == GameManager.State.LOSS) + { + + } + else if (state == GameManager.State.WIN) + { + + } + } +} diff --git a/PaddlePivotTest.cs.uid b/PaddlePivotTest.cs.uid new file mode 100644 index 0000000..a4dc0c7 --- /dev/null +++ b/PaddlePivotTest.cs.uid @@ -0,0 +1 @@ +uid://cqccd451iqfti diff --git a/PopTheLockClone.csproj b/PopTheLockClone.csproj new file mode 100644 index 0000000..e75f04c --- /dev/null +++ b/PopTheLockClone.csproj @@ -0,0 +1,6 @@ + + + net8.0 + true + + \ No newline at end of file diff --git a/PopTheLockClone.sln b/PopTheLockClone.sln new file mode 100644 index 0000000..6a3cbad --- /dev/null +++ b/PopTheLockClone.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PopTheLockClone", "PopTheLockClone.csproj", "{F48F89A5-61E3-4017-90A5-A967FE7A4DEE}" +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 + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {F48F89A5-61E3-4017-90A5-A967FE7A4DEE}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/PopTheLockClone.sln.DotSettings.user b/PopTheLockClone.sln.DotSettings.user new file mode 100644 index 0000000..773eba5 --- /dev/null +++ b/PopTheLockClone.sln.DotSettings.user @@ -0,0 +1,2 @@ + + ForceIncluded \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ff4a16 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# Primitives2D + +

+ +

+ +A plugin for the Godot game engine (version 4.x) for rendering primitive 2d shapes. + +![](images/ss_editor.png "Primitives2D") + +While the [`CanvasItem`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html) class supports a number of methods for rendering primitive shapes, the engine only offers the [Line2D](https://docs.godotengine.org/en/stable/classes/class_line2d.html) and [Polygon2D](https://docs.godotengine.org/en/stable/classes/class_polygon2d.html) nodes for adding primitive shapes to a scene. This plugin introduces the following node types in a similar fashion: +* ![](addons/primitives2d/icon_rect.svg "Rectangle2D icon") [Rectangle2D](#rectangle2d) +* ![](addons/primitives2d/icon_circle.svg "Circle2D icon") [Circle2D](#circle2d) +* ![](addons/primitives2d/icon_arc.svg "Arc2D icon") [Arc2D](#arc2d) + +The nodes simply use the builtin [`CanvasItem`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html) methods for drawing primitive shapes: [`draw_rect`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-rect), [`draw_circle`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-circle) and [`draw_arc`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-arc). + +## Installation + +1. Create an `addons` directory inside your project directory. +2. Get the plugin from the AssetLib or from GitHub + * From the AssetLib: Open the AssetLib from the Godot editor and search for "Primitives2D". Click download to install the plugin. + * From GitHub: Run `git clone https://github.com/peter-kish/primitives2d.git` and copy the contents of the `addons` directory to your projects `addons` directory. +4. Enable the plugin in `Project Settings > Plugins`. + +## Usage + +Add a [Rectangle2D](#rectangle2d), [Circle2D](#circle2d) or [Arc2D](#arc2d) node to your scene and set the node properties described below. + +### Rectangle2D + +Draws a 2D rectangle. + +#### Properties + +* `color: Color` - The color of the rectangle. +* `size: Vector2` - The size of the rectangle. +* `filled: bool` - If `false`, the rectangle will be drawn as a stroke with the `color` and `line_width` specified. +* `line_width: float` - Width of the stroke (in case `filled` is `true`). +* `centered: bool` - If `true`, the rectangle will be drawn centered. + +### Circle2D + +Draws a 2D circle. + +#### Properties + +* `color: Color` - The color of the circle. +* `radius: float` - The radius of the circle. +* `filled: bool` - If `false`, the circle will be drawn as a stroke with the `color` and `line_width` specified. +* `line_width: float` - Width of the stroke (in case `filled` is `true`). +* `antialiased: bool` - If `true`, the lines will attempt to perform antialiasing using OpenGL line smoothing. +* `detail: int` - The number of line segments. + +### Arc2D + +Draws a unfilled 2D arc. + +#### Properties + +* `color: Color` - The color of the arc. +* `radius: float` - The radius of the arc. +* `filled: bool` - If `false`, the arc will be drawn as a stroke with the `color` and `line_width` specified. +* `line_width: float` - Width of the stroke (in case `filled` is `true`). +* `antialiased: bool` - If `true`, the lines will attempt to perform antialiasing using OpenGL line smoothing. +* `detail: int` - The number of line segments. \ No newline at end of file diff --git a/addons/primitives2d/arc2d.gd b/addons/primitives2d/arc2d.gd new file mode 100644 index 0000000..f819a7d --- /dev/null +++ b/addons/primitives2d/arc2d.gd @@ -0,0 +1,55 @@ +@tool +extends Node2D +class_name Arc2D + +@export var color: Color = Color(1.0, 1.0, 1.0) : + set(new_color): + if color == new_color: + return + color = new_color + queue_redraw() +@export var radius: float = 10.0 : + set(new_radius): + if radius == new_radius: + return + radius = new_radius + queue_redraw() +@export var start_degrees: float = 0.0 : + set(new_start_degrees): + if start_degrees == new_start_degrees: + return + start_degrees = new_start_degrees + start_angle = deg_to_rad(start_degrees) + queue_redraw() +@export var end_degrees: float = 360.0 : + set(new_end_degrees): + if end_degrees == new_end_degrees: + return + end_degrees = new_end_degrees + end_angle = deg_to_rad(end_degrees) + queue_redraw() +@export var line_width: float = -1.0 : + set(new_line_width): + if line_width == new_line_width: + return + line_width = new_line_width + queue_redraw() +@export var antialiased: bool = false : + set(new_antialiased): + if antialiased == new_antialiased: + return + antialiased = new_antialiased + queue_redraw() +@export var detail: int = 30 : + set(new_detail): + if detail == new_detail: + return + detail = new_detail + queue_redraw() + +var start_angle = deg_to_rad(start_degrees) +var end_angle = deg_to_rad(end_degrees) + + +func _draw() -> void: + draw_arc(Vector2.ZERO, radius, start_angle, end_angle, detail, color, line_width, antialiased) diff --git a/addons/primitives2d/arc2d.gd.uid b/addons/primitives2d/arc2d.gd.uid new file mode 100644 index 0000000..d374fcf --- /dev/null +++ b/addons/primitives2d/arc2d.gd.uid @@ -0,0 +1 @@ +uid://c6v3ersnx3svd diff --git a/addons/primitives2d/circle2d.gd b/addons/primitives2d/circle2d.gd new file mode 100644 index 0000000..484d74e --- /dev/null +++ b/addons/primitives2d/circle2d.gd @@ -0,0 +1,47 @@ +@tool +extends Node2D +class_name Circle2D + +@export var color: Color = Color(1.0, 1.0, 1.0) : + set(new_color): + if color == new_color: + return + color = new_color + queue_redraw() +@export var radius: float = 10.0 : + set(new_radius): + if radius == new_radius: + return + radius = new_radius + queue_redraw() +@export var filled: bool = false : + set(new_filled): + if filled == new_filled: + return + filled = new_filled + queue_redraw() +@export var line_width: float = -1.0 : + set(new_line_width): + if line_width == new_line_width: + return + line_width = new_line_width + queue_redraw() +@export var antialiased: bool = false : + set(new_antialiased): + if antialiased == new_antialiased: + return + antialiased = new_antialiased + queue_redraw() +@export var detail: int = 30 : + set(new_detail): + if detail == new_detail: + return + detail = new_detail + queue_redraw() + + +func _draw() -> void: + if filled: + draw_circle(Vector2.ZERO, radius, color) + else: + draw_arc(Vector2.ZERO, radius, 0, TAU, detail, color, line_width, antialiased) diff --git a/addons/primitives2d/circle2d.gd.uid b/addons/primitives2d/circle2d.gd.uid new file mode 100644 index 0000000..e964606 --- /dev/null +++ b/addons/primitives2d/circle2d.gd.uid @@ -0,0 +1 @@ +uid://837wj2bp417t diff --git a/addons/primitives2d/icon_arc.svg b/addons/primitives2d/icon_arc.svg new file mode 100644 index 0000000..274f915 --- /dev/null +++ b/addons/primitives2d/icon_arc.svg @@ -0,0 +1,63 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/addons/primitives2d/icon_arc.svg.import b/addons/primitives2d/icon_arc.svg.import new file mode 100644 index 0000000..ad4da25 --- /dev/null +++ b/addons/primitives2d/icon_arc.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cktwptpptwjde" +path="res://.godot/imported/icon_arc.svg-7a5f8a77ce12efc06399abc8e3fce355.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/primitives2d/icon_arc.svg" +dest_files=["res://.godot/imported/icon_arc.svg-7a5f8a77ce12efc06399abc8e3fce355.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/addons/primitives2d/icon_circle.svg b/addons/primitives2d/icon_circle.svg new file mode 100644 index 0000000..bc0bb03 --- /dev/null +++ b/addons/primitives2d/icon_circle.svg @@ -0,0 +1,64 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/addons/primitives2d/icon_circle.svg.import b/addons/primitives2d/icon_circle.svg.import new file mode 100644 index 0000000..ee8b9b0 --- /dev/null +++ b/addons/primitives2d/icon_circle.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://lyvf2iftw2pt" +path="res://.godot/imported/icon_circle.svg-bce51241acdfbf9ba6275aa0791b2467.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/primitives2d/icon_circle.svg" +dest_files=["res://.godot/imported/icon_circle.svg-bce51241acdfbf9ba6275aa0791b2467.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/addons/primitives2d/icon_rect.svg b/addons/primitives2d/icon_rect.svg new file mode 100644 index 0000000..5f59fdf --- /dev/null +++ b/addons/primitives2d/icon_rect.svg @@ -0,0 +1,63 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/addons/primitives2d/icon_rect.svg.import b/addons/primitives2d/icon_rect.svg.import new file mode 100644 index 0000000..99eef23 --- /dev/null +++ b/addons/primitives2d/icon_rect.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cuyk0h2qlsus8" +path="res://.godot/imported/icon_rect.svg-2d0412db84b08def9dbef32870e9e825.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/primitives2d/icon_rect.svg" +dest_files=["res://.godot/imported/icon_rect.svg-2d0412db84b08def9dbef32870e9e825.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/addons/primitives2d/plugin.cfg b/addons/primitives2d/plugin.cfg new file mode 100644 index 0000000..7ef30d1 --- /dev/null +++ b/addons/primitives2d/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Primitives2D" +description="A plugin for rendering primitive 2d shapes." +author="Peter Kish" +version="0.0.2" +script="primitives2d.gd" diff --git a/addons/primitives2d/primitives2d.gd b/addons/primitives2d/primitives2d.gd new file mode 100644 index 0000000..d1b0580 --- /dev/null +++ b/addons/primitives2d/primitives2d.gd @@ -0,0 +1,14 @@ +@tool +extends EditorPlugin + + +func _enter_tree(): + add_custom_type("Rectangle2D", "Node2D", preload("rectangle2d.gd"), preload("icon_rect.svg")) + add_custom_type("Circle2D", "Node2D", preload("circle2d.gd"), preload("icon_circle.svg")) + add_custom_type("Arc2D", "Node2D", preload("arc2d.gd"), preload("icon_arc.svg")) + + +func _exit_tree(): + remove_custom_type("Rectangle2D") + remove_custom_type("Circle2D") + remove_custom_type("Arc2D") diff --git a/addons/primitives2d/primitives2d.gd.uid b/addons/primitives2d/primitives2d.gd.uid new file mode 100644 index 0000000..8d46669 --- /dev/null +++ b/addons/primitives2d/primitives2d.gd.uid @@ -0,0 +1 @@ +uid://detus2vpvumon diff --git a/addons/primitives2d/rectangle2d.gd b/addons/primitives2d/rectangle2d.gd new file mode 100644 index 0000000..e561710 --- /dev/null +++ b/addons/primitives2d/rectangle2d.gd @@ -0,0 +1,41 @@ +@tool +extends Node2D +class_name Rectangle2D + +@export var color: Color = Color(1.0, 1.0, 1.0) : + set(new_color): + if color == new_color: + return + color = new_color + queue_redraw() +@export var size: Vector2 = Vector2(10, 10) : + set(new_size): + if size == new_size: + return + size = new_size + queue_redraw() +@export var filled: bool = true : + set(new_filled): + if filled == new_filled: + return + filled = new_filled + queue_redraw() +@export var line_width: float = -1.0 : + set(new_line_width): + if line_width == new_line_width: + return + line_width = new_line_width + queue_redraw() +@export var centered: bool = false : + set(new_centered): + if centered == new_centered: + return + centered = new_centered + queue_redraw() + + +func _draw() -> void: + var rect = Rect2(Vector2.ZERO, size) + if centered: + rect.position -= rect.size / 2 + draw_rect(rect, color, filled, line_width) diff --git a/addons/primitives2d/rectangle2d.gd.uid b/addons/primitives2d/rectangle2d.gd.uid new file mode 100644 index 0000000..0989e93 --- /dev/null +++ b/addons/primitives2d/rectangle2d.gd.uid @@ -0,0 +1 @@ +uid://bspmrib6cl6qc diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..bb69c10 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=3 uid="uid://bn8vrgsvwn637"] + +[sub_resource type="Sky" id="1"] + +[resource] +background_mode = 2 +sky = SubResource("1") diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c98fbb6 Binary files /dev/null and b/icon.png differ diff --git a/icon.png.import b/icon.png.import new file mode 100644 index 0000000..60ba1cd --- /dev/null +++ b/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d16cl12e7emr3" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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 diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..8302491 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://mm7esur6jc6g" +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/images/logo.svg b/images/logo.svg new file mode 100644 index 0000000..14180c3 --- /dev/null +++ b/images/logo.svg @@ -0,0 +1,66 @@ + +image/svg+xml diff --git a/images/logo.svg.import b/images/logo.svg.import new file mode 100644 index 0000000..f9f6511 --- /dev/null +++ b/images/logo.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7alrclriuwu5" +path="res://.godot/imported/logo.svg-2a358a172e03a2c52fe1d84dd759ccf5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/logo.svg" +dest_files=["res://.godot/imported/logo.svg-2a358a172e03a2c52fe1d84dd759ccf5.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/images/ss_editor.png b/images/ss_editor.png new file mode 100644 index 0000000..d70441b Binary files /dev/null and b/images/ss_editor.png differ diff --git a/images/ss_editor.png.import b/images/ss_editor.png.import new file mode 100644 index 0000000..c6f74b4 --- /dev/null +++ b/images/ss_editor.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://did8jtoy828bl" +path="res://.godot/imported/ss_editor.png-7e64bce0e7c68fc091b99ba790d849af.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://images/ss_editor.png" +dest_files=["res://.godot/imported/ss_editor.png-7e64bce0e7c68fc091b99ba790d849af.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 diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..fdb26cb --- /dev/null +++ b/main.tscn @@ -0,0 +1,526 @@ +[gd_scene load_steps=23 format=3 uid="uid://dc7mdcm45gwcm"] + +[ext_resource type="Script" uid="uid://837wj2bp417t" path="res://addons/primitives2d/circle2d.gd" id="1_ig7tw"] +[ext_resource type="Script" uid="uid://bspmrib6cl6qc" path="res://addons/primitives2d/rectangle2d.gd" id="2_0xm2m"] +[ext_resource type="Script" uid="uid://cqccd451iqfti" path="res://PaddlePivotTest.cs" id="3_h2yge"] +[ext_resource type="Script" uid="uid://csmfx22swajfs" path="res://GameManager.cs" id="4_lquwl"] +[ext_resource type="Script" uid="uid://dw1twisa1uie6" path="res://CenterDisplayController.cs" id="5_7mycd"] + +[sub_resource type="SystemFont" id="SystemFont_0xm2m"] +font_names = PackedStringArray("Fredoka") +hinting = 2 + +[sub_resource type="LabelSettings" id="LabelSettings_h2yge"] +line_spacing = -17.165 +font = SubResource("SystemFont_0xm2m") +font_size = 46 + +[sub_resource type="SystemFont" id="SystemFont_h2yge"] +font_names = PackedStringArray("Fredoka") +font_stretch = 200 + +[sub_resource type="LabelSettings" id="LabelSettings_1bvp3"] +font = SubResource("SystemFont_h2yge") +font_size = 56 + +[sub_resource type="LabelSettings" id="LabelSettings_lquwl"] +font = SubResource("SystemFont_h2yge") +font_size = 125 +font_color = Color(1, 1, 1, 0.0862745) + +[sub_resource type="Animation" id="Animation_272bh"] +resource_name = "CounterFadeIn" +length = 0.5 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0.0862745), Color(1, 1, 1, 1)] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimationPlayer") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.5), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [&"CounterInIdle", -1, 1.0, false], +"method": &"play" +}] +} + +[sub_resource type="Animation" id="Animation_5vw27"] +resource_name = "CounterFadeOut" +length = 0.35 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.35), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0.0862745)] +} + +[sub_resource type="Animation" id="Animation_kek77"] +resource_name = "CounterInIdle" +length = 0.1 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_4c57u"] +resource_name = "CounterOutIdle" +length = 0.1 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0.0862745), Color(1, 1, 1, 0.0862745)] +} + +[sub_resource type="Animation" id="Animation_efxa6"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0.0862745)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_dg77c"] +_data = { +&"CounterFadeIn": SubResource("Animation_272bh"), +&"CounterFadeOut": SubResource("Animation_5vw27"), +&"CounterInIdle": SubResource("Animation_kek77"), +&"CounterOutIdle": SubResource("Animation_4c57u"), +&"RESET": SubResource("Animation_efxa6") +} + +[sub_resource type="LabelSettings" id="LabelSettings_7mycd"] +font = SubResource("SystemFont_h2yge") +font_size = 20 +shadow_color = Color(0.637843, 0.637843, 0.637843, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_272bh"] +line_spacing = -4.19 +font = SubResource("SystemFont_h2yge") +font_size = 30 +font_color = Color(0, 0.32549, 0.698039, 0) + +[sub_resource type="Animation" id="Animation_lquwl"] +resource_name = "TextFade" +length = 0.75 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.749632), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0.32549, 0.698039, 0.34902), Color(0, 0.32549, 0.698039, 1)] +} + +[sub_resource type="Animation" id="Animation_7mycd"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(0, 0.32549, 0.698039, 0)] +} + +[sub_resource type="Animation" id="Animation_dg77c"] +resource_name = "TextOutIdle" +length = 0.1 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:label_settings:font_color") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(0, 0.32549, 0.698039, 0), Color(0, 0.32549, 0.698039, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_272bh"] +_data = { +&"RESET": SubResource("Animation_7mycd"), +&"TextFade": SubResource("Animation_lquwl"), +&"TextOutIdle": SubResource("Animation_dg77c") +} + +[node name="Node2D" type="Node2D"] + +[node name="Camera2D" type="Camera2D" parent="."] +offset = Vector2(0, -158.4) + +[node name="Sprite2D" type="Sprite2D" parent="."] + +[node name="Polygon2D" type="Polygon2D" parent="."] + +[node name="MainBodyLit" type="Node2D" parent="."] +z_index = -1 +script = ExtResource("1_ig7tw") +radius = 289.04 +filled = true +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="MainBodyOutline" type="Node2D" parent="."] +z_index = -2 +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 298.25 +filled = true +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="MainBodyLEDBackground" type="Node2D" parent="."] +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 246.215 +line_width = 72.66 +detail = 90 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="HACK" type="Node2D" parent="MainBodyLEDBackground"] +rotation = 0.0371891 +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 246.215 +line_width = 72.66 +detail = 90 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="PaddleTrack" type="Node2D" parent="."] +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 183.83 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="PaddleTrackOutline" type="Node2D" parent="PaddleTrack"] +script = ExtResource("1_ig7tw") +color = Color(0, 0, 0, 1) +radius = 184.415 +line_width = 3.24 +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="HACK" type="Node2D" parent="PaddleTrack/PaddleTrackOutline"] +rotation = 0.00711103 +script = ExtResource("1_ig7tw") +color = Color(0, 0, 0, 1) +radius = 184.415 +line_width = 3.24 +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="DisplayOutline" type="Node2D" parent="."] +z_index = 1 +script = ExtResource("1_ig7tw") +color = Color(0.47788, 0.47788, 0.47788, 1) +radius = 113.605 +line_width = 9.2 +detail = 67 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="FUCKINGHACK" type="Node2D" parent="DisplayOutline"] +z_index = 1 +rotation = 0.0129723 +script = ExtResource("1_ig7tw") +color = Color(0.47788, 0.47788, 0.47788, 1) +radius = 113.605 +line_width = 9.2 +detail = 67 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="LockTopBackgroundLit" type="Node2D" parent="."] +z_index = -4 +position = Vector2(0, -405) +script = ExtResource("1_ig7tw") +radius = 190.0 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="LockTopBackgroundLit2" type="Node2D" parent="LockTopBackgroundLit"] +z_index = -2 +position = Vector2(0, 179) +script = ExtResource("2_0xm2m") +size = Vector2(380, 352.7) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="LockTopOutline" type="Node2D" parent="."] +z_index = -7 +position = Vector2(0, -405) +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 200.0 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="LockTopOutline2" type="Node2D" parent="LockTopOutline"] +z_index = -2 +position = Vector2(0, 179) +script = ExtResource("2_0xm2m") +color = Color(0.14902, 0.14902, 0.14902, 1) +size = Vector2(400, 352.7) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="LockTopInnerBackground" type="Node2D" parent="."] +z_index = -3 +position = Vector2(0, -405) +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 120.0 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="LockTopInnerBackground2" type="Node2D" parent="LockTopInnerBackground"] +z_index = -1 +position = Vector2(0, 179) +script = ExtResource("2_0xm2m") +color = Color(0.14902, 0.14902, 0.14902, 1) +size = Vector2(240, 352.7) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="TopScreenBackground" type="Node2D" parent="."] +z_index = -3 +position = Vector2(0, -295) +script = ExtResource("2_0xm2m") +size = Vector2(215.96, 133.325) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="LogoOutline" type="Node2D" parent="."] +z_index = 1 +position = Vector2(0, -444) +script = ExtResource("1_ig7tw") +radius = 70.015 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="LogoBackground" type="Node2D" parent="."] +z_index = 1 +position = Vector2(0, -444) +script = ExtResource("1_ig7tw") +color = Color(0.14902, 0.14902, 0.14902, 1) +radius = 64.095 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="Label" type="Label" parent="."] +z_index = 1 +offset_left = -40.0 +offset_top = -505.0 +offset_right = 62.0 +offset_bottom = -357.0 +scale = Vector2(0.777311, 0.769849) +text = "Pop +the +Lock" +label_settings = SubResource("LabelSettings_h2yge") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="PaddlePivot" type="Node2D" parent="." node_paths=PackedStringArray("FPS", "HitsLeft", "shapes")] +script = ExtResource("3_h2yge") +FPS = NodePath("../Label2") +HitsLeft = NodePath("../CenterDisplayController/DisplayBackground/Counter") +shapes = [NodePath("../MainBodyLit"), NodePath("../LockTopBackgroundLit"), NodePath("../LockTopBackgroundLit/LockTopBackgroundLit2"), NodePath("../TopScreenBackground")] + +[node name="Circle2D" type="Node2D" parent="PaddlePivot"] +z_index = 8 +position = Vector2(3.04231e-05, -174) +script = ExtResource("1_ig7tw") +color = Color(0.719453, 3.7542e-06, 3.85046e-07, 1) +radius = 6.0 +filled = true +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="Circle2D2" type="Node2D" parent="PaddlePivot"] +z_index = 8 +position = Vector2(2.25551e-05, -129) +script = ExtResource("1_ig7tw") +color = Color(0.719453, 3.7542e-06, 3.85046e-07, 1) +radius = 6.0 +filled = true +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="Rectangle2D" type="Node2D" parent="PaddlePivot"] +z_index = 8 +position = Vector2(0, -151) +script = ExtResource("2_0xm2m") +color = Color(0.719453, 3.7542e-06, 3.85046e-07, 1) +size = Vector2(12, 44.92) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="Label2" type="Label" parent="."] +offset_left = -332.0 +offset_top = -708.0 +offset_right = -120.0 +offset_bottom = -639.0 +text = "FPS: xxx" +label_settings = SubResource("LabelSettings_1bvp3") +vertical_alignment = 1 + +[node name="Coin" type="Node2D" parent="."] +z_index = 1 +position = Vector2(152, 0) +script = ExtResource("1_ig7tw") +color = Color(0.933333, 0.878431, 0, 1) +radius = 26.175 +filled = true +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="Background" type="Node2D" parent="."] +z_index = -100 +script = ExtResource("2_0xm2m") +color = Color(0, 0, 0, 1) +size = Vector2(1000, 10000) +centered = true +metadata/_custom_type_script = "uid://bspmrib6cl6qc" + +[node name="GameManager" type="Node" parent="."] +script = ExtResource("4_lquwl") + +[node name="CenterDisplayController" type="Node" parent="." node_paths=PackedStringArray("_background", "_counterLabel", "_togoLabel", "_pbtsLabel", "_pbstAnimationPlayer", "_counterAnimationPlayer")] +script = ExtResource("5_7mycd") +_background = NodePath("DisplayBackground") +_counterLabel = NodePath("DisplayBackground/Counter") +_togoLabel = NodePath("DisplayBackground/TO GO!") +_pbtsLabel = NodePath("DisplayBackground/Press Button To Start") +_pbstAnimationPlayer = NodePath("DisplayBackground/Press Button To Start/ColorFadeLoop") +_counterAnimationPlayer = NodePath("DisplayBackground/Counter/AnimationPlayer") + +[node name="DisplayBackground" type="Node2D" parent="CenterDisplayController"] +z_index = 1 +script = ExtResource("1_ig7tw") +color = Color(0, 0.75118, 0, 1) +radius = 105.185 +filled = true +detail = 47 +metadata/_custom_type_script = "uid://837wj2bp417t" + +[node name="Counter" type="Label" parent="CenterDisplayController/DisplayBackground"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -106.0 +offset_top = -115.0 +offset_right = 106.0 +offset_bottom = 69.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(106, 92) +text = "50" +label_settings = SubResource("LabelSettings_lquwl") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CenterDisplayController/DisplayBackground/Counter"] +libraries = { +&"": SubResource("AnimationLibrary_dg77c") +} + +[node name="TO GO!" type="Label" parent="CenterDisplayController/DisplayBackground"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -106.0 +offset_top = -33.0 +offset_right = 106.0 +offset_bottom = 151.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(106, 92) +text = "TO GO!" +label_settings = SubResource("LabelSettings_7mycd") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Press Button To Start" type="Label" parent="CenterDisplayController/DisplayBackground"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -106.0 +offset_top = -88.0 +offset_right = 106.0 +offset_bottom = 96.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(106, 92) +text = "Press Button +To Start" +label_settings = SubResource("LabelSettings_272bh") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ColorFadeLoop" type="AnimationPlayer" parent="CenterDisplayController/DisplayBackground/Press Button To Start"] +libraries = { +&"": SubResource("AnimationLibrary_272bh") +} diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..1063282 --- /dev/null +++ b/project.godot @@ -0,0 +1,42 @@ +; 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="PopTheLockClone" +run/main_scene="uid://dc7mdcm45gwcm" +config/features=PackedStringArray("4.4", "C#", "Forward Plus") +config/icon="res://icon.svg" + +[display] + +window/size/viewport_width=677 +window/size/viewport_height=1113 +window/stretch/mode="viewport" + +[dotnet] + +project/assembly_name="PopTheLockClone" + +[editor_plugins] + +enabled=PackedStringArray("res://addons/primitives2d/plugin.cfg") + +[input] + +Press={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} + +[rendering] + +anti_aliasing/quality/msaa_2d=2