I wanted to add more than one way to tell the story (dialogue) in the game. I'll continue to trying to come up with systems that can help the story flow by adding more tools for narrative purpose.
I decided to add an email system. My prerequisites was: reading a mail that can contain text/image, must go through the save system, making a "intuitive enough" UI template.
I started by creating the Mail scriptable object :
With that I had all my raw data for a basic mail. My first step is to make it "savable", in other words, making it Serializable.
I created an object called MailCollection that store all emails in the project. It also contain all the logic to Convert the mail to something I can save/load : SerializedMail.
SerializedMail contain only the bool value of the mail (it would be useless to save anything else).
The next step was to find a way to display that on screen.
I decided to use the MinigameSystem for that, so i can code some behaviours more freely.
After a few other lines of code, here's the end result:
I decided to add an email system. My prerequisites was: reading a mail that can contain text/image, must go through the save system, making a "intuitive enough" UI template.
I started by creating the Mail scriptable object :
With that I had all my raw data for a basic mail. My first step is to make it "savable", in other words, making it Serializable.
I created an object called MailCollection that store all emails in the project. It also contain all the logic to Convert the mail to something I can save/load : SerializedMail.
SerializedMail contain only the bool value of the mail (it would be useless to save anything else).
The next step was to find a way to display that on screen.
I decided to use the MinigameSystem for that, so i can code some behaviours more freely.
After a few other lines of code, here's the end result: