Adding floor indicator lights
As we know, elevators have lights, usually at the top of the frame, to let people know what floor the elevator is on at any time. Let’s simulate that by adding the lights that represent both floors of the elevator, one and two. Add the following code directly after the previous line of code we have just written:
//MARK: - ADD THE FLOOR LIGHTS HStack { Image(systemName: "1.circle") .foregroundColor(appData.floor1 ? .red : .black) .opacity(appData.floor1 ? 1 : 0.3) Image(systemName: "2.circle") .foregroundColor(appData.floor2 ? .red : .black) .opacity(appData.floor2 ? 1 : 0.3) }.position(x: (geo...