How can i do something like this if (Input.GetKeyDown("w") * Time.deltaTime)
because i want to play particle rapidly while it is pressed.
I think you will need to more clearly define
I have no idea what that means. Do you want the speed of the particle system to increase every time the use presses the key? Do you want the quantity of particles to increase every frame while the user holds the button? Something else entirely?
If you use Input.GetKeyDown() only returns true on the first frame after the button is pressed. Input.GetKey() will return true every frame as long as the button is held down. If you check that inside of Update() or FixedUpdate(), it will do something every frame or every fixed-updated, respectively. (Note: Normally you shouldn’t check input anywhere but from Update because you may miss input events, but I believe checking if a key is held down should be OK to do in FixedUpdate.)
If you want to do something less often than once per update (which is usually the case), then you need to use a variable to remember the last time you did the thing, and check if the elapsed time since then is long enough to do it again.
Thanks for help it worked.