diff --git "a/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/.gitignore" "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..58201f70f5a54eeacf0bb688d8fc2041df718e28 --- /dev/null +++ "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/.gitignore" @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/projectSettingsUpdater.xml +/modules.xml +/.idea.Harjoitustyö.iml +/contentModel.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/encodings.xml" "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/encodings.xml" new file mode 100644 index 0000000000000000000000000000000000000000..df87cf951fb4858ab7a76b68dd479c98b2df2404 --- /dev/null +++ "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/encodings.xml" @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" /> +</project> \ No newline at end of file diff --git "a/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/indexLayout.xml" "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/indexLayout.xml" new file mode 100644 index 0000000000000000000000000000000000000000..7b08163cebc50fb3e777eea4881b68fcebc10590 --- /dev/null +++ "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/indexLayout.xml" @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="UserContentModel"> + <attachedFolders /> + <explicitIncludes /> + <explicitExcludes /> + </component> +</project> \ No newline at end of file diff --git "a/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/vcs.xml" "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/vcs.xml" new file mode 100644 index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc --- /dev/null +++ "b/Harjoitusty\303\266/.idea/.idea.Harjoitusty\303\266/.idea/vcs.xml" @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git "a/Harjoitusty\303\266/Harjoitusty\303\266.sln" "b/Harjoitusty\303\266/Harjoitusty\303\266.sln" new file mode 100644 index 0000000000000000000000000000000000000000..6cec5f0a3328c290b73ddd506cfd4f62e424f9ef --- /dev/null +++ "b/Harjoitusty\303\266/Harjoitusty\303\266.sln" @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lokkihunter", "Lokkihunter\Lokkihunter.csproj", "{B39A6F49-1760-412C-B9CA-CFC5407D155D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B39A6F49-1760-412C-B9CA-CFC5407D155D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B39A6F49-1760-412C-B9CA-CFC5407D155D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B39A6F49-1760-412C-B9CA-CFC5407D155D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B39A6F49-1760-412C-B9CA-CFC5407D155D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git "a/Harjoitusty\303\266/Lokkihunter/Lokkihunter.cs" "b/Harjoitusty\303\266/Lokkihunter/Lokkihunter.cs" new file mode 100644 index 0000000000000000000000000000000000000000..669f1a3724af566db53731702ab58f847b74e5f8 --- /dev/null +++ "b/Harjoitusty\303\266/Lokkihunter/Lokkihunter.cs" @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using Jypeli; +using Jypeli.Assets; +using Jypeli.Controls; +using Jypeli.Widgets; + +namespace Lokkihunter; + +/// @author Omanimi +/// @version 23.10.2023 +/// <summary> +/// +/// </summary> +public class Lokkihunter : PhysicsGame +{ + private PhysicsObject pekka; + private PhysicsObject alaReuna; + + public override void Begin() + { + pekka = new PhysicsObject(40.0, 40.0); + pekka.Shape = Shape.Circle; + pekka.X = -300; + pekka.Y = -200; + pekka.Restitution = 1.0; + Add(pekka); + + alaReuna = Level.CreateBottomBorder(1, true); + Add(alaReuna); + + Camera.ZoomToLevel(); + + + PhoneBackButton.Listen(ConfirmExit, "Lopeta peli"); + Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); + } +} \ No newline at end of file diff --git "a/Harjoitusty\303\266/Lokkihunter/Lokkihunter.csproj" "b/Harjoitusty\303\266/Lokkihunter/Lokkihunter.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..fb98d03a9ae4d4aa96925e3188b491c8294da81d --- /dev/null +++ "b/Harjoitusty\303\266/Lokkihunter/Lokkihunter.csproj" @@ -0,0 +1,13 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>WinExe</OutputType> + <TargetFramework>net7.0</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Jypeli.NET" Version="11.*"/> + <PackageReference Include="Jypeli.FarseerPhysics.NET" Version="2.*"/> + </ItemGroup> + +</Project> diff --git "a/Harjoitusty\303\266/Lokkihunter/Ohjelma.cs" "b/Harjoitusty\303\266/Lokkihunter/Ohjelma.cs" new file mode 100644 index 0000000000000000000000000000000000000000..e03f727899b9f8ac2d2d6f44f123959cda6c4aa1 --- /dev/null +++ "b/Harjoitusty\303\266/Lokkihunter/Ohjelma.cs" @@ -0,0 +1,26 @@ +#region Using Statements + +using System; +using System.Collections.Generic; +using System.Linq; + +#endregion + +namespace Lokkihunter +{ + /// <summary> + /// The main class. + /// </summary> + public static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + using var game = new Lokkihunter(); + game.Run(); + } + } +} \ No newline at end of file diff --git a/suunnitelma/malli.png b/suunnitelma/malli.png index 1e5cb872d2c17ee94fb20ed42cdabc5a9f59ed27..a37e08fba2c9195c243531bac08bfc0e489b7e5e 100644 Binary files a/suunnitelma/malli.png and b/suunnitelma/malli.png differ