NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

adding a capacity level indicator

Forums > SwiftUI

Hi everyone. So, im teaching myself swiftUI and SpriteKit via several sample tutorials I've picked up over the years. Ive been using the free tutorial named SoloMission as a way of teaching myself. Ive basically taken that code and am adapting it with new features that im learning as I go.
So basically, this is is now an asteroid shooting game, I've got multiple asteroids that drop at different speeds that are random sizes, which drop faster and more frequently the further through the levels you go... I've added a laser temp so if you fire too much your laser overheats (kinda like the old astro blaster game from the 80's) that's right, im that old lol. The logic for this works great and I can track the level going up and down using basic 'print (battery temp)' command in the debug window :D What I really would love is a capacity indicator / level indicator with green, yellow and red segments that shows the current level .... help lol


Hacking with Swift is sponsored by Instabug

SPONSORED Catch bugs as soon as they happen and know exactly why a crash occurred. Instabug's SDK grabs all the logs they need to fix bugs, crashes and performance issues in minutes instead of days. Get screenshots, device details, network logs, repro steps, and tons of other critical insights needed to resolve issues and prioritize product backlogs straight from your dashboard. It only takes a minute to integrate!

Get started now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.