Hi there,
I am working on a mobile game and I want my consumable items to apply buffs/debuffs to the player.
I need the buff to have an effect on the player, and to do this I want to set a bool to true (playerIsFatigued for example). This Buff will then set a DateTime value to say when it expires and the bool will then be set to false once the buff has ran out.
My main problem is, I need to serialise these DateTime values, so that the player cannot just restart the game to remove the buff. I would also need to then set up some code to see how long the player was offline for, and then set a TimeSpan value of some sort to calculate how much longer the buff will last… This for each different DeBuff that I plan to add is a lot of work, is there anything simpler?
I have already tampered with a system like this, but it is quite troublesome and I was wondering if there was an easier way to go about doing it that doesn’t use DateTime? But I would still want to use real world time for this…
Thanks for the help, and if you have any questions just let me know, any suggestion is appreciated!