[ad_1]
That is an attention-grabbing query I’ve, so I ask you to listen to me out. No, I am not simply going to ask “how do I do that” and hope somebody will give me code.
I have been programming for a very long time and am starting work on a side-project, a text-based recreation.
With out going into particulars, the sport wants instructions (a Console.ReadLine()
type of scenario) but in addition wants timer-based methods (say, as an example, lowering a variable vitality
each 10 seconds)
I’ve racked my mind about find out how to accomplish this, however got here up empty handed.
My greatest guess is utilizing asynchronous features however I do not totally perceive these they usually do not look like they are going to accomplish what I am after.
TL;DR I would like to have the ability to use Console.ReadLine()
and likewise improve/lower a variable each n
milliseconds (even whereas ready for the console enter).
I feel threading is likely to be a approach to do it, however that appears extreme for a [relatively] easy usecase.
Can anybody present perception about find out how to accomplish this?
Thanks prematurely.
[ad_2]