diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d2dad90e..d05b20d0 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,336 +12,359 @@ on: branches: - '3.8.*' schedule: - - cron: "0 3 * * 1" # Weekly (Mon) build to keep artifacts fresh + - cron: "0 3 * * 1" + +env: + DotnetVersion: 10.0.x + XCodeVersion: 26.6 jobs: build-windows: runs-on: windows-latest + timeout-minutes: 90 steps: - - uses: actions/checkout@v5 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 9.0.x - - # Windows builds for all projects - - name: Build Windows Binary for Tutorial/BasicCameraExample - run: dotnet publish Tutorials/BasicCameraExample/BasicCameraExample.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/BasicCameraExample-Windows - - - name: Archive Tutorial/BasicCameraExample - uses: actions/upload-artifact@v6 - with: - name: Windows-BasicCameraExample - path: artifacts/BasicCameraExample-Windows/** - - - name: Build Windows Binary for AutoPong - run: dotnet publish AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/AutoPong-Windows - - - name: Archive AutoPong - uses: actions/upload-artifact@v6 - with: - name: Windows-AutoPong - path: artifacts/AutoPong-Windows/** - - - name: Build Windows Binary for FuelCell - run: dotnet publish FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/FuelCell-Windows - - - name: Archive FuelCell - uses: actions/upload-artifact@v6 - with: - name: Windows-FuelCell - path: artifacts/FuelCell-Windows/** - - - name: Build Windows Binary for NeonShooter - run: dotnet publish NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/NeonShooter-Windows - - - name: Archive NeonShooter - uses: actions/upload-artifact@v6 - with: - name: Windows-NeonShooter - path: artifacts/NeonShooter-Windows/** - - - name: Build Windows Binary for Platformer2D - run: dotnet publish Platformer2D/Windows/Platformer2D.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/Platformer2D-Windows - - - name: Archive Platformer2D - uses: actions/upload-artifact@v6 - with: - name: Windows-Platformer2D - path: artifacts/Platformer2D-Windows/** - - - name: Build ShipGame Content Processor in Release mode - run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release - - - name: Build Windows Binary for ShipGame - run: dotnet publish ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/ShipGame-Windows - - - name: Archive ShipGame - uses: actions/upload-artifact@v6 - with: - name: Windows-ShipGame - path: artifacts/ShipGame-Windows/** - - - name: Build Windows Binary for DungeonSlime - run: dotnet publish Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/DungeonSlime.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/DungeonSlime-Windows - - - name: Archive DungeonSlime - uses: actions/upload-artifact@v6 - with: - name: Windows-DungeonSlime - path: artifacts/DungeonSlime-Windows/** + - name: Checkout Repo + uses: actions/checkout@v5 + with: + submodules: true + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + dotnet-version: ${{ env.DotnetVersion }} + + - name: Build Windows Binary for Tutorial/BasicCameraExample + run: dotnet publish Tutorials/BasicCameraExample/BasicCameraExample.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/BasicCameraExample-Windows + + - name: Archive Tutorial/BasicCameraExample + uses: actions/upload-artifact@v6 + with: + name: Windows-BasicCameraExample + path: artifacts/BasicCameraExample-Windows/** + + - name: Build Windows Binary for AutoPong + run: dotnet publish AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/AutoPong-Windows + + - name: Archive AutoPong + uses: actions/upload-artifact@v6 + with: + name: Windows-AutoPong + path: artifacts/AutoPong-Windows/** + + - name: Build Windows Binary for FuelCell + run: dotnet publish FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/FuelCell-Windows + + - name: Archive FuelCell + uses: actions/upload-artifact@v6 + with: + name: Windows-FuelCell + path: artifacts/FuelCell-Windows/** + + - name: Build Windows Binary for NeonShooter + run: dotnet publish NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/NeonShooter-Windows + + - name: Archive NeonShooter + uses: actions/upload-artifact@v6 + with: + name: Windows-NeonShooter + path: artifacts/NeonShooter-Windows/** + + - name: Build Windows Binary for Platformer2D + run: dotnet publish Platformer2D/Windows/Platformer2D.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/Platformer2D-Windows + + - name: Archive Platformer2D + uses: actions/upload-artifact@v6 + with: + name: Windows-Platformer2D + path: artifacts/Platformer2D-Windows/** + + - name: Build ShipGame Content Processor in Release mode + run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release + + - name: Build Windows Binary for ShipGame + run: dotnet publish ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/ShipGame-Windows + + - name: Archive ShipGame + uses: actions/upload-artifact@v6 + with: + name: Windows-ShipGame + path: artifacts/ShipGame-Windows/** + + - name: Build Windows Binary for DungeonSlime + run: dotnet publish Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/DungeonSlime.WindowsDX.csproj -c Release -r win-x64 --self-contained true -o ./artifacts/DungeonSlime-Windows + + - name: Archive DungeonSlime + uses: actions/upload-artifact@v6 + with: + name: Windows-DungeonSlime + path: artifacts/DungeonSlime-Windows/** build-desktop: runs-on: macos-latest + timeout-minutes: 120 env: MGFXC_WINE_PATH: /Users/runner/.winemonogame DYLD_LIBRARY_PATH: /usr/lib:/usr/local/lib:/opt/homebrew/lib:/usr/local/bin steps: - - uses: actions/checkout@v5 - - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 9.0.x - - - name: Setup for MonoGame - uses: infinitespace-studios/monogame-actions/install-wine@v1.0 - - - name: Install MonoPack - run: dotnet tool install --global MonoPack - - # Desktop builds for all projects - - # AutoPong Desktop build is currently disabled due to issues with packaging process - - name: Build and Package AutoPong - run: monopack -p AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj -o ./artifacts/AutoPong -rids win-x64,linux-x64,osx-x64,osx-arm64 -i AutoPong/AutoPong.DesktopGL/Info.plist -c AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive AutoPong Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-AutoPong-Windows - path: artifacts/AutoPong/*-win-x64.zip - - - name: Archive AutoPong Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-AutoPong-Linux - path: artifacts/AutoPong/*-linux-x64.tar.gz - - - name: Archive AutoPong macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-AutoPong-macOS - path: artifacts/AutoPong/*-universal.tar.gz - - - name: Build and Package FuelCell - run: monopack -p FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj -o ./artifacts/FuelCell -rids win-x64,linux-x64,osx-x64,osx-arm64 -i FuelCell/FuelCell.DesktopGL/Info.plist -c FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive FuelCell Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-FuelCell-Windows - path: artifacts/FuelCell/*-win-x64.zip - - - name: Archive FuelCell Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-FuelCell-Linux - path: artifacts/FuelCell/*-linux-x64.tar.gz - - - name: Archive FuelCell macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-FuelCell-macOS - path: artifacts/FuelCell/*-universal.tar.gz - - - name: Build and Package NeonShooter - run: monopack -p NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj -o ./artifacts/NeonShooter -rids win-x64,linux-x64,osx-x64,osx-arm64 -i NeonShooter/NeonShooter.DesktopGL/Info.plist -c NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive NeonShooter Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-NeonShooter-Windows - path: artifacts/NeonShooter/*-win-x64.zip - - - name: Archive NeonShooter Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-NeonShooter-Linux - path: artifacts/NeonShooter/*-linux-x64.tar.gz - - - name: Archive NeonShooter macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-NeonShooter-macOS - path: artifacts/NeonShooter/*-universal.tar.gz - - - name: Build and Package Platformer2D - run: monopack -p Platformer2D/Desktop/Platformer2D.csproj -o ./artifacts/Platformer2D -rids win-x64,linux-x64,osx-x64,osx-arm64 -i Platformer2D/Desktop/Info.plist -c Platformer2D/Desktop/Platformer2D.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive Platformer2D Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-Platformer2D-Windows - path: artifacts/Platformer2D/*-win-x64.zip - - - name: Archive Platformer2D Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-Platformer2D-Linux - path: artifacts/Platformer2D/*-linux-x64.tar.gz - - - name: Archive Platformer2D macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-Platformer2D-macOS - path: artifacts/Platformer2D/*-universal.tar.gz - - - name: Build and Package DungeonSlime - run: monopack -p Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.csproj -o ./artifacts/learn-monogame-2d -rids win-x64,linux-x64,osx-x64,osx-arm64 -i Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Info.plist -c Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive DungeonSlime Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-DungeonSlime-Windows - path: artifacts/learn-monogame-2d/*-win-x64.zip - - - name: Archive DungeonSlime Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-DungeonSlime-Linux - path: artifacts/learn-monogame-2d/*-linux-x64.tar.gz - - - name: Archive DungeonSlime macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-DungeonSlime-macOS - path: artifacts/learn-monogame-2d/*-universal.tar.gz - - - name: Build ShipGame Content Processor - run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release - - - name: Build and Package ShipGame - run: monopack -p ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj -o ./artifacts/ShipGame -rids win-x64,linux-x64,osx-x64,osx-arm64 -i ShipGame/ShipGame.DesktopGL/Info.plist -c ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" - - - name: Archive ShipGame Windows - uses: actions/upload-artifact@v6 - with: - name: Desktop-ShipGame-Windows - path: artifacts/ShipGame/*-win-x64.zip - - - name: Archive ShipGame Linux - uses: actions/upload-artifact@v6 - with: - name: Desktop-ShipGame-Linux - path: artifacts/ShipGame/*-linux-x64.tar.gz - - - name: Archive ShipGame macOS - uses: actions/upload-artifact@v6 - with: - name: Desktop-ShipGame-macOS - path: artifacts/ShipGame/*-universal.tar.gz + - name: Checkout Repo + uses: actions/checkout@v5 + with: + submodules: true + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + dotnet-version: ${{ env.DotnetVersion }} + + - name: Setup Wine + uses: monogame/monogame-actions/install-wine@v1.0.3 + + - name: Install Fonts + uses: monogame/monogame-actions/install-fonts@v1.0.3 + + - name: Pin xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '${{ env.XCodeVersion }}' + + - name: Install MonoPack + run: dotnet tool install --global MonoPack + + - name: Build and Package AutoPong + run: monopack -p AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj -o ./artifacts/AutoPong -rids win-x64,linux-x64,osx-x64,osx-arm64 -i AutoPong/AutoPong.DesktopGL/Info.plist -c AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive AutoPong Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-AutoPong-Windows + path: artifacts/AutoPong/*-win-x64.zip + + - name: Archive AutoPong Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-AutoPong-Linux + path: artifacts/AutoPong/*-linux-x64.tar.gz + + - name: Archive AutoPong macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-AutoPong-macOS + path: artifacts/AutoPong/*-universal.tar.gz + + - name: Build and Package FuelCell + run: monopack -p FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj -o ./artifacts/FuelCell -rids win-x64,linux-x64,osx-x64,osx-arm64 -i FuelCell/FuelCell.DesktopGL/Info.plist -c FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive FuelCell Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-FuelCell-Windows + path: artifacts/FuelCell/*-win-x64.zip + + - name: Archive FuelCell Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-FuelCell-Linux + path: artifacts/FuelCell/*-linux-x64.tar.gz + + - name: Archive FuelCell macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-FuelCell-macOS + path: artifacts/FuelCell/*-universal.tar.gz + + - name: Build and Package NeonShooter + run: monopack -p NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj -o ./artifacts/NeonShooter -rids win-x64,linux-x64,osx-x64,osx-arm64 -i NeonShooter/NeonShooter.DesktopGL/Info.plist -c NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive NeonShooter Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-NeonShooter-Windows + path: artifacts/NeonShooter/*-win-x64.zip + + - name: Archive NeonShooter Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-NeonShooter-Linux + path: artifacts/NeonShooter/*-linux-x64.tar.gz + + - name: Archive NeonShooter macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-NeonShooter-macOS + path: artifacts/NeonShooter/*-universal.tar.gz + + - name: Build and Package Platformer2D + run: monopack -p Platformer2D/Desktop/Platformer2D.csproj -o ./artifacts/Platformer2D -rids win-x64,linux-x64,osx-x64,osx-arm64 -i Platformer2D/Desktop/Info.plist -c Platformer2D/Desktop/Platformer2D.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive Platformer2D Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-Platformer2D-Windows + path: artifacts/Platformer2D/*-win-x64.zip + + - name: Archive Platformer2D Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-Platformer2D-Linux + path: artifacts/Platformer2D/*-linux-x64.tar.gz + + - name: Archive Platformer2D macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-Platformer2D-macOS + path: artifacts/Platformer2D/*-universal.tar.gz + + - name: Build and Package DungeonSlime + run: monopack -p Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.csproj -o ./artifacts/learn-monogame-2d -rids win-x64,linux-x64,osx-x64,osx-arm64 -i Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Info.plist -c Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive DungeonSlime Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-DungeonSlime-Windows + path: artifacts/learn-monogame-2d/*-win-x64.zip + + - name: Archive DungeonSlime Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-DungeonSlime-Linux + path: artifacts/learn-monogame-2d/*-linux-x64.tar.gz + + - name: Archive DungeonSlime macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-DungeonSlime-macOS + path: artifacts/learn-monogame-2d/*-universal.tar.gz + + - name: Build ShipGame Content Processor + run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release + + - name: Build and Package ShipGame + run: monopack -p ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj -o ./artifacts/ShipGame -rids win-x64,linux-x64,osx-x64,osx-arm64 -i ShipGame/ShipGame.DesktopGL/Info.plist -c ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.icns -v --macos-universal --publish-args "-p:PublishSingleFile=true" + + - name: Archive ShipGame Windows + uses: actions/upload-artifact@v6 + with: + name: Desktop-ShipGame-Windows + path: artifacts/ShipGame/*-win-x64.zip + + - name: Archive ShipGame Linux + uses: actions/upload-artifact@v6 + with: + name: Desktop-ShipGame-Linux + path: artifacts/ShipGame/*-linux-x64.tar.gz + + - name: Archive ShipGame macOS + uses: actions/upload-artifact@v6 + with: + name: Desktop-ShipGame-macOS + path: artifacts/ShipGame/*-universal.tar.gz build-android: runs-on: windows-latest + timeout-minutes: 90 steps: - - uses: actions/checkout@v5 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 9.0.x - - - name: Setup Java JDK - uses: actions/setup-java@v4 - with: - distribution: 'microsoft' - java-version: '17' - - - name: Install .NET Android workload - run: dotnet workload install android - - # Android builds for all projects - - name: Build Android Binary for AutoPong - run: dotnet build AutoPong/AutoPong.Android/AutoPong.Android.csproj -c Release - - - name: Archive AutoPong Android - uses: actions/upload-artifact@v6 - with: - name: Android-AutoPong - path: AutoPong/AutoPong.Android/bin/Release/net9.0-android/**/*-Signed.apk - - - name: Build Android Binary for FuelCell - run: dotnet build FuelCell/FuelCell.Android/FuelCell.Android.csproj -c Release - - - name: Archive FuelCell Android - uses: actions/upload-artifact@v6 - with: - name: Android-FuelCell - path: FuelCell/FuelCell.Android/bin/Release/net9.0-android/**/*-Signed.apk - - - name: Build Android Binary for NeonShooter - run: dotnet build NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj -c Release - - - name: Archive NeonShooter Android - uses: actions/upload-artifact@v6 - with: - name: Android-NeonShooter - path: NeonShooter/NeonShooter.Android/bin/Release/net9.0-android/**/*-Signed.apk - - - name: Build Android Binary for Platformer2D - run: dotnet build Platformer2D/Android/Platformer2D.csproj -c Release - - - name: Archive Platformer2D Android - uses: actions/upload-artifact@v6 - with: - name: Android-Platformer2D - path: Platformer2D/Android/bin/Release/net9.0-android/**/*-Signed.apk - - - name: Build Android Binary for DungeonSlime - run: dotnet build Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/DungeonSlime.csproj -c Release - - - name: Archive DungeonSlime Android - uses: actions/upload-artifact@v6 - with: - name: Android-DungeonSlime - path: Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/bin/Release/net9.0-android/**/*-Signed.apk - - - name: Build ShipGame Content Processor in Release mode - run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release - - - name: Build Android Binary for ShipGame - run: dotnet build ShipGame/ShipGame.Android/ShipGame.Android.csproj -c Release - - - name: Archive ShipGame Android - uses: actions/upload-artifact@v6 - with: - name: Android-ShipGame - path: ShipGame/ShipGame.Android/bin/Release/net9.0-android/**/*-Signed.apk + - name: Checkout Repo + uses: actions/checkout@v5 + with: + submodules: true + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v5 + with: + dotnet-version: ${{ env.DotnetVersion }} + + - name: Setup Java JDK + uses: actions/setup-java@v6 + with: + distribution: 'microsoft' + java-version: '17' + + - name: Install .NET Android workload + run: dotnet workload install android + + - name: Build Android Binary for AutoPong + run: dotnet build AutoPong/AutoPong.Android/AutoPong.Android.csproj -c Release + + - name: Archive AutoPong Android + uses: actions/upload-artifact@v6 + with: + name: Android-AutoPong + path: AutoPong/AutoPong.Android/bin/Release/net10.0-android/**/*-Signed.apk + + - name: Build Android Binary for FuelCell + run: dotnet build FuelCell/FuelCell.Android/FuelCell.Android.csproj -c Release + + - name: Archive FuelCell Android + uses: actions/upload-artifact@v6 + with: + name: Android-FuelCell + path: FuelCell/FuelCell.Android/bin/Release/net10.0-android/**/*-Signed.apk + + - name: Build Android Binary for NeonShooter + run: dotnet build NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj -c Release + + - name: Archive NeonShooter Android + uses: actions/upload-artifact@v6 + with: + name: Android-NeonShooter + path: NeonShooter/NeonShooter.Android/bin/Release/net10.0-android/**/*-Signed.apk + + - name: Build Android Binary for Platformer2D + run: dotnet build Platformer2D/Android/Platformer2D.csproj -c Release + + - name: Archive Platformer2D Android + uses: actions/upload-artifact@v6 + with: + name: Android-Platformer2D + path: Platformer2D/Android/bin/Release/net10.0-android/**/*-Signed.apk + + - name: Build Android Binary for DungeonSlime + run: dotnet build Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/DungeonSlime.csproj -c Release + + - name: Archive DungeonSlime Android + uses: actions/upload-artifact@v6 + with: + name: Android-DungeonSlime + path: Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/bin/Release/net10.0-android/**/*-Signed.apk + + - name: Build ShipGame Content Processor in Release mode + run: dotnet build ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj --configuration Release + + - name: Build Android Binary for ShipGame + run: dotnet build ShipGame/ShipGame.Android/ShipGame.Android.csproj -c Release + + - name: Archive ShipGame Android + uses: actions/upload-artifact@v6 + with: + name: Android-ShipGame + path: ShipGame/ShipGame.Android/bin/Release/net10.0-android/**/*-Signed.apk deploy: - name: Deploy - needs: [ build-windows, build-desktop, build-android ] - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' }} - permissions: - packages: write - contents: write - steps: - - name: Clone Repository - uses: actions/checkout@v4 - - name: Expose GitHub Runtime - uses: crazy-max/ghaction-github-runtime@v3 - - name: Make a Release - if: github.ref_type == 'tag' - uses: ncipollo/release-action@v1 - with: - name: 'MonoGame ${{ github.ref_name }}' - tag: ${{ github.ref_name }} - allowUpdates: true - removeArtifacts: true - artifacts: "*.zip" - token: ${{ secrets.GITHUB_TOKEN }} + name: Deploy + needs: [build-windows, build-desktop, build-android] + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} + permissions: + packages: write + contents: write + + steps: + - name: Clone Repository + uses: actions/checkout@v5 + + - name: Expose GitHub Runtime + uses: crazy-max/ghaction-github-runtime@v3 + + - name: Make a Release + uses: ncipollo/release-action@v1 + with: + name: 'MonoGame ${{ github.ref_name }}' + tag: ${{ github.ref_name }} + allowUpdates: true + removeArtifacts: true + artifacts: "*.zip" + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 73c47a9d..eaf0ad32 100644 --- a/.gitignore +++ b/.gitignore @@ -108,4 +108,7 @@ Backup*/ UpgradeLog*.XML .vs/ .user -.vscode/ \ No newline at end of file +.vscode/ + +# macOS +.DS_Store diff --git a/AutoPong/AutoPong.Android/AndroidManifest.xml b/AutoPong/AutoPong.Android/AndroidManifest.xml index e44da679..d496b8a9 100644 --- a/AutoPong/AutoPong.Android/AndroidManifest.xml +++ b/AutoPong/AutoPong.Android/AndroidManifest.xml @@ -1,6 +1,6 @@  - + diff --git a/AutoPong/AutoPong.Android/AutoPong.Android.csproj b/AutoPong/AutoPong.Android/AutoPong.Android.csproj index 50a73748..f693cbeb 100644 --- a/AutoPong/AutoPong.Android/AutoPong.Android.csproj +++ b/AutoPong/AutoPong.Android/AutoPong.Android.csproj @@ -11,6 +11,7 @@ - + + \ No newline at end of file diff --git a/AutoPong/AutoPong.Core/AutoPong.Core.csproj b/AutoPong/AutoPong.Core/AutoPong.Core.csproj index 13729961..feb9c260 100644 --- a/AutoPong/AutoPong.Core/AutoPong.Core.csproj +++ b/AutoPong/AutoPong.Core/AutoPong.Core.csproj @@ -3,7 +3,7 @@ net10.0 - + All diff --git a/AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj b/AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj index 82c58130..2c1b1e4e 100644 --- a/AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj +++ b/AutoPong/AutoPong.DesktopGL/AutoPong.DesktopGL.csproj @@ -22,6 +22,7 @@ - + + \ No newline at end of file diff --git a/AutoPong/AutoPong.DesktopVK/AutoPong.DesktopVK.csproj b/AutoPong/AutoPong.DesktopVK/AutoPong.DesktopVK.csproj index 04a8eabd..0cf5b9a3 100644 --- a/AutoPong/AutoPong.DesktopVK/AutoPong.DesktopVK.csproj +++ b/AutoPong/AutoPong.DesktopVK/AutoPong.DesktopVK.csproj @@ -22,7 +22,7 @@ - - + + \ No newline at end of file diff --git a/AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj b/AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj index d76b22f1..7eba2ee7 100644 --- a/AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj +++ b/AutoPong/AutoPong.WindowsDX/AutoPong.WindowsDX.csproj @@ -15,6 +15,7 @@ - + + \ No newline at end of file diff --git a/AutoPong/AutoPong.WindowsDX12/AutoPong.WindowsDX12.csproj b/AutoPong/AutoPong.WindowsDX12/AutoPong.WindowsDX12.csproj index 42cbb11b..57eac27e 100644 --- a/AutoPong/AutoPong.WindowsDX12/AutoPong.WindowsDX12.csproj +++ b/AutoPong/AutoPong.WindowsDX12/AutoPong.WindowsDX12.csproj @@ -15,7 +15,7 @@ - - + + \ No newline at end of file diff --git a/AutoPong/AutoPong.iOS/AutoPong.iOS.csproj b/AutoPong/AutoPong.iOS/AutoPong.iOS.csproj index 1c9259e5..8483a543 100644 --- a/AutoPong/AutoPong.iOS/AutoPong.iOS.csproj +++ b/AutoPong/AutoPong.iOS/AutoPong.iOS.csproj @@ -9,6 +9,7 @@ - + + \ No newline at end of file diff --git a/FuelCell/.config/dotnet-tools.json b/FuelCell/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/FuelCell/.config/dotnet-tools.json +++ b/FuelCell/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/FuelCell/FuelCell.Android/AndroidManifest.xml b/FuelCell/FuelCell.Android/AndroidManifest.xml index 2f325012..60f755ed 100644 --- a/FuelCell/FuelCell.Android/AndroidManifest.xml +++ b/FuelCell/FuelCell.Android/AndroidManifest.xml @@ -1,6 +1,6 @@  - + diff --git a/FuelCell/FuelCell.Android/FuelCell.Android.csproj b/FuelCell/FuelCell.Android/FuelCell.Android.csproj index cda4f816..3f5b3feb 100644 --- a/FuelCell/FuelCell.Android/FuelCell.Android.csproj +++ b/FuelCell/FuelCell.Android/FuelCell.Android.csproj @@ -1,6 +1,6 @@  - net9.0-android + net10.0-android 23 Exe com.companyname.FuelCell.Android @@ -18,8 +18,8 @@ - - + + diff --git a/FuelCell/FuelCell.Core/FuelCell.Core.csproj b/FuelCell/FuelCell.Core/FuelCell.Core.csproj index 5f478675..d53ffa6e 100644 --- a/FuelCell/FuelCell.Core/FuelCell.Core.csproj +++ b/FuelCell/FuelCell.Core/FuelCell.Core.csproj @@ -1,10 +1,10 @@ - net9.0 + net10.0 AnyCPU;x64 - + All diff --git a/FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj b/FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj index 7d387ccd..1ff5eb2e 100644 --- a/FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj +++ b/FuelCell/FuelCell.DesktopGL/FuelCell.DesktopGL.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 false false @@ -26,8 +26,8 @@ - - + + diff --git a/FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj b/FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj index 76bce567..e71747d2 100644 --- a/FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj +++ b/FuelCell/FuelCell.WindowsDX/FuelCell.WindowsDX.csproj @@ -1,7 +1,7 @@ WinExe - net9.0-windows + net10.0-windows Major false false @@ -18,8 +18,8 @@ - - + + diff --git a/FuelCell/FuelCell.iOS/FuelCell.iOS.csproj b/FuelCell/FuelCell.iOS/FuelCell.iOS.csproj index db454ba5..8f82a2f3 100644 --- a/FuelCell/FuelCell.iOS/FuelCell.iOS.csproj +++ b/FuelCell/FuelCell.iOS/FuelCell.iOS.csproj @@ -1,6 +1,6 @@  - net9.0-ios + net10.0-ios Exe 11.2 iPhone Developer @@ -12,8 +12,8 @@ - - + + diff --git a/NeonShooter/.config/dotnet-tools.json b/NeonShooter/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/NeonShooter/.config/dotnet-tools.json +++ b/NeonShooter/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/NeonShooter/NeonShooter.Android/AndroidManifest.xml b/NeonShooter/NeonShooter.Android/AndroidManifest.xml index 993e5da7..3fdf9c1b 100644 --- a/NeonShooter/NeonShooter.Android/AndroidManifest.xml +++ b/NeonShooter/NeonShooter.Android/AndroidManifest.xml @@ -1,6 +1,6 @@  - + diff --git a/NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj b/NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj index 2c26d11d..d4b66612 100644 --- a/NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj +++ b/NeonShooter/NeonShooter.Android/NeonShooter.Android.csproj @@ -1,6 +1,6 @@ - net9.0-android + net10.0-android 23 Exe com.companyname.NeonShooter.Android @@ -18,8 +18,8 @@ - - + + diff --git a/NeonShooter/NeonShooter.Core/NeonShooter.Core.csproj b/NeonShooter/NeonShooter.Core/NeonShooter.Core.csproj index 3676d8ab..24eb589b 100644 --- a/NeonShooter/NeonShooter.Core/NeonShooter.Core.csproj +++ b/NeonShooter/NeonShooter.Core/NeonShooter.Core.csproj @@ -1,6 +1,6 @@ - net9.0 + net10.0 @@ -14,7 +14,7 @@ - + All diff --git a/NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj b/NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj index 59ed96cd..f7c45d31 100644 --- a/NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj +++ b/NeonShooter/NeonShooter.DesktopGL/NeonShooter.DesktopGL.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 false false @@ -26,8 +26,8 @@ - - + + diff --git a/NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj b/NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj index e0bba74e..c431d2f3 100644 --- a/NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj +++ b/NeonShooter/NeonShooter.WindowsDX/NeonShooter.WindowsDX.csproj @@ -1,7 +1,7 @@ WinExe - net9.0-windows + net10.0-windows Major false false @@ -18,8 +18,8 @@ - - + + diff --git a/NeonShooter/NeonShooter.iOS/NeonShooter.iOS.csproj b/NeonShooter/NeonShooter.iOS/NeonShooter.iOS.csproj index 41036c30..cd83c489 100644 --- a/NeonShooter/NeonShooter.iOS/NeonShooter.iOS.csproj +++ b/NeonShooter/NeonShooter.iOS/NeonShooter.iOS.csproj @@ -1,6 +1,6 @@ - net9.0-ios + net10.0-ios Exe 11.2 iPhone Developer @@ -12,8 +12,8 @@ - - + + diff --git a/Platformer2D/.config/dotnet-tools.json b/Platformer2D/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Platformer2D/.config/dotnet-tools.json +++ b/Platformer2D/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Platformer2D/Android/AndroidManifest.xml b/Platformer2D/Android/AndroidManifest.xml index d7be7d84..111a2bf7 100644 --- a/Platformer2D/Android/AndroidManifest.xml +++ b/Platformer2D/Android/AndroidManifest.xml @@ -1,7 +1,7 @@  - + diff --git a/Platformer2D/Android/Platformer2D.csproj b/Platformer2D/Android/Platformer2D.csproj index 4026fa3c..6ec96f7d 100644 --- a/Platformer2D/Android/Platformer2D.csproj +++ b/Platformer2D/Android/Platformer2D.csproj @@ -1,7 +1,7 @@ Exe - net9.0-android + net10.0-android 21 com.companyname.Platformer2D 1 diff --git a/Platformer2D/Core/Core.csproj b/Platformer2D/Core/Core.csproj index acd35dee..47a6a23b 100644 --- a/Platformer2D/Core/Core.csproj +++ b/Platformer2D/Core/Core.csproj @@ -1,6 +1,6 @@  - net9.0 + net10.0 AnyCPU Platformer2D.Core diff --git a/Platformer2D/Desktop/Platformer2D.csproj b/Platformer2D/Desktop/Platformer2D.csproj index 75b70843..ddf15cdd 100644 --- a/Platformer2D/Desktop/Platformer2D.csproj +++ b/Platformer2D/Desktop/Platformer2D.csproj @@ -1,7 +1,7 @@ Exe - net9.0 + net10.0 false false app.manifest diff --git a/Platformer2D/Windows/Platformer2D.csproj b/Platformer2D/Windows/Platformer2D.csproj index cd4212b4..2943db61 100644 --- a/Platformer2D/Windows/Platformer2D.csproj +++ b/Platformer2D/Windows/Platformer2D.csproj @@ -1,7 +1,7 @@ WinExe - net9.0-windows + net10.0-windows Major false false diff --git a/Platformer2D/iOS/Platformer2D.csproj b/Platformer2D/iOS/Platformer2D.csproj index e832ea18..dc6377c6 100644 --- a/Platformer2D/iOS/Platformer2D.csproj +++ b/Platformer2D/iOS/Platformer2D.csproj @@ -1,7 +1,7 @@ Exe - net9.0-ios + net10.0-ios 12.2 iPhone Developer Platformer2D diff --git a/ShipGame/.config/dotnet-tools.json b/ShipGame/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/ShipGame/.config/dotnet-tools.json +++ b/ShipGame/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/ShipGame/README.md b/ShipGame/README.md index 2635e02d..f1f57d63 100644 --- a/ShipGame/README.md +++ b/ShipGame/README.md @@ -19,9 +19,7 @@ Ship Game is a 3D spaceship combat game set inside a complex tunnel system. Ship > This documentation assumes that you have a basic knowledge of programming concepts and the Visual C# environment. > [!IMPORTANT] -> In order to run the project, the `NormalMappingModelProcessor` needs to be built in `Release` mode at least once. The [dependency path](./ShipGame.Core/Content/ShipGame.mgcb#L13) to the processor dll in the `.mgcb` file is (for the moment) fixed. -> -> You can either build for `Release` or change the path to where a built version of the `NormalMappingModelProcessor` dll is located to run the project, else you will get "Processor" errors in the MGCB tool. +> The content pipeline references the `NormalMappingModelProcessor` assembly from its `Release` output path. The core project now forces this processor dependency to build with `Release` configuration so DesktopGL builds can find it automatically. ## Features @@ -73,9 +71,7 @@ Within each project, there are the following projects: * NormalMappingModelProcessor - A custom [content pipeline](https://monogame.net/articles/content_pipeline/why_content_pipeline.html) processor for the models in the Game. > [!IMPORTANT] -> In order to run the project, the `NormalMappingModelProcessor` needs to be built in `Release` mode at least once. The [dependency path](./ShipGame.Core/Content/ShipGame.mgcb#L13) to the processor dll in the `.mgcb` file is (for the moment) fixed. -> -> You can either build for `Release` or change the path to where a built version of the `NormalMappingModelProcessor` dll is located to run the project, else you will get "Processor" errors in the MGCB tool. +> The content pipeline references the `NormalMappingModelProcessor` assembly from its `Release` output path. The core project now forces this processor dependency to build with `Release` configuration so DesktopGL builds can find it automatically. The code is split up this way in order to share the same central game code for all platforms. Each platform initializes the `ShipGameGame` Game class in the core project to run the game. diff --git a/ShipGame/ShipGame.Android/AndroidManifest.xml b/ShipGame/ShipGame.Android/AndroidManifest.xml index b587bd0a..8e2ac247 100644 --- a/ShipGame/ShipGame.Android/AndroidManifest.xml +++ b/ShipGame/ShipGame.Android/AndroidManifest.xml @@ -1,6 +1,6 @@  - + - net9.0-android + net10.0-android Exe com.companyname.ShipGame 1 @@ -17,8 +17,8 @@ - - + + diff --git a/ShipGame/ShipGame.Core/Content/ShipGame.mgcb b/ShipGame/ShipGame.Core/Content/ShipGame.mgcb index f16dc949..83424468 100644 --- a/ShipGame/ShipGame.Core/Content/ShipGame.mgcb +++ b/ShipGame/ShipGame.Core/Content/ShipGame.mgcb @@ -248,7 +248,7 @@ /processorParam:PremultiplyTextureAlpha=True /processorParam:PremultiplyVertexColors=True /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -267,7 +267,7 @@ /processorParam:PremultiplyTextureAlpha=True /processorParam:PremultiplyVertexColors=True /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -305,7 +305,7 @@ /processorParam:PremultiplyTextureAlpha=True /processorParam:PremultiplyVertexColors=True /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -851,7 +851,7 @@ /processorParam:PremultiplyTextureAlpha=False /processorParam:PremultiplyVertexColors=False /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -870,7 +870,7 @@ /processorParam:PremultiplyTextureAlpha=False /processorParam:PremultiplyVertexColors=False /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -889,7 +889,7 @@ /processorParam:PremultiplyTextureAlpha=False /processorParam:PremultiplyVertexColors=False /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -908,7 +908,7 @@ /processorParam:PremultiplyTextureAlpha=False /processorParam:PremultiplyVertexColors=False /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 @@ -930,7 +930,7 @@ /processorParam:PremultiplyTextureAlpha=False /processorParam:PremultiplyVertexColors=False /processorParam:ResizeTexturesToPowerOfTwo=False -/processorParam:RotationX=0 +/processorParam:RotationX=-90 /processorParam:RotationY=0 /processorParam:RotationZ=0 /processorParam:Scale=1 diff --git a/ShipGame/ShipGame.Core/ShipGame.Core.csproj b/ShipGame/ShipGame.Core/ShipGame.Core.csproj index 4677aed9..23143083 100644 --- a/ShipGame/ShipGame.Core/ShipGame.Core.csproj +++ b/ShipGame/ShipGame.Core/ShipGame.Core.csproj @@ -1,15 +1,15 @@  - net9.0 + net10.0 AnyCPU;x64 - + All - + \ No newline at end of file diff --git a/ShipGame/ShipGame.Dependencies/BoxCollider/BoxCollider.csproj b/ShipGame/ShipGame.Dependencies/BoxCollider/BoxCollider.csproj index 9347e9f4..c7734023 100644 --- a/ShipGame/ShipGame.Dependencies/BoxCollider/BoxCollider.csproj +++ b/ShipGame/ShipGame.Dependencies/BoxCollider/BoxCollider.csproj @@ -1,9 +1,9 @@  - net9.0 + net10.0 - + All diff --git a/ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj b/ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj index 9cb04ab9..cb10352a 100644 --- a/ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj +++ b/ShipGame/ShipGame.Dependencies/NormalMappingModelProcessor/NormalMappingModelProcessor.csproj @@ -1,10 +1,11 @@  - net9.0 + net8.0 + true - - + + All diff --git a/ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj b/ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj index c8c2ae96..6c38da3e 100644 --- a/ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj +++ b/ShipGame/ShipGame.DesktopGL/ShipGame.DesktopGL.csproj @@ -1,7 +1,7 @@  WinExe - net9.0 + net10.0 Major false false @@ -20,8 +20,8 @@ - - + + diff --git a/ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj b/ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj index 8eae192d..9deee893 100644 --- a/ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj +++ b/ShipGame/ShipGame.WindowsDX/ShipGame.WindowsDX.csproj @@ -1,7 +1,7 @@  WinExe - net9.0-windows + net10.0-windows Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/ShipGame/ShipGame.iOS/ShipGame.iOS.csproj b/ShipGame/ShipGame.iOS/ShipGame.iOS.csproj index b45317c8..2987a3cc 100644 --- a/ShipGame/ShipGame.iOS/ShipGame.iOS.csproj +++ b/ShipGame/ShipGame.iOS/ShipGame.iOS.csproj @@ -1,6 +1,6 @@ - net9.0-ios + net10.0-ios Exe 12.2 iPhone Developer @@ -15,8 +15,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/02-Hot-Reload-System/.config/dotnet-tools.json b/Tutorials/2dShaders/src/02-Hot-Reload-System/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/02-Hot-Reload-System/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/02-Hot-Reload-System/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/02-Hot-Reload-System/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/02-Hot-Reload-System/DungeonSlime/DungeonSlime.csproj index 32d3418c..6a8a6989 100644 --- a/Tutorials/2dShaders/src/02-Hot-Reload-System/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/02-Hot-Reload-System/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/02-Hot-Reload-System/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/02-Hot-Reload-System/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/2dShaders/src/02-Hot-Reload-System/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/02-Hot-Reload-System/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/2dShaders/src/03-The-Material-Class/.config/dotnet-tools.json b/Tutorials/2dShaders/src/03-The-Material-Class/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/03-The-Material-Class/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/03-The-Material-Class/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/03-The-Material-Class/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/03-The-Material-Class/DungeonSlime/DungeonSlime.csproj index 32d3418c..6a8a6989 100644 --- a/Tutorials/2dShaders/src/03-The-Material-Class/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/03-The-Material-Class/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/03-The-Material-Class/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/03-The-Material-Class/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/2dShaders/src/03-The-Material-Class/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/03-The-Material-Class/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/2dShaders/src/04-Debug-UI/.config/dotnet-tools.json b/Tutorials/2dShaders/src/04-Debug-UI/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/04-Debug-UI/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/04-Debug-UI/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/04-Debug-UI/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/04-Debug-UI/DungeonSlime/DungeonSlime.csproj index 32d3418c..6a8a6989 100644 --- a/Tutorials/2dShaders/src/04-Debug-UI/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/04-Debug-UI/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/04-Debug-UI/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/04-Debug-UI/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/04-Debug-UI/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/04-Debug-UI/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/2dShaders/src/05-Transition-Effect/.config/dotnet-tools.json b/Tutorials/2dShaders/src/05-Transition-Effect/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/05-Transition-Effect/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/05-Transition-Effect/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/05-Transition-Effect/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/05-Transition-Effect/DungeonSlime/DungeonSlime.csproj index a9fb9ec2..a6df81f4 100644 --- a/Tutorials/2dShaders/src/05-Transition-Effect/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/05-Transition-Effect/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/05-Transition-Effect/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/05-Transition-Effect/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/05-Transition-Effect/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/05-Transition-Effect/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/2dShaders/src/06-Color-Swap-Effect/.config/dotnet-tools.json b/Tutorials/2dShaders/src/06-Color-Swap-Effect/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/06-Color-Swap-Effect/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/06-Color-Swap-Effect/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/06-Color-Swap-Effect/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/06-Color-Swap-Effect/DungeonSlime/DungeonSlime.csproj index 5117e9d2..54eea451 100644 --- a/Tutorials/2dShaders/src/06-Color-Swap-Effect/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/06-Color-Swap-Effect/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/06-Color-Swap-Effect/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/06-Color-Swap-Effect/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/06-Color-Swap-Effect/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/06-Color-Swap-Effect/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/.config/dotnet-tools.json b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/DungeonSlime/DungeonSlime.csproj index 0cdb54c4..ecf79e2a 100644 --- a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/07-Sprite-Vertex-Effect/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/2dShaders/src/08-Light-Effect/.config/dotnet-tools.json b/Tutorials/2dShaders/src/08-Light-Effect/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/08-Light-Effect/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/08-Light-Effect/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/08-Light-Effect/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/08-Light-Effect/DungeonSlime/DungeonSlime.csproj index 0cdb54c4..ecf79e2a 100644 --- a/Tutorials/2dShaders/src/08-Light-Effect/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/08-Light-Effect/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/08-Light-Effect/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/08-Light-Effect/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/08-Light-Effect/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/08-Light-Effect/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/2dShaders/src/09-Shadows-Effect/.config/dotnet-tools.json b/Tutorials/2dShaders/src/09-Shadows-Effect/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/2dShaders/src/09-Shadows-Effect/.config/dotnet-tools.json +++ b/Tutorials/2dShaders/src/09-Shadows-Effect/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/2dShaders/src/09-Shadows-Effect/DungeonSlime/DungeonSlime.csproj b/Tutorials/2dShaders/src/09-Shadows-Effect/DungeonSlime/DungeonSlime.csproj index 0cdb54c4..ecf79e2a 100644 --- a/Tutorials/2dShaders/src/09-Shadows-Effect/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/2dShaders/src/09-Shadows-Effect/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -27,8 +27,8 @@ - - + + diff --git a/Tutorials/2dShaders/src/09-Shadows-Effect/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/2dShaders/src/09-Shadows-Effect/MonoGameLibrary/MonoGameLibrary.csproj index 880c71cb..e713e807 100644 --- a/Tutorials/2dShaders/src/09-Shadows-Effect/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/2dShaders/src/09-Shadows-Effect/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,11 +1,11 @@ - net9.0 + net10.0 true - + All diff --git a/Tutorials/BasicCameraExample/.config/dotnet-tools.json b/Tutorials/BasicCameraExample/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/BasicCameraExample/.config/dotnet-tools.json +++ b/Tutorials/BasicCameraExample/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/BasicCameraExample/BasicCameraExample.csproj b/Tutorials/BasicCameraExample/BasicCameraExample.csproj index a2504859..154f8ed6 100644 --- a/Tutorials/BasicCameraExample/BasicCameraExample.csproj +++ b/Tutorials/BasicCameraExample/BasicCameraExample.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/DungeonSlime.csproj index a2504859..154f8ed6 100644 --- a/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/02-Getting-Started/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/DungeonSlime.csproj index a2504859..154f8ed6 100644 --- a/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/03-The-Game1-File/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/04-Creating-A-Class-Library/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/05-Content-Pipeline/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/06-Working-With-Textures/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/07-Optimize-Texture-Rendering/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/08-The-Sprite-Class/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/09-The-AnimatedSprite-Class/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/10-Handling-Input/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/10-Handling-Input/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/10-Handling-Input/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/10-Handling-Input/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/10-Handling-Input/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/11-Input-Management/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/13-Tilemap/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/17-Scenes/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/17-Scenes/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/17-Scenes/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/17-Scenes/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/18-Texture-Wrapping/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/DungeonSlime.csproj index 640ceed6..c0ad926b 100644 --- a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,8 +23,8 @@ - - + + diff --git a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/19-User-Interface-Fundamentals/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/GameScene.cs index e5231b3e..84e836e8 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/GameScene.cs @@ -7,7 +7,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Input; @@ -151,12 +151,12 @@ private void CreatePausePanel() _pausePanel.IsVisible = false; _pausePanel.AddToRoot(); - var background = new ColoredRectangleRuntime(); + var background = new Gum.GueDeriving.ColoredRectangleRuntime(); background.Dock(Dock.Fill); background.Color = Color.DarkBlue; _pausePanel.AddChild(background); - var textInstance = new TextRuntime(); + var textInstance = new Gum.GueDeriving.TextRuntime(); textInstance.Text = "PAUSED"; textInstance.X = 10f; textInstance.Y = 10f; @@ -202,7 +202,7 @@ private void HandleQuitButtonClicked(object sender, EventArgs e) private void InitializeUI() { - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreatePausePanel(); } @@ -210,7 +210,7 @@ private void InitializeUI() public override void Update(GameTime gameTime) { // Ensure the UI is always updated - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); // If the game is paused, do not continue if (_pausePanel.IsVisible) @@ -510,6 +510,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); // Draw the Gum UI - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/TitleScene.cs index 0d788ad4..849f0f10 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/DungeonSlime/Scenes/TitleScene.cs @@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Scenes; @@ -169,7 +169,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - var optionsText = new TextRuntime(); + var optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -266,7 +266,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -285,7 +285,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -323,6 +323,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/20-Implementing-UI-With-Gum/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/GameScene.cs index 5f843aa6..9a810866 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/GameScene.cs @@ -9,7 +9,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Input; @@ -159,7 +159,7 @@ private void CreatePausePanel() TextureRegion backgroundRegion = _atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -169,7 +169,7 @@ private void CreatePausePanel() background.TextureWidth = backgroundRegion.Width; _pausePanel.AddChild(background); - TextRuntime textInstance = new TextRuntime(); + Gum.GueDeriving.TextRuntime textInstance = new Gum.GueDeriving.TextRuntime(); textInstance.Text = "PAUSED"; textInstance.CustomFontFile = @"fonts/04b_30.fnt"; textInstance.UseCustomFont = true; @@ -216,7 +216,7 @@ private void HandleQuitButtonClicked(object sender, EventArgs e) private void InitializeUI() { - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreatePausePanel(); } @@ -224,7 +224,7 @@ private void InitializeUI() public override void Update(GameTime gameTime) { // Ensure the UI is always updated - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); // If the game is paused, do not continue if (_pausePanel.IsVisible) @@ -524,6 +524,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); // Draw the Gum UI - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/TitleScene.cs index b895d425..057ac45f 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/AnimatedButton.cs index 5d241220..13a4a485 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set down below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/OptionsSlider.cs index 2900d983..a74cb164 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Forms.Controls; using Gum.Managers; using Microsoft.Xna.Framework; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/21-Customizing-Gum-UI/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/GameScene.cs index b103a37f..72f8f9e6 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/GameScene.cs @@ -9,7 +9,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Input; @@ -159,7 +159,7 @@ private void CreatePausePanel() TextureRegion backgroundRegion = _atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -169,7 +169,7 @@ private void CreatePausePanel() background.TextureWidth = backgroundRegion.Width; _pausePanel.AddChild(background); - TextRuntime textInstance = new TextRuntime(); + Gum.GueDeriving.TextRuntime textInstance = new Gum.GueDeriving.TextRuntime(); textInstance.Text = "PAUSED"; textInstance.CustomFontFile = @"fonts/04b_30.fnt"; textInstance.UseCustomFont = true; @@ -216,7 +216,7 @@ private void HandleQuitButtonClicked(object sender, EventArgs e) private void InitializeUI() { - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreatePausePanel(); } @@ -224,7 +224,7 @@ private void InitializeUI() public override void Update(GameTime gameTime) { // Ensure the UI is always updated - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); // If the game is paused, do not continue if (_pausePanel.IsVisible) @@ -523,6 +523,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); // Draw the Gum UI - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/TitleScene.cs index b895d425..057ac45f 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/AnimatedButton.cs index 5d241220..13a4a485 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set down below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/OptionsSlider.cs index 2900d983..a74cb164 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Forms.Controls; using Gum.Managers; using Microsoft.Xna.Framework; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/22-Snake-Game-Mechanics/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/GameScene.cs index 750d523f..d5bfcf16 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/GameScene.cs @@ -64,7 +64,7 @@ public override void Initialize() // Create any UI elements from the root element created in previous // scenes - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Initialize the user interface for the game scene. InitializeUI(); @@ -77,7 +77,7 @@ private void InitializeUI() { // Clear out any previous UI element incase we came here // from a different scene. - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Create the game scene ui instance. _ui = new GameSceneUI(); diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/TitleScene.cs index b895d425..057ac45f 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/AnimatedButton.cs index 5d241220..13a4a485 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set down below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/GameSceneUI.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/GameSceneUI.cs index 83424927..67e413f6 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/GameSceneUI.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/GameSceneUI.cs @@ -6,13 +6,13 @@ using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; -public class GameSceneUI : ContainerRuntime +public class GameSceneUI : Gum.GueDeriving.ContainerRuntime { // The string format to use when updating the text for the score display. private static readonly string s_scoreFormat = "SCORE: {0:D6}"; @@ -35,7 +35,7 @@ public class GameSceneUI : ContainerRuntime private AnimatedButton _retryButton; // The text runtime used to display the players score on the game screen. - private TextRuntime _scoreText; + private Gum.GueDeriving.TextRuntime _scoreText; /// /// Event invoked when the Resume button on the Pause panel is clicked. @@ -55,7 +55,7 @@ public class GameSceneUI : ContainerRuntime public GameSceneUI() { - // The game scene UI inherits from ContainerRuntime, so we set its + // The game scene UI inherits from Gum.GueDeriving.ContainerRuntime, so we set its // doc to fill so it fills the entire screen. Dock(Gum.Wireframe.Dock.Fill); @@ -63,8 +63,8 @@ public GameSceneUI() this.AddToRoot(); // Get a reference to the content manager that was registered with the - // GumService when it was original initialized. - ContentManager content = GumService.Default.ContentLoader.XnaContentManager; + // Gum.GumService when it was original initialized. + ContentManager content = Gum.GumService.Default.ContentLoader.XnaContentManager; // Use that content manager to load the sound effect and atlas for the // user interface elements @@ -87,9 +87,9 @@ public GameSceneUI() AddChild(_gameOverPanel.Visual); } - private TextRuntime CreateScoreText() + private Gum.GueDeriving.TextRuntime CreateScoreText() { - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Anchor(Gum.Wireframe.Anchor.TopLeft); text.WidthUnits = DimensionUnitType.RelativeToChildren; text.X = 20.0f; @@ -114,7 +114,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -124,7 +124,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "PAUSED"; text.UseCustomFont = true; text.CustomFontFile = "fonts/04b_30.fnt"; @@ -170,7 +170,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -180,7 +180,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "GAME OVER"; text.WidthUnits = DimensionUnitType.RelativeToChildren; text.UseCustomFont = true; @@ -327,7 +327,7 @@ public void HideGameOverPanel() /// A snapshot of the timing values for the current update cycle. public void Update(GameTime gameTime) { - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } /// @@ -335,6 +335,6 @@ public void Update(GameTime gameTime) /// public void Draw() { - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/OptionsSlider.cs index 2900d983..a74cb164 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Forms.Controls; using Gum.Managers; using Microsoft.Xna.Framework; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/23-Completing-The-Game/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/GameScene.cs index d01a3b03..3caaf983 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/GameScene.cs @@ -73,7 +73,7 @@ public override void Initialize() // Create any UI elements from the root element created in previous // scenes - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Initialize the user interface for the game scene. InitializeUI(); @@ -86,7 +86,7 @@ private void InitializeUI() { // Clear out any previous UI element incase we came here // from a different scene. - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Create the game scene ui instance. _ui = new GameSceneUI(); diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/TitleScene.cs index b895d425..057ac45f 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/AnimatedButton.cs index a98baf1a..026b1bef 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set by AnimationChains below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/GameSceneUI.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/GameSceneUI.cs index 83424927..67e413f6 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/GameSceneUI.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/GameSceneUI.cs @@ -6,13 +6,13 @@ using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using MonoGameGum; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; -public class GameSceneUI : ContainerRuntime +public class GameSceneUI : Gum.GueDeriving.ContainerRuntime { // The string format to use when updating the text for the score display. private static readonly string s_scoreFormat = "SCORE: {0:D6}"; @@ -35,7 +35,7 @@ public class GameSceneUI : ContainerRuntime private AnimatedButton _retryButton; // The text runtime used to display the players score on the game screen. - private TextRuntime _scoreText; + private Gum.GueDeriving.TextRuntime _scoreText; /// /// Event invoked when the Resume button on the Pause panel is clicked. @@ -55,7 +55,7 @@ public class GameSceneUI : ContainerRuntime public GameSceneUI() { - // The game scene UI inherits from ContainerRuntime, so we set its + // The game scene UI inherits from Gum.GueDeriving.ContainerRuntime, so we set its // doc to fill so it fills the entire screen. Dock(Gum.Wireframe.Dock.Fill); @@ -63,8 +63,8 @@ public GameSceneUI() this.AddToRoot(); // Get a reference to the content manager that was registered with the - // GumService when it was original initialized. - ContentManager content = GumService.Default.ContentLoader.XnaContentManager; + // Gum.GumService when it was original initialized. + ContentManager content = Gum.GumService.Default.ContentLoader.XnaContentManager; // Use that content manager to load the sound effect and atlas for the // user interface elements @@ -87,9 +87,9 @@ public GameSceneUI() AddChild(_gameOverPanel.Visual); } - private TextRuntime CreateScoreText() + private Gum.GueDeriving.TextRuntime CreateScoreText() { - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Anchor(Gum.Wireframe.Anchor.TopLeft); text.WidthUnits = DimensionUnitType.RelativeToChildren; text.X = 20.0f; @@ -114,7 +114,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -124,7 +124,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "PAUSED"; text.UseCustomFont = true; text.CustomFontFile = "fonts/04b_30.fnt"; @@ -170,7 +170,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -180,7 +180,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "GAME OVER"; text.WidthUnits = DimensionUnitType.RelativeToChildren; text.UseCustomFont = true; @@ -327,7 +327,7 @@ public void HideGameOverPanel() /// A snapshot of the timing values for the current update cycle. public void Update(GameTime gameTime) { - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } /// @@ -335,6 +335,6 @@ public void Update(GameTime gameTime) /// public void Draw() { - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/OptionsSlider.cs index 2900d983..a74cb164 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Forms.Controls; using Gum.Managers; using Microsoft.Xna.Framework; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/24-Shaders/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/24-Shaders/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/24-Shaders/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/24-Shaders/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/GameScene.cs index d01a3b03..3caaf983 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/GameScene.cs @@ -73,7 +73,7 @@ public override void Initialize() // Create any UI elements from the root element created in previous // scenes - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Initialize the user interface for the game scene. InitializeUI(); @@ -86,7 +86,7 @@ private void InitializeUI() { // Clear out any previous UI element incase we came here // from a different scene. - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Create the game scene ui instance. _ui = new GameSceneUI(); diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/TitleScene.cs index 4bf0b892..62d14d59 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Input; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/AnimatedButton.cs index a98baf1a..026b1bef 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set by AnimationChains below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/GameSceneUI.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/GameSceneUI.cs index fa164030..0a210647 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/GameSceneUI.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/GameSceneUI.cs @@ -6,13 +6,13 @@ using Microsoft.Xna.Framework.Content; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; -public class GameSceneUI : ContainerRuntime +public class GameSceneUI : Gum.GueDeriving.ContainerRuntime { // The string format to use when updating the text for the score display. private static readonly string s_scoreFormat = "SCORE: {0:D6}"; @@ -35,7 +35,7 @@ public class GameSceneUI : ContainerRuntime private AnimatedButton _retryButton; // The text runtime used to display the players score on the game screen. - private TextRuntime _scoreText; + private Gum.GueDeriving.TextRuntime _scoreText; /// /// Event invoked when the Resume button on the Pause panel is clicked. @@ -55,7 +55,7 @@ public class GameSceneUI : ContainerRuntime public GameSceneUI() { - // The game scene UI inherits from ContainerRuntime, so we set its + // The game scene UI inherits from Gum.GueDeriving.ContainerRuntime, so we set its // doc to fill so it fills the entire screen. Dock(Gum.Wireframe.Dock.Fill); @@ -63,8 +63,8 @@ public GameSceneUI() this.AddToRoot(); // Get a reference to the content manager that was registered with the - // GumService when it was original initialized. - ContentManager content = GumService.Default.ContentLoader.XnaContentManager; + // Gum.GumService when it was original initialized. + ContentManager content = Gum.GumService.Default.ContentLoader.XnaContentManager; // Use that content manager to load the sound effect and atlas for the // user interface elements @@ -87,9 +87,9 @@ public GameSceneUI() AddChild(_gameOverPanel.Visual); } - private TextRuntime CreateScoreText() + private Gum.GueDeriving.TextRuntime CreateScoreText() { - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Anchor(Gum.Wireframe.Anchor.TopLeft); text.WidthUnits = DimensionUnitType.RelativeToChildren; text.X = 20.0f; @@ -114,7 +114,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -124,7 +124,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "PAUSED"; text.UseCustomFont = true; text.CustomFontFile = "fonts/04b_30.fnt"; @@ -170,7 +170,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -180,7 +180,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "GAME OVER"; text.WidthUnits = DimensionUnitType.RelativeToChildren; text.UseCustomFont = true; @@ -327,7 +327,7 @@ public void HideGameOverPanel() /// A snapshot of the timing values for the current update cycle. public void Update(GameTime gameTime) { - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } /// @@ -335,6 +335,6 @@ public void Update(GameTime gameTime) /// public void Draw() { - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/OptionsSlider.cs index f859e806..adf12ec1 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Managers; using Microsoft.Xna.Framework; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/25-Packaging-Game/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/25-Packaging-Game/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/DungeonSlime.csproj index daa72e19..fb7a95fd 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,9 +23,9 @@ - - - + + + diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Game1.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Game1.cs index f886fc4a..552a1790 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Game1.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Game1.cs @@ -34,17 +34,17 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. @@ -59,9 +59,9 @@ private void InitializeGum() // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/GameScene.cs index d01a3b03..3caaf983 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/GameScene.cs @@ -73,7 +73,7 @@ public override void Initialize() // Create any UI elements from the root element created in previous // scenes - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Initialize the user interface for the game scene. InitializeUI(); @@ -86,7 +86,7 @@ private void InitializeUI() { // Clear out any previous UI element incase we came here // from a different scene. - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Create the game scene ui instance. _ui = new GameSceneUI(); diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/TitleScene.cs index 4bf0b892..62d14d59 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/Scenes/TitleScene.cs @@ -6,7 +6,7 @@ using Microsoft.Xna.Framework.Input; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -179,7 +179,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,7 +283,7 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); CreateTitlePanel(); CreateOptionsPanel(); @@ -302,7 +302,7 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -340,6 +340,6 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/AnimatedButton.cs index a98baf1a..026b1bef 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set by AnimationChains below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/GameSceneUI.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/GameSceneUI.cs index fa164030..0a210647 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/GameSceneUI.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/GameSceneUI.cs @@ -6,13 +6,13 @@ using Microsoft.Xna.Framework.Content; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; -public class GameSceneUI : ContainerRuntime +public class GameSceneUI : Gum.GueDeriving.ContainerRuntime { // The string format to use when updating the text for the score display. private static readonly string s_scoreFormat = "SCORE: {0:D6}"; @@ -35,7 +35,7 @@ public class GameSceneUI : ContainerRuntime private AnimatedButton _retryButton; // The text runtime used to display the players score on the game screen. - private TextRuntime _scoreText; + private Gum.GueDeriving.TextRuntime _scoreText; /// /// Event invoked when the Resume button on the Pause panel is clicked. @@ -55,7 +55,7 @@ public class GameSceneUI : ContainerRuntime public GameSceneUI() { - // The game scene UI inherits from ContainerRuntime, so we set its + // The game scene UI inherits from Gum.GueDeriving.ContainerRuntime, so we set its // doc to fill so it fills the entire screen. Dock(Gum.Wireframe.Dock.Fill); @@ -63,8 +63,8 @@ public GameSceneUI() this.AddToRoot(); // Get a reference to the content manager that was registered with the - // GumService when it was original initialized. - ContentManager content = GumService.Default.ContentLoader.XnaContentManager; + // Gum.GumService when it was original initialized. + ContentManager content = Gum.GumService.Default.ContentLoader.XnaContentManager; // Use that content manager to load the sound effect and atlas for the // user interface elements @@ -87,9 +87,9 @@ public GameSceneUI() AddChild(_gameOverPanel.Visual); } - private TextRuntime CreateScoreText() + private Gum.GueDeriving.TextRuntime CreateScoreText() { - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Anchor(Gum.Wireframe.Anchor.TopLeft); text.WidthUnits = DimensionUnitType.RelativeToChildren; text.X = 20.0f; @@ -114,7 +114,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -124,7 +124,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "PAUSED"; text.UseCustomFont = true; text.CustomFontFile = "fonts/04b_30.fnt"; @@ -170,7 +170,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -180,7 +180,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "GAME OVER"; text.WidthUnits = DimensionUnitType.RelativeToChildren; text.UseCustomFont = true; @@ -327,7 +327,7 @@ public void HideGameOverPanel() /// A snapshot of the timing values for the current update cycle. public void Update(GameTime gameTime) { - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } /// @@ -335,6 +335,6 @@ public void Update(GameTime gameTime) /// public void Draw() { - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/OptionsSlider.cs index f859e806..adf12ec1 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Managers; using Microsoft.Xna.Framework; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/26-Publish-To-Itch/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/.config/dotnet-tools.json b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/.config/dotnet-tools.json index ffcc32a3..ee6ba8c3 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/.config/dotnet-tools.json +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/.config/dotnet-tools.json @@ -3,31 +3,31 @@ "isRoot": true, "tools": { "dotnet-mgcb": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb" ] }, "dotnet-mgcb-editor": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor" ] }, "dotnet-mgcb-editor-linux": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-linux" ] }, "dotnet-mgcb-editor-windows": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-windows" ] }, "dotnet-mgcb-editor-mac": { - "version": "3.8.5", + "version": "3.8.5.1", "commands": [ "mgcb-editor-mac" ] diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlime.csproj index daa72e19..2b3bed78 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlime.csproj +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlime.csproj @@ -1,7 +1,7 @@ WinExe - net9.0 + net10.0 Major false false @@ -23,12 +23,31 @@ - - - + + + - + + + + + + + + + + + + + + + + + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlimeGame.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlimeGame.cs index 03fd1d1a..1658d804 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlimeGame.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/DungeonSlimeGame.cs @@ -34,34 +34,34 @@ protected override void Initialize() private void InitializeGum() { // Initialize the Gum service - GumService.Default.Initialize(this, DefaultVisualsVersion.V3); + Gum.GumService.Default.Initialize(this, DefaultVisualsVersion.V3); // Tell the Gum service which content manager to use. We will tell it to // use the global content manager from our Core. - GumService.Default.ContentLoader.XnaContentManager = Core.Content; + Gum.GumService.Default.ContentLoader.XnaContentManager = Core.Content; // Register keyboard input for UI control. - FrameworkElement.KeyboardsForUiControl.Add(GumService.Default.Keyboard); + FrameworkElement.KeyboardsForUiControl.Add(Gum.GumService.Default.Keyboard); // Register gamepad input for Ui control. - FrameworkElement.GamePadsForUiControl.AddRange(GumService.Default.Gamepads); + FrameworkElement.GamePadsForUiControl.AddRange(Gum.GumService.Default.Gamepads); // Customize the tab reverse UI navigation to also trigger when the keyboard // Up arrow key is pushed. FrameworkElement.TabReverseKeyCombos.Add( - new KeyCombo() { PushedKey = Microsoft.Xna.Framework.Input.Keys.Up }); + new KeyCombo() { PushedKey = Gum.Forms.Input.Keys.Up }); // Customize the tab UI navigation to also trigger when the keyboard // Down arrow key is pushed. FrameworkElement.TabKeyCombos.Add( - new KeyCombo() { PushedKey = Microsoft.Xna.Framework.Input.Keys.Down }); + new KeyCombo() { PushedKey = Gum.Forms.Input.Keys.Down }); // The assets created for the UI were done so at 1/4th the size to keep the size of the // texture atlas small. So we will set the default canvas size to be 1/4th the size of // the game's resolution then tell gum to zoom in by a factor of 4. - GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; - GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; - GumService.Default.Renderer.Camera.Zoom = 4.0f; + Gum.GumService.Default.CanvasWidth = GraphicsDevice.PresentationParameters.BackBufferWidth / 4.0f; + Gum.GumService.Default.CanvasHeight = GraphicsDevice.PresentationParameters.BackBufferHeight / 4.0f; + Gum.GumService.Default.Renderer.Camera.Zoom = 4.0f; } protected override void LoadContent() diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/GameController.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/GameController.cs index 92165382..0062c05c 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/GameController.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/GameController.cs @@ -1,3 +1,4 @@ +using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; using MonoGameLibrary; @@ -13,6 +14,8 @@ public static class GameController { private static KeyboardInfo s_keyboard => Core.Input.Keyboard; private static GamePadInfo s_gamePad => Core.Input.GamePads[(int)PlayerIndex.One]; + private static TouchInfo s_touch => Core.Input.Touch; + private const float TOUCH_MOVEMENT_THRESHOLD = 20.0f; /// /// Returns true if the player has triggered the "move up" action. @@ -22,7 +25,8 @@ public static bool MoveUp() return s_keyboard.WasKeyJustPressed(Keys.Up) || s_keyboard.WasKeyJustPressed(Keys.W) || s_gamePad.WasButtonJustPressed(Buttons.DPadUp) || - s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickUp); + s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickUp) || + IsTouchSwipeUp(); } /// @@ -33,7 +37,8 @@ public static bool MoveDown() return s_keyboard.WasKeyJustPressed(Keys.Down) || s_keyboard.WasKeyJustPressed(Keys.S) || s_gamePad.WasButtonJustPressed(Buttons.DPadDown) || - s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickDown); + s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickDown) || + IsTouchSwipeDown(); } /// @@ -44,7 +49,8 @@ public static bool MoveLeft() return s_keyboard.WasKeyJustPressed(Keys.Left) || s_keyboard.WasKeyJustPressed(Keys.A) || s_gamePad.WasButtonJustPressed(Buttons.DPadLeft) || - s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickLeft); + s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickLeft) || + IsTouchSwipeLeft(); } /// @@ -55,7 +61,8 @@ public static bool MoveRight() return s_keyboard.WasKeyJustPressed(Keys.Right) || s_keyboard.WasKeyJustPressed(Keys.D) || s_gamePad.WasButtonJustPressed(Buttons.DPadRight) || - s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickRight); + s_gamePad.WasButtonJustPressed(Buttons.LeftThumbstickRight) || + IsTouchSwipeRight(); } /// @@ -74,6 +81,51 @@ public static bool Pause() public static bool Action() { return s_keyboard.WasKeyJustPressed(Keys.Enter) || - s_gamePad.WasButtonJustPressed(Buttons.A); + s_gamePad.WasButtonJustPressed(Buttons.A) || + s_touch.WasTouchJustPressed(); + } + + private static bool IsTouchSwipeUp() + { + if (!s_touch.HasTouches) + { + return false; + } + + var delta = s_touch.GetPrimaryTouchDelta(); + return delta.Y < -TOUCH_MOVEMENT_THRESHOLD && Math.Abs(delta.X) < Math.Abs(delta.Y); + } + + private static bool IsTouchSwipeDown() + { + if (!s_touch.HasTouches) + { + return false; + } + + var delta = s_touch.GetPrimaryTouchDelta(); + return delta.Y > TOUCH_MOVEMENT_THRESHOLD && Math.Abs(delta.X) < Math.Abs(delta.Y); + } + + private static bool IsTouchSwipeLeft() + { + if (!s_touch.HasTouches) + { + return false; + } + + var delta = s_touch.GetPrimaryTouchDelta(); + return delta.X < -TOUCH_MOVEMENT_THRESHOLD && Math.Abs(delta.Y) < Math.Abs(delta.X); + } + + private static bool IsTouchSwipeRight() + { + if (!s_touch.HasTouches) + { + return false; + } + + var delta = s_touch.GetPrimaryTouchDelta(); + return delta.X > TOUCH_MOVEMENT_THRESHOLD && Math.Abs(delta.Y) < Math.Abs(delta.X); } } diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/AndroidManifest.xml b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/AndroidManifest.xml new file mode 100644 index 00000000..276f2c98 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/DungeonSlime.csproj new file mode 100644 index 00000000..f56a21e8 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/DungeonSlime.csproj @@ -0,0 +1,52 @@ + + + + net10.0-android + Exe + DungeonSlime.Android + DungeonSlime + True + 28.0 + com.monogame.dungeonslime + 1 + 1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/MainActivity.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/MainActivity.cs new file mode 100644 index 00000000..4cee0a32 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/MainActivity.cs @@ -0,0 +1,37 @@ +using Android.App; +using Android.Content.PM; +using Android.OS; +using Android.Views; +using DungeonSlime; +using Microsoft.Xna.Framework; + +namespace DungeonSlime.Android +{ + [Activity( + Label = "@string/app_name", + MainLauncher = true, + Icon = "@drawable/icon", + Theme = "@style/Theme.Splash", + AlwaysRetainTaskState = true, + LaunchMode = LaunchMode.SingleInstance, + ScreenOrientation = ScreenOrientation.SensorLandscape, + ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden + )] + public class MainActivity : AndroidGameActivity + { + private DungeonSlimeGame _game; + private View _view; + + protected override void OnCreate(Bundle bundle) + { + base.OnCreate(bundle); + + _game = new DungeonSlimeGame(); + + _view = _game.Services.GetService(typeof(View)) as View; + SetContentView(_view); + + _game.Run(); + } + } +} diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/drawable/icon.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/drawable/icon.png new file mode 100644 index 00000000..7c8b3ff0 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/drawable/icon.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-hdpi/ic_launcher.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..676a232b Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-hdpi/ic_launcher.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-mdpi/ic_launcher.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..3fa72115 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-mdpi/ic_launcher.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xhdpi/ic_launcher.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..5ee18bc5 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xhdpi/ic_launcher.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxhdpi/ic_launcher.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..77d8b702 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxxhdpi/ic_launcher.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..6a27b7bd Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Colors.xml b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Colors.xml new file mode 100644 index 00000000..176bba3a --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Colors.xml @@ -0,0 +1,5 @@ + + + #1a1a2e + #0f0f1e + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Strings.xml b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Strings.xml new file mode 100644 index 00000000..86fd46c3 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Strings.xml @@ -0,0 +1,4 @@ + + + Dungeon Slime + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Styles.xml b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Styles.xml new file mode 100644 index 00000000..d79d24a0 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Android/Resources/values/Styles.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.csproj new file mode 100644 index 00000000..e9d43dbe --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.csproj @@ -0,0 +1,49 @@ + + + WinExe + net10.0 + Major + false + false + + + app.manifest + Icon.ico + + + + + + + + Icon.ico + + + Icon.bmp + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.icns b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.icns new file mode 100644 index 00000000..d5a61910 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/DungeonSlime.icns differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.bmp b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.bmp new file mode 100644 index 00000000..2b481653 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.bmp differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.ico b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.ico new file mode 100644 index 00000000..7d9dec18 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Icon.ico differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Info.plist b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Info.plist new file mode 100644 index 00000000..d0dd40aa --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleName + DungeonSlime + CFBundleDisplayName + DungeonSlime + CFBundleIdentifier + com.monogame.dungeonslime + CFBundleVersion + 1.0 + CFBundlePackageType + APPL + CFBundleExecutable + DungeonSlime + CFBundleIconFile + DungeonSlime.icns + NSHighResolutionCapable + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Program.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Program.cs new file mode 100644 index 00000000..a87a0581 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/Program.cs @@ -0,0 +1,4 @@ +using DungeonSlime; + +using var game = new DungeonSlimeGame(); +game.Run(); diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/app.manifest b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/app.manifest new file mode 100644 index 00000000..caf45166 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Desktop/app.manifest @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true/pm + permonitorv2,permonitor + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/DungeonSlime.WindowsDX.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/DungeonSlime.WindowsDX.csproj new file mode 100644 index 00000000..28526aa6 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/DungeonSlime.WindowsDX.csproj @@ -0,0 +1,45 @@ + + + WinExe + net10.0-windows + Major + false + false + true + + + ..\Desktop\app.manifest + ..\Desktop\Icon.ico + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/Program.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/Program.cs new file mode 100644 index 00000000..a87a0581 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/Windows/Program.cs @@ -0,0 +1,4 @@ +using DungeonSlime; + +using var game = new DungeonSlimeGame(); +game.Run(); diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..0763ce12 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images": [ + { + "idiom": "iphone", + "size": "20x20", + "scale": "2x", + "filename": "appicon20x20@2x.png" + }, + { + "idiom": "ipad", + "size": "20x20", + "scale": "2x", + "filename": "appicon20x20@2x.png" + }, + { + "idiom": "iphone", + "size": "20x20", + "scale": "3x", + "filename": "appicon20x20@3x.png" + }, + { + "idiom": "iphone", + "size": "29x29", + "scale": "2x", + "filename": "appicon29x29@2x.png" + }, + { + "idiom": "ipad", + "size": "29x29", + "scale": "2x", + "filename": "appicon29x29@2x.png" + }, + { + "idiom": "iphone", + "size": "29x29", + "scale": "3x", + "filename": "appicon29x29@3x.png" + }, + { + "idiom": "iphone", + "size": "40x40", + "scale": "2x", + "filename": "appicon40x40@2x.png" + }, + { + "idiom": "ipad", + "size": "40x40", + "scale": "2x", + "filename": "appicon40x40@2x.png" + }, + { + "idiom": "iphone", + "size": "40x40", + "scale": "3x", + "filename": "appicon40x40@3x.png" + }, + { + "idiom": "iphone", + "size": "60x60", + "scale": "2x", + "filename": "appicon60x60@2x.png" + }, + { + "idiom": "iphone", + "size": "60x60", + "scale": "3x", + "filename": "appicon60x60@3x.png" + }, + { + "idiom": "ipad", + "size": "76x76", + "scale": "2x", + "filename": "appicon76x76@2x.png" + }, + { + "idiom": "ipad", + "size": "83.5x83.5", + "scale": "2x", + "filename": "appicon83.5x83.5@2x.png" + }, + { + "idiom": "ios-marketing", + "size": "1024x1024", + "scale": "1x", + "filename": "appiconItunesArtwork.png" + } + ], + "properties": {}, + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@2x.png new file mode 100644 index 00000000..5a644f5b Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@3x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@3x.png new file mode 100644 index 00000000..765b5f5f Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon20x20@3x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@2x.png new file mode 100644 index 00000000..41eae981 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@3x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@3x.png new file mode 100644 index 00000000..009fa8b6 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon29x29@3x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@2x.png new file mode 100644 index 00000000..bc0f1bbf Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@3x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@3x.png new file mode 100644 index 00000000..051a1a48 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon40x40@3x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@2x.png new file mode 100644 index 00000000..051a1a48 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@3x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@3x.png new file mode 100644 index 00000000..556e0b71 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon60x60@3x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon76x76@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon76x76@2x.png new file mode 100644 index 00000000..d30b0010 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon76x76@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon83.5x83.5@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon83.5x83.5@2x.png new file mode 100644 index 00000000..08d4d804 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appicon83.5x83.5@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appiconItunesArtwork.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appiconItunesArtwork.png new file mode 100644 index 00000000..6b4c6694 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/AppIcon.appiconset/appiconItunesArtwork.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/Contents.json b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/Contents.json new file mode 100644 index 00000000..121dee67 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Default.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Default.png new file mode 100644 index 00000000..1f9b909f Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Default.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/DungeonSlime.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/DungeonSlime.csproj new file mode 100644 index 00000000..86d64f3b --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/DungeonSlime.csproj @@ -0,0 +1,45 @@ + + + + Exe + net10.0-ios + 12.2 + com.monogame.dungeonslime + AppIcon + iossimulator-x64 + + + + iPhone Distribution + EntitlementsProduction.plist + + + + iPhone Developer + Entitlements.plist + + + + + + + + + + + + + + + + + + + + + + + Assets.car + + + \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Entitlements.plist b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Entitlements.plist new file mode 100644 index 00000000..4eac5f62 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Entitlements.plist @@ -0,0 +1,8 @@ + + + + + get-task-allow + + + \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/EntitlementsProduction.plist b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/EntitlementsProduction.plist new file mode 100644 index 00000000..efc29758 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/EntitlementsProduction.plist @@ -0,0 +1,9 @@ + + + + + + get-task-allow + + + \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/GameThumbnail.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/GameThumbnail.png new file mode 100644 index 00000000..99814c32 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/GameThumbnail.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Info.plist b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Info.plist new file mode 100644 index 00000000..2c8b330f --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Info.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDisplayName + DungeonSlime + CFBundleIdentifier + com.monogame.dungeonslime + CFBundleName + DungeonSlime + CFBundleVersion + 1 + CFBundleShortVersionString + 1.0.0 + CFBundleExecutable + $(EXECUTABLE_NAME) + MinimumOSVersion + 12.2 + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIRequiresFullScreen + + UIStatusBarHidden + + UILaunchStoryboardName + LaunchScreen + UIDeviceFamily + + 1 + 2 + + CFBundleIconName + AppIcon + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconName + AppIcon + + + ITSAppUsesNonExemptEncryption + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/LaunchScreen.storyboard b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/LaunchScreen.storyboard new file mode 100644 index 00000000..5d2e905a --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Program.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Program.cs new file mode 100644 index 00000000..c289297d --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/Program.cs @@ -0,0 +1,31 @@ +using System; +using Foundation; +using UIKit; + +namespace DungeonSlime.iOS +{ + [Register("AppDelegate")] + class Program : UIApplicationDelegate + { + private static DungeonSlimeGame game; + + internal static void RunGame() + { + game = new DungeonSlimeGame(); + game.Run(); + } + + /// + /// The main entry point for the application. + /// + static void Main(string[] args) + { + UIApplication.Main(args, null, typeof(Program)); + } + + public override void FinishedLaunching(UIApplication app) + { + RunGame(); + } + } +} \ No newline at end of file diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon60x60@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon60x60@2x.png new file mode 100644 index 00000000..dfc2bd20 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon60x60@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon76x76@2x~ipad.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon76x76@2x~ipad.png new file mode 100644 index 00000000..4af7ad2b Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AppIcon76x76@2x~ipad.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/Assets.car b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/Assets.car new file mode 100644 index 00000000..468c84e0 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/Assets.car differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon60x60@2x.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon60x60@2x.png new file mode 100644 index 00000000..dfc2bd20 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon60x60@2x.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon76x76@2x~ipad.png b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon76x76@2x~ipad.png new file mode 100644 index 00000000..4af7ad2b Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/AppIcon76x76@2x~ipad.png differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/Assets.car b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/Assets.car new file mode 100644 index 00000000..468c84e0 Binary files /dev/null and b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/build/AssetsCompiled/Assets.car differ diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/partial-info.plist b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/partial-info.plist new file mode 100644 index 00000000..a19ab726 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Platforms/iOS/partial-info.plist @@ -0,0 +1,31 @@ + + + + + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon60x60 + + CFBundleIconName + AppIcon + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + AppIcon60x60 + AppIcon76x76 + + CFBundleIconName + AppIcon + + + + diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/GameScene.cs index d01a3b03..37b0262d 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/GameScene.cs @@ -51,6 +51,10 @@ private enum GameState // The speed of the fade to grayscale effect. private const float FADE_SPEED = 0.02f; + private const int VirtualWidth = 1280; + private const int VirtualHeight = 720; + private Rectangle _viewport; + public override void Initialize() { // LoadContent is called during base.Initialize(). @@ -60,11 +64,7 @@ public override void Initialize() // the escape key will be used to return back to the title screen Core.ExitOnEscape = false; - // Create the room bounds by getting the bounds of the screen then - // using the Inflate method to "Deflate" the bounds by the width and - // height of a tile so that the bounds only covers the inside room of - // the dungeon tilemap. - _roomBounds = Core.GraphicsDevice.PresentationParameters.Bounds; + _roomBounds = new Rectangle(0, 0, VirtualWidth, VirtualHeight); _roomBounds.Inflate(-_tilemap.TileWidth, -_tilemap.TileHeight); // Subscribe to the slime's BodyCollision event so that a game over @@ -73,7 +73,9 @@ public override void Initialize() // Create any UI elements from the root element created in previous // scenes - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); + + _viewport = CalculateViewport(); // Initialize the user interface for the game scene. InitializeUI(); @@ -86,7 +88,7 @@ private void InitializeUI() { // Clear out any previous UI element incase we came here // from a different scene. - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); // Create the game scene ui instance. _ui = new GameSceneUI(); @@ -172,7 +174,19 @@ public override void LoadContent() public override void Update(GameTime gameTime) { - // Ensure the UI is always updated + _viewport = CalculateViewport(); + + Gum.GumService.Default.Renderer.Camera.ClientWidth = _viewport.Width / 4; + Gum.GumService.Default.Renderer.Camera.ClientHeight = _viewport.Height / 4; + + float zoom = Math.Max( + _viewport.Height / Gum.GumService.Default.CanvasHeight, + _viewport.Width / Gum.GumService.Default.CanvasWidth); + Gum.GumService.Default.Renderer.Camera.Zoom = zoom; + + Gum.GumService.Default.Cursor.TransformMatrix = + Matrix.CreateTranslation(_viewport.X, _viewport.Y, 0); + _ui.Update(gameTime); if (_state != GameState.Playing) @@ -394,7 +408,7 @@ private void GameOver() public override void Draw(GameTime gameTime) { // Clear the back buffer. - Core.GraphicsDevice.Clear(Color.CornflowerBlue); + Core.GraphicsDevice.Clear(Color.Black); if (_state != GameState.Playing) { @@ -402,12 +416,17 @@ public override void Draw(GameTime gameTime) _grayscaleEffect.Parameters["Saturation"].SetValue(_saturation); // And begin the sprite batch using the grayscale effect. - Core.SpriteBatch.Begin(samplerState: SamplerState.PointClamp, effect: _grayscaleEffect); + Core.SpriteBatch.Begin( + samplerState: SamplerState.PointClamp, + effect: _grayscaleEffect, + transformMatrix: CreateViewportScaleMatrix()); } else { // Otherwise, just begin the sprite batch as normal. - Core.SpriteBatch.Begin(samplerState: SamplerState.PointClamp); + Core.SpriteBatch.Begin( + samplerState: SamplerState.PointClamp, + transformMatrix: CreateViewportScaleMatrix()); } // Draw the tilemap @@ -425,4 +444,33 @@ public override void Draw(GameTime gameTime) // Draw the UI _ui.Draw(); } + + private Rectangle CalculateViewport() + { + int backBufferWidth = Core.GraphicsDevice.PresentationParameters.BackBufferWidth; + int backBufferHeight = Core.GraphicsDevice.PresentationParameters.BackBufferHeight; + + float targetAspectRatio = VirtualWidth / (float)VirtualHeight; + float currentAspectRatio = backBufferWidth / (float)backBufferHeight; + + if (currentAspectRatio > targetAspectRatio) + { + int viewportWidth = (int)(backBufferHeight * targetAspectRatio); + int x = (backBufferWidth - viewportWidth) / 2; + return new Rectangle(x, 0, viewportWidth, backBufferHeight); + } + + int viewportHeight = (int)(backBufferWidth / targetAspectRatio); + int y = (backBufferHeight - viewportHeight) / 2; + return new Rectangle(0, y, backBufferWidth, viewportHeight); + } + + private Matrix CreateViewportScaleMatrix() + { + float scaleX = _viewport.Width / (float)VirtualWidth; + float scaleY = _viewport.Height / (float)VirtualHeight; + + return Matrix.CreateScale(scaleX, scaleY, 1.0f) * + Matrix.CreateTranslation(_viewport.X, _viewport.Y, 0); + } } diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/TitleScene.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/TitleScene.cs index 4bf0b892..bd5bbfcd 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/TitleScene.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/Scenes/TitleScene.cs @@ -3,10 +3,9 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Input; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; using MonoGameLibrary.Scenes; @@ -18,6 +17,8 @@ public class TitleScene : Scene private const string DUNGEON_TEXT = "Dungeon"; private const string SLIME_TEXT = "Slime"; private const string PRESS_ENTER_TEXT = "Press Enter To Start"; + private const int VirtualWidth = 1280; + private const int VirtualHeight = 720; // The font to use to render normal text. private SpriteFont _font; @@ -70,6 +71,8 @@ public class TitleScene : Scene // are created. private TextureAtlas _atlas; + private Rectangle _viewport; + public override void Initialize() { // LoadContent is called during base.Initialize(). @@ -99,7 +102,7 @@ public override void Initialize() // Set the background pattern destination rectangle to fill the entire // screen background - _backgroundDestination = Core.GraphicsDevice.PresentationParameters.Bounds; + _backgroundDestination = new Rectangle(0, 0, VirtualWidth, VirtualHeight); InitializeUI(); } @@ -179,7 +182,7 @@ private void CreateOptionsPanel() _optionsPanel.IsVisible = false; _optionsPanel.AddToRoot(); - TextRuntime optionsText = new TextRuntime(); + Gum.GueDeriving.TextRuntime optionsText = new Gum.GueDeriving.TextRuntime(); optionsText.X = 10; optionsText.Y = 10; optionsText.Text = "OPTIONS"; @@ -283,10 +286,15 @@ private void InitializeUI() { // Clear out any previous UI in case we came here from // a different screen: - GumService.Default.Root.Children.Clear(); + Gum.GumService.Default.Root.Children.Clear(); + + Gum.GumService.Default.CanvasWidth = VirtualWidth / 4f; + Gum.GumService.Default.CanvasHeight = VirtualHeight / 4f; CreateTitlePanel(); CreateOptionsPanel(); + + _viewport = CalculateViewport(); } public override void Update(GameTime gameTime) @@ -302,7 +310,20 @@ public override void Update(GameTime gameTime) _backgroundOffset.X %= _backgroundPattern.Width; _backgroundOffset.Y %= _backgroundPattern.Height; - GumService.Default.Update(gameTime); + _viewport = CalculateViewport(); + + Gum.GumService.Default.Renderer.Camera.ClientWidth = _viewport.Width / 4; + Gum.GumService.Default.Renderer.Camera.ClientHeight = _viewport.Height / 4; + + float zoom = Math.Max( + _viewport.Height / Gum.GumService.Default.CanvasHeight, + _viewport.Width / Gum.GumService.Default.CanvasWidth); + Gum.GumService.Default.Renderer.Camera.Zoom = zoom; + + Gum.GumService.Default.Cursor.TransformMatrix = + Matrix.CreateTranslation(_viewport.X, _viewport.Y, 0); + + Gum.GumService.Default.Update(gameTime); } public override void Draw(GameTime gameTime) @@ -310,14 +331,18 @@ public override void Draw(GameTime gameTime) Core.GraphicsDevice.Clear(new Color(32, 40, 78, 255)); // Draw the background pattern first using the PointWrap sampler state. - Core.SpriteBatch.Begin(samplerState: SamplerState.PointWrap); + Core.SpriteBatch.Begin( + samplerState: SamplerState.PointWrap, + transformMatrix: CreateViewportScaleMatrix()); Core.SpriteBatch.Draw(_backgroundPattern, _backgroundDestination, new Rectangle(_backgroundOffset.ToPoint(), _backgroundDestination.Size), Color.White * 0.5f); Core.SpriteBatch.End(); if (_titleScreenButtonsPanel.IsVisible) { // Begin the sprite batch to prepare for rendering. - Core.SpriteBatch.Begin(samplerState: SamplerState.PointClamp); + Core.SpriteBatch.Begin( + samplerState: SamplerState.PointClamp, + transformMatrix: CreateViewportScaleMatrix()); // The color to use for the drop shadow text. Color dropShadowColor = Color.Black * 0.5f; @@ -340,6 +365,35 @@ public override void Draw(GameTime gameTime) Core.SpriteBatch.End(); } - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); + } + + private Rectangle CalculateViewport() + { + int backBufferWidth = Core.GraphicsDevice.PresentationParameters.BackBufferWidth; + int backBufferHeight = Core.GraphicsDevice.PresentationParameters.BackBufferHeight; + + float targetAspectRatio = VirtualWidth / (float)VirtualHeight; + float currentAspectRatio = backBufferWidth / (float)backBufferHeight; + + if (currentAspectRatio > targetAspectRatio) + { + int viewportWidth = (int)(backBufferHeight * targetAspectRatio); + int x = (backBufferWidth - viewportWidth) / 2; + return new Rectangle(x, 0, viewportWidth, backBufferHeight); + } + + int viewportHeight = (int)(backBufferWidth / targetAspectRatio); + int y = (backBufferHeight - viewportHeight) / 2; + return new Rectangle(0, y, backBufferWidth, viewportHeight); + } + + private Matrix CreateViewportScaleMatrix() + { + float scaleX = _viewport.Width / (float)VirtualWidth; + float scaleY = _viewport.Height / (float)VirtualHeight; + + return Matrix.CreateScale(scaleX, scaleY, 1.0f) * + Matrix.CreateTranslation(_viewport.X, _viewport.Y, 0); } } diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/AnimatedButton.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/AnimatedButton.cs index a98baf1a..3dbcec9e 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/AnimatedButton.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/AnimatedButton.cs @@ -6,7 +6,7 @@ using Gum.Graphics.Animation; using Gum.Managers; using Microsoft.Xna.Framework.Input; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -36,13 +36,13 @@ public AnimatedButton(TextureAtlas atlas) // Get a reference to the nine-slice background to display the button graphics // A nine-slice allows the button to stretch while preserving corner appearance - NineSliceRuntime background = buttonVisual.Background; + Gum.GueDeriving.NineSliceRuntime background = buttonVisual.Background; background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.Color = Microsoft.Xna.Framework.Color.White; // texture coordinates for the background are set by AnimationChains below - TextRuntime textInstance = buttonVisual.TextInstance; + Gum.GueDeriving.TextRuntime textInstance = buttonVisual.TextInstance; textInstance.Text = "START"; textInstance.Blue = 130; textInstance.Green = 86; @@ -141,12 +141,12 @@ public AnimatedButton(TextureAtlas atlas) /// private void HandleKeyDown(object sender, KeyEventArgs e) { - if (e.Key == Keys.Left) + if (e.Key == Gum.Forms.Input.Keys.Left) { // Left arrow navigates to previous control HandleTab(TabDirection.Up, loop: true); } - if (e.Key == Keys.Right) + if (e.Key == Gum.Forms.Input.Keys.Right) { // Right arrow navigates to next control HandleTab(TabDirection.Down, loop: true); diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/GameSceneUI.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/GameSceneUI.cs index fa164030..0a210647 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/GameSceneUI.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/GameSceneUI.cs @@ -6,13 +6,13 @@ using Microsoft.Xna.Framework.Content; using MonoGameGum; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; -public class GameSceneUI : ContainerRuntime +public class GameSceneUI : Gum.GueDeriving.ContainerRuntime { // The string format to use when updating the text for the score display. private static readonly string s_scoreFormat = "SCORE: {0:D6}"; @@ -35,7 +35,7 @@ public class GameSceneUI : ContainerRuntime private AnimatedButton _retryButton; // The text runtime used to display the players score on the game screen. - private TextRuntime _scoreText; + private Gum.GueDeriving.TextRuntime _scoreText; /// /// Event invoked when the Resume button on the Pause panel is clicked. @@ -55,7 +55,7 @@ public class GameSceneUI : ContainerRuntime public GameSceneUI() { - // The game scene UI inherits from ContainerRuntime, so we set its + // The game scene UI inherits from Gum.GueDeriving.ContainerRuntime, so we set its // doc to fill so it fills the entire screen. Dock(Gum.Wireframe.Dock.Fill); @@ -63,8 +63,8 @@ public GameSceneUI() this.AddToRoot(); // Get a reference to the content manager that was registered with the - // GumService when it was original initialized. - ContentManager content = GumService.Default.ContentLoader.XnaContentManager; + // Gum.GumService when it was original initialized. + ContentManager content = Gum.GumService.Default.ContentLoader.XnaContentManager; // Use that content manager to load the sound effect and atlas for the // user interface elements @@ -87,9 +87,9 @@ public GameSceneUI() AddChild(_gameOverPanel.Visual); } - private TextRuntime CreateScoreText() + private Gum.GueDeriving.TextRuntime CreateScoreText() { - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Anchor(Gum.Wireframe.Anchor.TopLeft); text.WidthUnits = DimensionUnitType.RelativeToChildren; text.X = 20.0f; @@ -114,7 +114,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -124,7 +124,7 @@ private Panel CreatePausePanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "PAUSED"; text.UseCustomFont = true; text.CustomFontFile = "fonts/04b_30.fnt"; @@ -170,7 +170,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Dock(Gum.Wireframe.Dock.Fill); background.Texture = backgroundRegion.Texture; background.TextureAddress = TextureAddress.Custom; @@ -180,7 +180,7 @@ private Panel CreateGameOverPanel(TextureAtlas atlas) background.TextureLeft = backgroundRegion.SourceRectangle.Left; panel.AddChild(background); - TextRuntime text = new TextRuntime(); + Gum.GueDeriving.TextRuntime text = new Gum.GueDeriving.TextRuntime(); text.Text = "GAME OVER"; text.WidthUnits = DimensionUnitType.RelativeToChildren; text.UseCustomFont = true; @@ -327,7 +327,7 @@ public void HideGameOverPanel() /// A snapshot of the timing values for the current update cycle. public void Update(GameTime gameTime) { - GumService.Default.Update(gameTime); + Gum.GumService.Default.Update(gameTime); } /// @@ -335,6 +335,6 @@ public void Update(GameTime gameTime) /// public void Draw() { - GumService.Default.Draw(); + Gum.GumService.Default.Draw(); } } diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/OptionsSlider.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/OptionsSlider.cs index f859e806..adf12ec1 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/OptionsSlider.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/DungeonSlime/UI/OptionsSlider.cs @@ -4,7 +4,7 @@ using Gum.Managers; using Microsoft.Xna.Framework; using Gum.Forms.Controls; -using MonoGameGum.GueDeriving; +using Gum.GueDeriving; using MonoGameLibrary.Graphics; namespace DungeonSlime.UI; @@ -15,10 +15,10 @@ namespace DungeonSlime.UI; public class OptionsSlider : Slider { // Reference to the text label that displays the slider's title - private TextRuntime _textInstance; + private Gum.GueDeriving.TextRuntime _textInstance; // Reference to the rectangle that visually represents the current value - private ColoredRectangleRuntime _fillRectangle; + private Gum.GueDeriving.ColoredRectangleRuntime _fillRectangle; /// /// Gets or sets the text label for this slider. @@ -36,14 +36,14 @@ public string Text public OptionsSlider(TextureAtlas atlas) { // Create the top-level container for all visual elements - ContainerRuntime topLevelContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime topLevelContainer = new Gum.GueDeriving.ContainerRuntime(); topLevelContainer.Height = 55f; topLevelContainer.Width = 264f; TextureRegion backgroundRegion = atlas.GetRegion("panel-background"); // Create the background panel that contains everything - NineSliceRuntime background = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime background = new Gum.GueDeriving.NineSliceRuntime(); background.Texture = atlas.Texture; background.TextureAddress = TextureAddress.Custom; background.TextureHeight = backgroundRegion.Height; @@ -54,7 +54,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(background); // Create the title text element - _textInstance = new TextRuntime(); + _textInstance = new Gum.GueDeriving.TextRuntime(); _textInstance.CustomFontFile = @"fonts/04b_30.fnt"; _textInstance.UseCustomFont = true; _textInstance.FontScale = 0.5f; @@ -65,7 +65,7 @@ public OptionsSlider(TextureAtlas atlas) topLevelContainer.AddChild(_textInstance); // Create the container for the slider track and decorative elements - ContainerRuntime innerContainer = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime innerContainer = new Gum.GueDeriving.ContainerRuntime(); innerContainer.Height = 13f; innerContainer.Width = 241f; innerContainer.X = 10f; @@ -75,7 +75,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion offBackgroundRegion = atlas.GetRegion("slider-off-background"); // Create the "OFF" side of the slider (left end) - NineSliceRuntime offBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime offBackground = new Gum.GueDeriving.NineSliceRuntime(); offBackground.Dock(Gum.Wireframe.Dock.Left); offBackground.Texture = atlas.Texture; offBackground.TextureAddress = TextureAddress.Custom; @@ -90,7 +90,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion middleBackgroundRegion = atlas.GetRegion("slider-middle-background"); // Create the middle track portion of the slider - NineSliceRuntime middleBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime middleBackground = new Gum.GueDeriving.NineSliceRuntime(); middleBackground.Texture = middleBackgroundRegion.Texture; middleBackground.TextureAddress = TextureAddress.Custom; middleBackground.TextureHeight = middleBackgroundRegion.Height; @@ -106,7 +106,7 @@ public OptionsSlider(TextureAtlas atlas) TextureRegion maxBackgroundRegion = atlas.GetRegion("slider-max-background"); // Create the "MAX" side of the slider (right end) - NineSliceRuntime maxBackground = new NineSliceRuntime(); + Gum.GueDeriving.NineSliceRuntime maxBackground = new Gum.GueDeriving.NineSliceRuntime(); maxBackground.Texture = maxBackgroundRegion.Texture; maxBackground.TextureAddress = TextureAddress.Custom; maxBackground.TextureHeight = maxBackgroundRegion.Height; @@ -120,7 +120,7 @@ public OptionsSlider(TextureAtlas atlas) // Create the interactive track that responds to clicks // The special name "TrackInstance" is required for Slider functionality - ContainerRuntime trackInstance = new ContainerRuntime(); + Gum.GueDeriving.ContainerRuntime trackInstance = new Gum.GueDeriving.ContainerRuntime(); trackInstance.Name = "TrackInstance"; trackInstance.Dock(Gum.Wireframe.Dock.Fill); trackInstance.Height = -2f; @@ -128,14 +128,14 @@ public OptionsSlider(TextureAtlas atlas) middleBackground.AddChild(trackInstance); // Create the fill rectangle that visually displays the current value - _fillRectangle = new ColoredRectangleRuntime(); + _fillRectangle = new Gum.GueDeriving.ColoredRectangleRuntime(); _fillRectangle.Dock(Gum.Wireframe.Dock.Left); _fillRectangle.Width = 90f; // Default to 90% - will be updated by value changes _fillRectangle.WidthUnits = DimensionUnitType.PercentageOfParent; trackInstance.AddChild(_fillRectangle); // Add "OFF" text to the left end - TextRuntime offText = new TextRuntime(); + Gum.GueDeriving.TextRuntime offText = new Gum.GueDeriving.TextRuntime(); offText.Red = 70; offText.Green = 86; offText.Blue = 130; @@ -147,7 +147,7 @@ public OptionsSlider(TextureAtlas atlas) offBackground.AddChild(offText); // Add "MAX" text to the right end - TextRuntime maxText = new TextRuntime(); + Gum.GueDeriving.TextRuntime maxText = new Gum.GueDeriving.TextRuntime(); maxText.Red = 70; maxText.Green = 86; maxText.Blue = 130; diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Core.cs index 40aaa84a..60c4d664 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Core.cs @@ -29,6 +29,8 @@ public class Core : Game /// public static GraphicsDeviceManager Graphics { get; private set; } + public static GameWindow GameWindow { get; private set; } + /// /// Gets the graphics device used to create graphical resources and perform primitive rendering. /// @@ -83,7 +85,11 @@ public Core(string title, int width, int height, bool fullScreen) // Set the graphics defaults Graphics.PreferredBackBufferWidth = width; Graphics.PreferredBackBufferHeight = height; - Graphics.IsFullScreen = fullScreen; + + if (OperatingSystem.IsMacOS() || OperatingSystem.IsLinux() || OperatingSystem.IsWindows()) + { + Graphics.IsFullScreen = fullScreen; + } // Apply the graphic presentation changes Graphics.ApplyChanges(); @@ -112,6 +118,7 @@ protected override void Initialize() // Set the core's graphics device to a reference of the base Game's // graphics device. GraphicsDevice = base.GraphicsDevice; + GameWindow = base.Window; // Create the sprite batch instance. SpriteBatch = new SpriteBatch(GraphicsDevice); @@ -139,7 +146,9 @@ protected override void Update(GameTime gameTime) // Update the audio controller. Audio.Update(); - if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) + if (!OperatingSystem.IsIOS() && + ExitOnEscape && + Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/InputManager.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/InputManager.cs index 1790eb70..e2d5dfec 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/InputManager.cs +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/InputManager.cs @@ -19,6 +19,11 @@ public class InputManager /// public GamePadInfo[] GamePads { get; private set; } + /// + /// Gets the state information of touch input. + /// + public TouchInfo Touch { get; private set; } + /// /// Creates a new InputManager. /// @@ -27,6 +32,7 @@ public InputManager() { Keyboard = new KeyboardInfo(); Mouse = new MouseInfo(); + Touch = new TouchInfo(); GamePads = new GamePadInfo[4]; for (int i = 0; i < 4; i++) @@ -36,13 +42,14 @@ public InputManager() } /// - /// Updates the state information for the keyboard, mouse, and gamepad inputs. + /// Updates the state information for the keyboard, mouse, touch, and gamepad inputs. /// /// A snapshot of the timing values for the current frame. public void Update(GameTime gameTime) { Keyboard.Update(); Mouse.Update(); + Touch.Update(); for (int i = 0; i < 4; i++) { diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/TouchInfo.cs b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/TouchInfo.cs new file mode 100644 index 00000000..d1e29531 --- /dev/null +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/Input/TouchInfo.cs @@ -0,0 +1,133 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input.Touch; + +namespace MonoGameLibrary.Input; + +public class TouchInfo +{ + /// + /// Gets the state of touch input during the previous update cycle. + /// + public TouchCollection PreviousState { get; private set; } + + /// + /// Gets the state of touch input during the current update cycle. + /// + public TouchCollection CurrentState { get; private set; } + + /// + /// Gets a value that indicates if any touch input is currently active. + /// + public bool HasTouches => CurrentState.Count > 0; + + /// + /// Gets the number of current active touches. + /// + public int TouchCount => CurrentState.Count; + + /// + /// Gets the primary touch location, or Vector2.Zero if no touches are active. + /// + public Vector2 PrimaryTouchPosition => HasTouches ? CurrentState[0].Position : Vector2.Zero; + + /// + /// Creates a new TouchInfo. + /// + public TouchInfo() + { + PreviousState = new TouchCollection(); + CurrentState = TouchPanel.GetState(); + } + + /// + /// Updates the state information about touch input. + /// + public void Update() + { + PreviousState = CurrentState; + CurrentState = TouchPanel.GetState(); + } + + /// + /// Returns a value that indicates if a touch was just started on the current frame. + /// + /// true if a touch was just started on the current frame; otherwise, false. + public bool WasTouchJustPressed() + { + return CurrentState.Any(t => t.State == TouchLocationState.Pressed) && + !PreviousState.Any(t => t.State == TouchLocationState.Pressed || t.State == TouchLocationState.Moved); + } + + /// + /// Returns a value that indicates if a touch was just released on the current frame. + /// + /// true if a touch was just released on the current frame; otherwise, false. + public bool WasTouchJustReleased() + { + return CurrentState.Any(t => t.State == TouchLocationState.Released) || + (PreviousState.Count > 0 && CurrentState.Count == 0); + } + + /// + /// Returns a value that indicates if any touch is currently active (pressed or moved). + /// + /// true if any touch is currently active; otherwise, false. + public bool IsTouchDown() + { + return CurrentState.Any(t => t.State == TouchLocationState.Pressed || t.State == TouchLocationState.Moved); + } + + /// + /// Gets all current touch locations. + /// + /// An enumerable of all current touch locations. + public IEnumerable GetTouchLocations() + { + return CurrentState; + } + + /// + /// Gets a specific touch by its ID. + /// + /// The ID of the touch to find. + /// The touch location if found; otherwise, a default TouchLocation. + public TouchLocation GetTouchById(int id) + { + return CurrentState.FirstOrDefault(t => t.Id == id); + } + + /// + /// Returns a value that indicates if a touch moved between the previous and current frames. + /// + /// true if any touch moved; otherwise, false. + public bool WasTouchMoved() + { + return CurrentState.Any(t => t.State == TouchLocationState.Moved); + } + + /// + /// Gets the delta movement of the primary touch between frames. + /// + /// The movement delta, or Vector2.Zero if no primary touch or movement. + public Vector2 GetPrimaryTouchDelta() + { + if (!HasTouches) + { + return Vector2.Zero; + } + + TouchLocation currentTouch = CurrentState[0]; + + foreach (TouchLocation prevTouch in PreviousState) + { + if (prevTouch.Id == currentTouch.Id) + { + return currentTouch.Position - prevTouch.Position; + } + } + + return Vector2.Zero; + } +} diff --git a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/MonoGameLibrary.csproj b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/MonoGameLibrary.csproj index 90ac8a66..feb9c260 100644 --- a/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/MonoGameLibrary.csproj +++ b/Tutorials/learn-monogame-2d/src/27-Conclusion/MonoGameLibrary/MonoGameLibrary.csproj @@ -1,9 +1,9 @@ - net9.0 + net10.0 - + All