I went back to this puzzle as I hadn’t finished it before but I decided to try it again today. So this script is on each of the 4 boxes that you have to hit. The player must get them up to 100% although they do go up to 150% to give the player enough time to do this to the other boxes as it slowly goes down once you leave it.
This is the manager-script where it sees whether each box is set to true or not, if it is true, then the barrier will turn off.
Once this was done and working, I then set up a canvas with a slider for each power box so you can see how much energy is left in them. I also fixed the issue where once they dropped below 100% a Boolean wouldn’t go false. I also did some minor tweaking on the speed of the energy loss which I think works much better now.
Floating Platforms
I used the same texture for this as with the cubes.
I replaced all the old platforms with this new model and I also made the model transparent in Unity as I thought it looks better but I might change it back to opaque.
Underneath the platforms, I added a particle effect which spins in a circle to give off the impression that it is floating.
As well as this I also animated the platform to move up and down to give this effect off too. This is the script that I used to randomise the positioning and speed of the animations on each of the platforms as I wanted them all to be out of sync and not all the same.
This is where I made those parameters and set them on the animation clip.