diff --git a/godot/.vs/Hurrmmm/v17/.suo b/godot/.vs/Hurrmmm/v17/.suo new file mode 100644 index 0000000..f62e480 Binary files /dev/null and b/godot/.vs/Hurrmmm/v17/.suo differ diff --git a/godot/Backup/Hurrmmm.sln b/godot/Backup/Hurrmmm.sln new file mode 100644 index 0000000..082e355 --- /dev/null +++ b/godot/Backup/Hurrmmm.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hurrmmm", "Hurrmmm.csproj", "{BD45A87E-5242-45B0-9A55-8B809F4BB443}" +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 + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/godot/Hurrmmm.sln b/godot/Hurrmmm.sln index 082e355..565be6a 100644 --- a/godot/Hurrmmm.sln +++ b/godot/Hurrmmm.sln @@ -1,12 +1,15 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33815.320 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hurrmmm", "Hurrmmm.csproj", "{BD45A87E-5242-45B0-9A55-8B809F4BB443}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - ExportDebug|Any CPU = ExportDebug|Any CPU - ExportRelease|Any CPU = ExportRelease|Any CPU + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BD45A87E-5242-45B0-9A55-8B809F4BB443}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -16,4 +19,10 @@ Global {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU {BD45A87E-5242-45B0-9A55-8B809F4BB443}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {87544EC1-9C6D-4DF7-891E-89088A6D794E} + EndGlobalSection EndGlobal diff --git a/godot/TAS_system/TAS_System.cs b/godot/TAS_system/TAS_System.cs index 7d59442..d16374f 100644 --- a/godot/TAS_system/TAS_System.cs +++ b/godot/TAS_system/TAS_System.cs @@ -3,4 +3,108 @@ using System; public partial class TAS_System : Node { + private double _frameLength = 0.1; + private bool _isCountingFrames = false; + private Timer _frameTimer; + private int _currentFrame = 0; + private int _lastAdvancedFrame = 0; + + public double FrameLength + { + get { return this._frameLength; } + private set { this._frameLength = value; } + } + + public bool IsCountingFrames + { + get { return this._isCountingFrames; } + private set { this._isCountingFrames = value; } + } + + private Timer FrameTimer + { + get { return this._frameTimer; } + set { this._frameTimer = value; } + } + + public int CurrentFrame + { + get { return this._currentFrame; } + private set { this._currentFrame = value; } + } + + /// + /// The last frame that can be advanced to. This will + /// only be greater than CurrentFrame after the player + /// regresses frames, and will be equal to CurrentFrame + /// when the player has just done an action. + /// + /// + public int LastAdvancedFrame + { + get { return this._lastAdvancedFrame; } + private set { this._lastAdvancedFrame = value; } + } + + + [Signal] + public delegate void FrameAdvancedEventHandler(int currentFrame); + + [Signal] + public delegate void FramesAdvancedEventHandler(int numFrames); + + [Signal] + public delegate void FramesRegressedEventHandler(int numFrames); + + + public void StartCountingFrames() + { + + } + + public void StopCountingFrames() + { + + } + + public void ResetFrameCount() + { + this.CurrentFrame = 0; + this.LastAdvancedFrame = 0; + } + + // Returns how many frames it could successfully advance + public int Advance(int numFrames) + { + int newFrame = Math.Min(this.CurrentFrame + numFrames, this.LastAdvancedFrame); + int framesAdvanced = newFrame - this.CurrentFrame; + EmitSignal(SignalName.FramesAdvanced, framesAdvanced); + return framesAdvanced; + } + + // Returns how many frames it could successfully regress + public int Regress(int numFrames) + { + int newFrame = Math.Max(this.CurrentFrame - numFrames, 0); + int framesRegressed = newFrame - this.CurrentFrame; + EmitSignal(SignalName.FramesRegressed, framesRegressed); + return framesRegressed; + } + + /// + /// Gets rid of advanced frames. + /// + public void DiscardAdvancedFrames() + { + this.LastAdvancedFrame = this.CurrentFrame; + } + + + + // public void Test() + // { + // GD.Print("test123"); + + // // EmitSignal(SignalName.TestSignal, "test456"); + // } } diff --git a/godot/TAS_system/TAS_System.tscn b/godot/TAS_system/TAS_System.tscn new file mode 100644 index 0000000..910d0fa --- /dev/null +++ b/godot/TAS_system/TAS_System.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://x6yhkj1f7yg1"] + +[ext_resource type="Script" path="res://TAS_system/TAS_System.cs" id="1_4s6ry"] + +[node name="System" type="Node"] +script = ExtResource("1_4s6ry") diff --git a/godot/UpgradeLog.htm b/godot/UpgradeLog.htm new file mode 100644 index 0000000..87498ff --- /dev/null +++ b/godot/UpgradeLog.htm @@ -0,0 +1,275 @@ + + + + Migration Report +

+ Migration Report - Hurrmmm

Overview

ProjectPathErrorsWarningsMessages
SolutionHurrmmm.sln012
HurrmmmHurrmmm.csproj000

Solution and projects

Solution

Message
Hurrmmm.sln: + Visual Studio needs to make non-functional changes to this project in order to enable the project to open in released versions of Visual Studio newer than Visual Studio 2010 SP1 without impacting project behavior.
+ Show 2 additional messages +
Hurrmmm.sln: + File successfully backed up as C:\Repos\Hurrmmm\hurrmmm\godot\Backup\Hurrmmm.sln
Hurrmmm.sln: + Solution migrated successfully
+ Hide 2 additional messages +

Hurrmmm

Message
Hurrmmm logged no messages. +
\ No newline at end of file diff --git a/godot/control_scheme/control_target_overlay.material b/godot/control_scheme/control_target_overlay.material index fcdc96e..4c10d6e 100644 --- a/godot/control_scheme/control_target_overlay.material +++ b/godot/control_scheme/control_target_overlay.material @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83a5adc4b833fc7a42cad6a04f5b3d502ca33fc2c0545d350f546aa998cb8117 -size 175 +oid sha256:5e2f59d49b77fafd3669572cc5924fcb59abe83d602965d8335d78cc167e616a +size 194 diff --git a/godot/project.godot b/godot/project.godot index 489a5ff..3a2df07 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -11,12 +11,14 @@ config_version=5 [application] config/name="Hurrmmm" -config/features=PackedStringArray("4.1", "Forward Plus") +run/main_scene="res://tests/TAS_system/TAS_test_001.tscn" +config/features=PackedStringArray("4.1", "C#", "Forward Plus") config/icon="res://icon.svg" [autoload] ControllerEventBus="*res://controller_event_bus.gd" +TAS="*res://TAS_system/TAS_System.tscn" [dotnet] diff --git a/godot/tests/TAS_system/TAS_test_001.cs b/godot/tests/TAS_system/TAS_test_001.cs new file mode 100644 index 0000000..1fd57c4 --- /dev/null +++ b/godot/tests/TAS_system/TAS_test_001.cs @@ -0,0 +1,25 @@ +using Godot; +using System; + +public partial class TAS_test_001 : Node +{ + + public override void _Ready() + { + // Called every time the node is added to the scene. + // Initialization here. + GD.Print("Hello from C# to Godot :)"); + + TAS_System TAS = GetNode("/root/TAS"); + + // TAS.TestSignal += (x) => GD.Print(x); + + // TAS.Test(); + } + + private void Test2(string testStr2) + { + + } + +} diff --git a/godot/tests/TAS_system/TAS_test_001.tscn b/godot/tests/TAS_system/TAS_test_001.tscn new file mode 100644 index 0000000..5afd062 --- /dev/null +++ b/godot/tests/TAS_system/TAS_test_001.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://bbml0d2v4lf78"] + +[ext_resource type="Script" path="res://tests/TAS_system/TAS_test_001.cs" id="1_0ap5j"] + +[node name="TAS_test_001" type="Node3D"] +script = ExtResource("1_0ap5j")