diff --git a/Ion.Examples/Ion.Examples.Breakout/Ion.Examples.Breakout.csproj b/Ion.Examples/Ion.Examples.Breakout/Ion.Examples.Breakout.csproj index 3700b1b..bc3f76e 100644 --- a/Ion.Examples/Ion.Examples.Breakout/Ion.Examples.Breakout.csproj +++ b/Ion.Examples/Ion.Examples.Breakout/Ion.Examples.Breakout.csproj @@ -27,6 +27,7 @@ + diff --git a/Ion.Examples/Ion.Examples.Breakout/appsettings.json b/Ion.Examples/Ion.Examples.Breakout/appsettings.json index e106015..44b36fa 100644 --- a/Ion.Examples/Ion.Examples.Breakout/appsettings.json +++ b/Ion.Examples/Ion.Examples.Breakout/appsettings.json @@ -7,7 +7,7 @@ }, "Ion": { "Title": "Ion Breakout Example", - "MaxFPS": 500, + "MaxFPS": 120, "Debug": { "TraceEnabled": true }, diff --git a/Ion.Examples/Ion.Examples.Scenes/Ion.Examples.Scenes.csproj b/Ion.Examples/Ion.Examples.Scenes/Ion.Examples.Scenes.csproj index e21c2fc..9accbf9 100644 --- a/Ion.Examples/Ion.Examples.Scenes/Ion.Examples.Scenes.csproj +++ b/Ion.Examples/Ion.Examples.Scenes/Ion.Examples.Scenes.csproj @@ -19,7 +19,7 @@ - + \ No newline at end of file diff --git a/Ion.Examples/Ion.Examples.Scenes/Program.cs b/Ion.Examples/Ion.Examples.Scenes/Program.cs index f4fb19a..d97c84d 100644 --- a/Ion.Examples/Ion.Examples.Scenes/Program.cs +++ b/Ion.Examples/Ion.Examples.Scenes/Program.cs @@ -34,11 +34,13 @@ { IEnumerator CountDown(int from) { - while (from >= 0) + while (from > 0) { Console.WriteLine("Countdown: " + from--); - yield return Wait.Until(() => input.Pressed(Key.Space)); + yield return Wait.For(TimeSpan.FromSeconds(1)); } + + Console.WriteLine("Countdown done!"); } return dt => @@ -68,7 +70,7 @@ IEnumerator CountDown(int from) { var logFrameNumber = Throttler.Wrap(TimeSpan.FromSeconds(0.5), (dt) => { - Console.WriteLine($"Frame: {dt.Frame}!"); + //Console.WriteLine($"Frame: {dt.Frame}!"); }); return dt => @@ -97,7 +99,7 @@ IEnumerator CountDown(int from) { if (events.On(out var e)) Console.WriteLine($"Int event! {e.Data}"); next(dt); - switchScene(dt); + //switchScene(dt); }; }); diff --git a/Ion.sln b/Ion.sln index c127c4a..f6c6cbe 100644 --- a/Ion.sln +++ b/Ion.sln @@ -70,167 +70,110 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ion.Extensions.Assets.Abstr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ion.Extensions.Assets", "Ion\Ion.Extensions.Assets\Ion.Extensions.Assets.csproj", "{63F8B34A-3056-4EB4-A6AA-76508E7CA707}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ion.Extensions.Graphics.WGPU", "Ion\Ion.Extensions.Graphics.WGPU\Ion.Extensions.Graphics.WGPU.csproj", "{DC575907-E24D-4991-B90F-286B8EE342DD}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ion.Extensions.Scenes.Generators", "Ion\Ion.Extensions.Scenes.Generators\Ion.Extensions.Scenes.Generators.csproj", "{2488F296-352B-4FE6-8040-1E39DAD95C4F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ion.Extensions.Scenes.Generators.Tests", "Ion\Ion.Extensions.Scenes.Generators.Tests\Ion.Extensions.Scenes.Generators.Tests.csproj", "{B3E523F8-E19C-47EF-B344-74B736AEF1FA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ion.Extensions.Scenes.Generators.Tests", "Ion\Ion.Extensions.Scenes.Generators.Tests\Ion.Extensions.Scenes.Generators.Tests.csproj", "{B3E523F8-E19C-47EF-B344-74B736AEF1FA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - DebugGenerators|Any CPU = DebugGenerators|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {94ACED8A-3370-48F3-A749-68C81FDDE652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94ACED8A-3370-48F3-A749-68C81FDDE652}.Debug|Any CPU.Build.0 = Debug|Any CPU - {94ACED8A-3370-48F3-A749-68C81FDDE652}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {94ACED8A-3370-48F3-A749-68C81FDDE652}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {94ACED8A-3370-48F3-A749-68C81FDDE652}.Release|Any CPU.ActiveCfg = Release|Any CPU {94ACED8A-3370-48F3-A749-68C81FDDE652}.Release|Any CPU.Build.0 = Release|Any CPU {FF7891A1-606D-413D-B9F2-918D2DB5F266}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FF7891A1-606D-413D-B9F2-918D2DB5F266}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF7891A1-606D-413D-B9F2-918D2DB5F266}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {FF7891A1-606D-413D-B9F2-918D2DB5F266}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {FF7891A1-606D-413D-B9F2-918D2DB5F266}.Release|Any CPU.ActiveCfg = Release|Any CPU {FF7891A1-606D-413D-B9F2-918D2DB5F266}.Release|Any CPU.Build.0 = Release|Any CPU {74342FF5-BD87-4F81-A783-1A13ADE5F052}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74342FF5-BD87-4F81-A783-1A13ADE5F052}.Debug|Any CPU.Build.0 = Debug|Any CPU - {74342FF5-BD87-4F81-A783-1A13ADE5F052}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {74342FF5-BD87-4F81-A783-1A13ADE5F052}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {74342FF5-BD87-4F81-A783-1A13ADE5F052}.Release|Any CPU.ActiveCfg = Release|Any CPU {74342FF5-BD87-4F81-A783-1A13ADE5F052}.Release|Any CPU.Build.0 = Release|Any CPU {B6044750-A205-4D10-AD02-02707AE9FC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6044750-A205-4D10-AD02-02707AE9FC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6044750-A205-4D10-AD02-02707AE9FC0A}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {B6044750-A205-4D10-AD02-02707AE9FC0A}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {B6044750-A205-4D10-AD02-02707AE9FC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6044750-A205-4D10-AD02-02707AE9FC0A}.Release|Any CPU.Build.0 = Release|Any CPU {700C404D-596B-4F79-9E4A-1B49355059D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {700C404D-596B-4F79-9E4A-1B49355059D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {700C404D-596B-4F79-9E4A-1B49355059D5}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {700C404D-596B-4F79-9E4A-1B49355059D5}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {700C404D-596B-4F79-9E4A-1B49355059D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {700C404D-596B-4F79-9E4A-1B49355059D5}.Release|Any CPU.Build.0 = Release|Any CPU {59A49B7B-62B2-4343-838E-AE7E883BDB52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {59A49B7B-62B2-4343-838E-AE7E883BDB52}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59A49B7B-62B2-4343-838E-AE7E883BDB52}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {59A49B7B-62B2-4343-838E-AE7E883BDB52}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {59A49B7B-62B2-4343-838E-AE7E883BDB52}.Release|Any CPU.ActiveCfg = Release|Any CPU {59A49B7B-62B2-4343-838E-AE7E883BDB52}.Release|Any CPU.Build.0 = Release|Any CPU {BC64E83E-4034-407F-810C-671EC13AD1D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC64E83E-4034-407F-810C-671EC13AD1D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC64E83E-4034-407F-810C-671EC13AD1D7}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {BC64E83E-4034-407F-810C-671EC13AD1D7}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {BC64E83E-4034-407F-810C-671EC13AD1D7}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC64E83E-4034-407F-810C-671EC13AD1D7}.Release|Any CPU.Build.0 = Release|Any CPU {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6AE892E-ED53-4CF9-B3D4-5F904E6E352D}.Release|Any CPU.Build.0 = Release|Any CPU {B3B07001-6598-48DF-8320-C65870A9E0F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3B07001-6598-48DF-8320-C65870A9E0F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3B07001-6598-48DF-8320-C65870A9E0F5}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {B3B07001-6598-48DF-8320-C65870A9E0F5}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {B3B07001-6598-48DF-8320-C65870A9E0F5}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3B07001-6598-48DF-8320-C65870A9E0F5}.Release|Any CPU.Build.0 = Release|Any CPU {DFD31B44-8064-4143-9B38-572729A89071}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DFD31B44-8064-4143-9B38-572729A89071}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DFD31B44-8064-4143-9B38-572729A89071}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {DFD31B44-8064-4143-9B38-572729A89071}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {DFD31B44-8064-4143-9B38-572729A89071}.Release|Any CPU.ActiveCfg = Release|Any CPU {DFD31B44-8064-4143-9B38-572729A89071}.Release|Any CPU.Build.0 = Release|Any CPU {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E7E36EE-B7D7-41FE-9E0F-4FF52A18207A}.Release|Any CPU.Build.0 = Release|Any CPU {5C41D010-5952-4155-B2C4-B85FA220B62E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5C41D010-5952-4155-B2C4-B85FA220B62E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C41D010-5952-4155-B2C4-B85FA220B62E}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {5C41D010-5952-4155-B2C4-B85FA220B62E}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {5C41D010-5952-4155-B2C4-B85FA220B62E}.Release|Any CPU.ActiveCfg = Release|Any CPU {5C41D010-5952-4155-B2C4-B85FA220B62E}.Release|Any CPU.Build.0 = Release|Any CPU {270CA94E-3C14-42BE-AEBB-58C236C39E15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {270CA94E-3C14-42BE-AEBB-58C236C39E15}.Debug|Any CPU.Build.0 = Debug|Any CPU - {270CA94E-3C14-42BE-AEBB-58C236C39E15}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {270CA94E-3C14-42BE-AEBB-58C236C39E15}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {270CA94E-3C14-42BE-AEBB-58C236C39E15}.Release|Any CPU.ActiveCfg = Release|Any CPU {270CA94E-3C14-42BE-AEBB-58C236C39E15}.Release|Any CPU.Build.0 = Release|Any CPU {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E6D0EA0-9329-42D7-8B50-F6FB43241E99}.Release|Any CPU.Build.0 = Release|Any CPU {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.Release|Any CPU.ActiveCfg = Release|Any CPU {B37F3A4D-9F4A-4CCD-8408-4B1BFF40DE96}.Release|Any CPU.Build.0 = Release|Any CPU {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB97F94C-5366-4591-9AC3-CAF5C60EEA75}.Release|Any CPU.Build.0 = Release|Any CPU {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FF057BB-9D7B-4CA4-A0E4-E5430DBA5C92}.Release|Any CPU.Build.0 = Release|Any CPU {37A9A838-82CF-45A8-B5C6-28742BBAB223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {37A9A838-82CF-45A8-B5C6-28742BBAB223}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37A9A838-82CF-45A8-B5C6-28742BBAB223}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {37A9A838-82CF-45A8-B5C6-28742BBAB223}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {37A9A838-82CF-45A8-B5C6-28742BBAB223}.Release|Any CPU.ActiveCfg = Release|Any CPU {37A9A838-82CF-45A8-B5C6-28742BBAB223}.Release|Any CPU.Build.0 = Release|Any CPU {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B15406E-E3BD-4C0B-A9B1-DFCE63B38952}.Release|Any CPU.Build.0 = Release|Any CPU {647E9B1E-21CB-48A0-881D-072446AD0E39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {647E9B1E-21CB-48A0-881D-072446AD0E39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {647E9B1E-21CB-48A0-881D-072446AD0E39}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {647E9B1E-21CB-48A0-881D-072446AD0E39}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {647E9B1E-21CB-48A0-881D-072446AD0E39}.Release|Any CPU.ActiveCfg = Release|Any CPU {647E9B1E-21CB-48A0-881D-072446AD0E39}.Release|Any CPU.Build.0 = Release|Any CPU {C8C50528-0151-41B3-A78C-505034B1E1C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C8C50528-0151-41B3-A78C-505034B1E1C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8C50528-0151-41B3-A78C-505034B1E1C6}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {C8C50528-0151-41B3-A78C-505034B1E1C6}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {C8C50528-0151-41B3-A78C-505034B1E1C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {C8C50528-0151-41B3-A78C-505034B1E1C6}.Release|Any CPU.Build.0 = Release|Any CPU {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.Debug|Any CPU.Build.0 = Debug|Any CPU - {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.Release|Any CPU.ActiveCfg = Release|Any CPU {63F8B34A-3056-4EB4-A6AA-76508E7CA707}.Release|Any CPU.Build.0 = Release|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DC575907-E24D-4991-B90F-286B8EE342DD}.Release|Any CPU.Build.0 = Release|Any CPU {2488F296-352B-4FE6-8040-1E39DAD95C4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2488F296-352B-4FE6-8040-1E39DAD95C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2488F296-352B-4FE6-8040-1E39DAD95C4F}.DebugGenerators|Any CPU.ActiveCfg = DebugGenerators|Any CPU - {2488F296-352B-4FE6-8040-1E39DAD95C4F}.DebugGenerators|Any CPU.Build.0 = DebugGenerators|Any CPU {2488F296-352B-4FE6-8040-1E39DAD95C4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {2488F296-352B-4FE6-8040-1E39DAD95C4F}.Release|Any CPU.Build.0 = Release|Any CPU {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.DebugGenerators|Any CPU.ActiveCfg = Debug|Any CPU - {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.DebugGenerators|Any CPU.Build.0 = Debug|Any CPU {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3E523F8-E19C-47EF-B344-74B736AEF1FA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection @@ -261,7 +204,6 @@ Global {647E9B1E-21CB-48A0-881D-072446AD0E39} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} {C8C50528-0151-41B3-A78C-505034B1E1C6} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} {63F8B34A-3056-4EB4-A6AA-76508E7CA707} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} - {DC575907-E24D-4991-B90F-286B8EE342DD} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} {2488F296-352B-4FE6-8040-1E39DAD95C4F} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} {B3E523F8-E19C-47EF-B344-74B736AEF1FA} = {A38C6AA1-BA6E-4DBC-BC7C-F0BD034224CE} EndGlobalSection diff --git a/Ion/Ion.Extensions.Coroutines.Abstractions/Wait.cs b/Ion/Ion.Extensions.Coroutines.Abstractions/Wait.cs index ea60c6c..af9845e 100644 --- a/Ion/Ion.Extensions.Coroutines.Abstractions/Wait.cs +++ b/Ion/Ion.Extensions.Coroutines.Abstractions/Wait.cs @@ -4,6 +4,8 @@ public static class Wait { public static IWait For(float delay) => new WaitFor(delay); + public static IWait For(TimeSpan delay) => new WaitFor((float)delay.TotalSeconds); + public static IWait For() where TEvent : unmanaged => new WaitForEvent(); public static IWait Until(Func predicate) => new WaitUntil(predicate); diff --git a/Ion/Ion.Extensions.Scenes.Abstractions/Ion.Extensions.Scenes.Abstractions.csproj b/Ion/Ion.Extensions.Scenes.Abstractions/Ion.Extensions.Scenes.Abstractions.csproj index e43c6eb..ecf5c87 100644 --- a/Ion/Ion.Extensions.Scenes.Abstractions/Ion.Extensions.Scenes.Abstractions.csproj +++ b/Ion/Ion.Extensions.Scenes.Abstractions/Ion.Extensions.Scenes.Abstractions.csproj @@ -4,12 +4,12 @@ true enable enable + true - \ No newline at end of file diff --git a/Ion/Ion.Extensions.Scenes.Generators.Tests/SceneGeneratorTests.cs b/Ion/Ion.Extensions.Scenes.Generators.Tests/SceneGeneratorTests.cs index e977d63..9884504 100644 --- a/Ion/Ion.Extensions.Scenes.Generators.Tests/SceneGeneratorTests.cs +++ b/Ion/Ion.Extensions.Scenes.Generators.Tests/SceneGeneratorTests.cs @@ -5,7 +5,7 @@ namespace Ion.Extensions.Scenes.Generators.Tests; public class SceneGeneratorTests { - [Fact] + [Fact(Skip = "WIP")] public Task TestSceneGenerator() { // The source code to test @@ -48,6 +48,15 @@ public static Task Verify(string source) // Run the source generator! driver = driver.RunGenerators(compilation); + var runResults = driver.GetRunResult(); + foreach(var generatedTree in runResults.GeneratedTrees) + { + var filename = generatedTree.FilePath; + var contents = generatedTree.GetText().ToString(); + Console.WriteLine(@$"// Generated File: {filename} +{contents}"); + } + // Use verify to snapshot test the source generator output! return Verifier.Verify(driver); } diff --git a/Ion/Ion.Extensions.Scenes.Generators/Ion.Extensions.Scenes.Generators.csproj b/Ion/Ion.Extensions.Scenes.Generators/Ion.Extensions.Scenes.Generators.csproj index 3541cb5..66deadf 100644 --- a/Ion/Ion.Extensions.Scenes.Generators/Ion.Extensions.Scenes.Generators.csproj +++ b/Ion/Ion.Extensions.Scenes.Generators/Ion.Extensions.Scenes.Generators.csproj @@ -1,30 +1,40 @@  + + netstandard2.0 + enable + true + Preview + false + True + True + True + True + True + Debug;Release + - - netstandard2.0 - false - enable - true - Preview - True - True - true - True - Debug;Release;DebugGenerators - - - - - - + + Ion.Extensions.Scenes.Generators + 0.1.0.0 + Jim Buck + https://LICENSE_URL_HERE_OR_DELETE_THIS_LINE + https://PROJECT_URL_HERE_OR_DELETE_THIS_LINE + https://ICON_URL_HERE_OR_DELETE_THIS_LINE + https://REPOSITORY_URL_HERE_OR_DELETE_THIS_LINE + false + Source Generator for Scene Extensions + Summary of changes made in this release of the package. + Copyright Jim Buck 2024 + ion;game engine;analyzers + true + - + + - - - + diff --git a/Ion/Ion.Extensions.Scenes.Generators/ScenesGenerator.cs b/Ion/Ion.Extensions.Scenes.Generators/ScenesGenerator.cs index 4baf7cc..bf10927 100644 --- a/Ion/Ion.Extensions.Scenes.Generators/ScenesGenerator.cs +++ b/Ion/Ion.Extensions.Scenes.Generators/ScenesGenerator.cs @@ -122,7 +122,7 @@ static SourceText _createExtensionMethods(string enumNamespace, string enumName) source.OpenBlock(); #region UseScene Extension - source.WriteLine($"public static IIonApplication UseScene(this IIonApplication app, {enumNamespace}.{enumName} sceneId, Action configure) => return app.UseScene((int)sceneId, configure);"); + source.WriteLine($"public static IIonApplication UseScene(this IIonApplication app, {enumNamespace}.{enumName} sceneId, Action configure) => app.UseScene((int)sceneId, configure);"); #endregion source.WriteEmptyLines(1);