- Home /
Creating a timer for combat (C#)
Hi, I would like to clarify that I don't want you to do this for me. I would however like for you to point me in the right direction by supplying me with any relevant methods I could use etc.
If anyone's played runescape or other such games, basic attacks occur looped on a consistent basis, say 1 attack every second or so. This is what I am trying to achieve.
I don't know how to go about doing this, I maybe would like to implement a timer which other classes can use to decide their own responses. So if you have ANY relevant information which might make this easier on me that would be awesome!
Answer by robertbu · Apr 23, 2014 at 07:10 PM
See:
Or you can manipulate a timer by adding 'Time.deltaTime' to a float each frame and then processing the result.
Note these three methods behave differently in some situations like setting Time.timeScale to 0.0 or what happens when the game object is disabled.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Need help with my "simple" crafting system 1 Answer
Stop from showing point value 1 Answer
How to realize accurate time counter (millisecond precision) 3 Answers