All righty. So when we press the play button now and we get smacked by the bigger triangle, we want, when this button is available to be pressed, we want to entice people to be able to press this button. This is a good way to get people to want to keep clicking. And you know, keep clicking on ads. And we want to decrease the value of this button. So what we can do is when this button is available to be pressed, we can make it pulse, and we can make this button look exactly how it is now.
And then when this button isn't available to be pressed, it doesn't pulse like animate. And this one does animate. I hope that makes sense. So to do that, let's go over to our main menu UI. Let's turn that off. Let's turn Game Over menu UI on.
Let's select our heart, click over to animation. Create a new animation in animations, and we're gonna call this hot Bottom cool is you remember to do press the record button. And we can change its width to say 200. Maybe too high, maybe 175. We could probably drag that to 30 and then say 151 50 and then copy these and throw them up here. This shall be pretty familiar to you.
Now let's press play. Let's do that looks like that looks pretty good to me. So we've got that animation. Fantastic. Now we can click on our restart button. Same thing, let's add an animation.
Restart button, press record and we could do a cool rotation thing. So we could do negative 360. And then scroll out to say 300. Let's see what that looks like. Cool, let's go into the curves. And let's just make sure those curves are pretty straight.
You can adjust things to your liking, or you can add a bit of a pulse to it if you like. But we're going, I'm just gonna leave it like that for now. Cuz I think that looks pretty good. And let's go back over to our projects. Let's go to a script and let's open up the app initialize script. Alrighty, so let's go down to the game over script here.
And we just want to add a couple of other lines of code to adjust our Add button. So some stuff in here. So we can say Add button dot get component and the Mater dot enabled equals false. Cool and then we need access to our restart button. So kept the top here public game object, brace, restart button. Scroll back down here and we want to set out restart button dot get component animator dot enabled equals true.
So what this will mean is when we have some reward, it turns off our Add button from being animated and it turns on our restart button without without What actually means is this one needs to be on by default, and this one needs to be off by default. So then we go back over to unity. And we go to Game Over menu UI, and we go to our reset button, and we turn the animator off. So if we press play now, press play. Bam. Cool.
So right now, it's tempting us to press this button here. Well, of course, it makes sense. Press this button, right? It's not really tempting us press this button. We press it, we see an ad. Close the ad waits.
1.5 Seconds. Bam. And it's not working was not working. I hope everyone knows by now we forgot to assign it. So let's just drag our reset button in. test that again, press play.
Bam, press an ad close ad. Awesome. So now we compress this and it's tempting us to press the restart button. It's saying, Hey, this is what you gotta do. So we're teaching the player what to do, subconsciously, the average person doesn't think about these things. And we can easily just press this button now, and the game feels a lot better.
So now we have a working Game Over system with ads implemented. Everything is working just fine. And all we need to do now to make this production ready is when we are making it production ready. All we need to do is on enable test mode. And then we're ready to rock and roll. We can export this and put it on to both iOS and Android and the Unity ads will work just fine.
It really is just as simple as that. See you in the next video.