Adding A Dragged Color Hover Effect With SwiftUI In Swift Playgrounds - BugSmasher Part 8

55 Просмотры
Издатель
To make our little Swift Playgrounds game a bit more interesting I'm adding an effect that highlights our hovering image green if you're over a match or red if you're over a non match.

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 - Creating Draggable Images in Swift Playgrounds https://youtube.com/shorts/TUBiNeTTnnk
Part 6 - Detecting Matches Part One - https://youtube.com/shorts/gY5n7ssNW4M
Part 7 - Detecting Match Part Two - https://youtube.com/shorts/THffL5nM6O4
Part 8 - You are here. :)

It's one of the cool things about SwiftUI because this would not be nearly this easy if it were SpriteKit. Of course there are a lot of trade offs with SwiftUI as far as game development goes, so this is best saved for experimental and fast prototyping, but it's still a fun concept and a neat effect that takes only a few lines of code to implement.

Leave a like if you're enjoying the series!

#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
Комментариев нет.