 Hello guys, Crypto grounds here. Welcome back to another idle game tutorial video. This is episode 28. And today we're going to be setting up our multi notation system. So I'm not going to be doing any of the notations today. This is going to be kind of a short video just getting that process set up getting all the settings ready. Next video, the next two videos actually will be our word notation and our engineering notation. And then we can do some other notations as we like. So let's get started with it. Okay, we need to create a setting script because we don't have one of those yet. So maybe what we can do eventually is have music or something like that. You comment, comment down below your suggestions. Please let me know. I'm kind of starting to run out of ideas. I can do daily, I need to do daily stuff for sure. Like daily rewards and stuff like that. Anyways, if you enjoy this video, make sure you leave a like comment down below, subscribe to my channel and check out my other videos in that corner and turn on notifications for future videos. Let's get on with it. So we're going to create an empty. Okay. And then we're going to add a script. We're going to call this the settings. Okay. It could be settings manager settings, whatever you'd like. I'm just going to call it settings. And I'm going to name this game object settings manager settings manager. Okay. Let's open that up. Now, it's a pretty easy system. You'll use this for the other by maxes. So also another thing I can do is like by max one, two, or no one, five, 10, 100. Okay, so we have our Earth and Mars game object, but we Oh, we do have a setting screen. Never mind. So we have a very basic settings right here. So let's just move all this to the top. Which is pretty much all of this. And our full reset can remain under, like in the bottom corner. Okay. So we're just gonna have one button that will toggle through all notations. So just we just copy any button that we already have and adjust it accordingly. Okay. So also, if just so you're aware, you have to be kind of up to date with this video in order to be able to do this successfully, especially episode 10, because that's when I move all of our our notation method into the methods class. So make sure you're kind of up to date with that. Otherwise, you can just look at my notation method right here, and apply it to the text, like so, like that. All right, but I highly recommend you to check out my previous videos. This is just going to be one of our methods, right? Okay. So in our settings, we really don't need to update actually. Yeah, we don't really need to update anything. We don't need this stuff. We do need our unity engine dot UI namespace. Okay. And let's see, we only have a text. So this will be our notation type of text. Okay. And we're, we can have an int in our player data. So let's have a new region at the bottom here called settings. This will be our setting stuff and region hashtag and region. And in here we can do public int. We can honestly do short. Let's do short public short, because we want the small we want the smallest variable possible, we can even do bite if we want it to I'm just going to do a short. So a public short. If you haven't seen my other video, it's a 16 bit integer. And right while an int is a 32 bit, obviously, and along is a 34 bit. So if you hover over this doesn't seem like it wants to do it but if we do public you int 16, if you hover over it, it represents a 16 bit unsigned integer, right? Which means if we do public int, let's do temp equals new short, you know, be the same thing, except this is unsigned, but they're both. Oh, this is you short. Okay, so if you do int 16. Yeah, there we go. So this an int 16 is the same thing as a short. Okay, it's a six in 16 is a 16 bit version of int or a short, if that makes sense. So we can easily just do short. Okay, so we're going to call this the notation type. Okay. And at the bottom, we're going to do hashtag region settings. Okay, I don't know why it gives us so much room done here. I don't like it. I like it when it's collapsed. And we're just going to set this to zero. Stop doing that. I don't like it. Okay. So zero is going to be our note our scientific notation. And yeah, we'll pretty much write this all down in our settings. Okay. So here we can do notation key right here we can do. There we go. Notation key and I did that by just typing this and then hitting enter and it automatically generates that notation key now I some ideas might not do that I'm not positive but it does for me. So this will be our notation key. So zero zero is going to equal to scientific one is going to equal to engineering that will be next episode to will equal to letter notation so ABCD 1000 equals a. Okay, now I hate the 1000 equals K and then it goes to ABCD etc. I don't like that. But this system you'll be able to customize that as you wish. Okay, and three beyond. And a or not a no answer. Okay, we don't anything for that. But we're just going to be setting this up. We're not going to be actually doing the notation thing because that would take a really long time, or not a long time but just I'd rather separate it out. Okay. Okay, so here we're going to make a public method we're going to do public void change notation in here. Also we need to access our public idol tutorial game or main script or main class. And in here, we will do var data equals game dot data, because we're using game dot data numerous times. And we're going to make a switch. And in here we'll do data dot notation type. Okay, so by default at zero. So we're gonna do case zero. And basically we're switching this is kind of like, it switches from zero to one, one to two, back to zero, right. And this is a pretty easy thing to do. You just do data dot notation type. Actually, what we can do here is be even more specific, we can do game dot data dot notation. And we can just really make this short and call this note. Now the thing we're doing here is that we are referencing a variable instead of a class. So I'll show you how to do something at the end because if we do this, it's not going to change this right? Okay, I'll show you how to do that. So we're going to set note to one, we're going to break or we can even just return it return. And for case one, we want to set note to two, because we want to switch it from engineering to letter notation. And then for case two, we just do note equals zero. So now switch between these three. Okay, and it will save. And now at the end, we need to do game dot data dot notation type equals note. Okay, now that should be good. This is just to make it look shorter. Oh, okay, we need a default, even though I don't think this is kind of stupid, but we don't need a default. But we're going to do default note equals zero return. Okay, I see, we can't do, we can't do this, we have to do break. Right. The reason why we can't do return is because it will return the entire void method. So instead, we want to break just to get out of this switch case. And then we can access this down here. There we go, we can get rid of this default. Okay, because by default, no, we'll already equal what it is. All right. Good, good, good. So now it'll change between we need to have our UI. So in here, we can just access it in here. And lastly, we can also have a public void start. Okay. So actually, let's make this private private. Okay, so now the notation type text is going to be set equal to we have a switch case here. Or what we can do is have another method called private void update notation text. Okay, and then here, we grab our switch case. And we can do this right here, the var note equals game data notation type. Put at the top. Okay, so now instead of changing things down here, we will just set. So if it's zero, it's going to say scientific, or science, it's going to say scientific notation. Okay. And then for one, it'll be letter or meant engineering. And then for two, it'll be letter notation. Cool. And you can honestly just put an example here, like 123 e four, for example. And for engineering, that would be e three 12.30 e three. And letter notation is 1.23 e b. And honestly, there's lots of ways people do this, you can you can we can even do more than one letter notation, we can have it so 1000 equals a, let's just comment this out. So 1000 equals a 10,000 equals b, or we can do it so 1000 equals a, or and then 1 million equals b. There's a lot of different ways to have this. We're probably going to do this way. Okay. So actually, this will be, yeah, this will be 12.30. Yeah, or just a like that. Okay. Now there's just so many ways people cannot agree on one notation to stick with sucks, but that's the reality, even though scientific notation should be the one everybody uses. Sadly, people still like letter notation. That's just the way it is. But it's okay. So now in private void start, we will call this update notation text. So then we're gonna put this at the very bottom here, just like that. And we should be good to go. All right. And notation, the change notation will be applied to our button. So we go to our button. And we're going to drag our settings manager and apply. Also, I really don't like when they say no function, it should just be called method. I don't like that. That's because when you go to a chat, people will say function sometimes, or like a uni server where people say function, it's called a method, not a function. And I know people get confused by that because JavaScript, you call them functions, not methods. It's kind of weird. Again, inconsistency, it sucks. So anyways, we will apply the change notation, go to our settings manager, drag the game manager and our type, our notation type text, save it, and we will run it. Oh, and it won't do anything, obviously, but we can just see this change. Now the changing stuff will be next episode. Whoa, we've been away for a while. A day. Cool. So it looks like I had to click it twice. So yeah, not switches. So let's see, let's go to let engineering notation and save it. I think that I see the issue here. It's this right here, we're calling this after we set this notation type to note. So what we do here is put at the very end, and it should work. Okay, so we have scientific notation engineering. Cool, we are on track. Alright, anyways, I hope you enjoyed this view. If you did make sure you leave a like comment your suggestions or anything questions, all that good stuff down in the comment section below. Subscribe to my channel if you're new or if you haven't subscribed yet, and turn on the bell for notifications and check out my videos in that corner. Anyway, thank you for watching. Have a good one. Peace.