Creating Draggable Images In Swift Playgrounds Using SwiftUI - Bug Smasher Part 5

40 Просмотры
Издатель
To bring BugSmasher to life one of the first things we'll need to do is make sure the player can interact with the game board. More specifically we'll need to make sure that we can detect when a player has selected a bug and then allow the player to drag that bug around the screen.

Project Intro - https://youtube.com/shorts/d-EzV_hiNc0
Part 1 - Setting Up The Project - https://youtube.com/shorts/UAYa_RhX2cQ
Part 2 - Creating A Simple UI With Swift Playgrounds - https://youtube.com/shorts/YLStuS1q9Mo
Part 3 - Creating Custom Views in SwiftUI - https://youtube.com/shorts/WrdfXGuCe7w
Part 4 - Hooking Up Custom Views In Swift Playgrounds https://youtube.com/shorts/VJJ9c334ihU
Part 5 - This Video!

Swift Playgrounds uses SwiftUI instead of SpriteKit which makes detecting taps a bit different than I've done in the past, but the solution I found was pretty interesting and I think it'll work well for this simple game. If the game gets much more complex though - this may fall apart.

Anyway if you're enjoying this series a like on the video would be greatly appreciated!

#gamedev #swiftplaygrounds #swiftui #ios

//Things I've Made
ZER0ED: https://apps.apple.com/us/app/zer0ed/id1526004843
Shapes&Numbers: https://apps.apple.com/us/app/shapes-numbers/id1623506538
My Website: https://www.johndav.com
Категория
Язык программирования Swift
Комментариев нет.