Action execution method and apparatus, storage medium, and electronic device
View Patent ↗This application discloses an action execution method in a virtual gaming environment performed at a terminal device. The method includes: setting a key status of a first virtual key in the virtual gaming environment to a touchable state in response to a target object associated with the first virtual key completes a first action; in response to a first touch operation performed on the first virtual key by a user of the computing device: resetting the key status of the first virtual key to an untouchable state; accelerating the target object to perform a second action for a predefined time period; and setting the key status of the first virtual key to the touchable state in response to the target object completes the second action.
1. A method performed in a virtual gaming environment by a computing device, the method comprising:
setting a key status of a first virtual key in the virtual gaming environment to a touchable state in response to a target object associated with the first virtual key completes a first action;
in response to a first touch operation performed on the first virtual key by a user of the computing device:
resetting the key status of the first virtual key to an untouchable state;
accelerating the target object to perform a second action for a predefined time period, wherein the first action and the second action are of a same type of action performed by the target object; and
setting the key status of the first virtual key to the touchable state in response to the target object completes the second action.
2. The method according to claim 1 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
determining a velocity vector of the target object for the second action; and
determining, according to the velocity vector, a target action trajectory of the target object for the second action, wherein a collision time generated in a process that the target object performs the second action according to the target action trajectory is less than a target threshold.
3. The method according to claim 1 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
determining a quantity of times that the first virtual key has been currently touched;
obtaining a target acceleration according to the quantity of times; and
controlling the target object to perform the second action according to the target acceleration.
4. The method according to claim 3 , wherein the obtaining a target acceleration according to the quantity of times comprises:
obtaining a target proportion matching the quantity of times;
increasing a traveling acceleration of the target object according to the target proportion, to obtain an updated traveling acceleration; and
using the updated traveling acceleration as the target acceleration.
5. The method according to claim 1 , wherein the second action is performed within a target time period of the first action.
6. The method according to claim 5 , wherein the second action is configured to cause an acceleration of the target object greater than that of the first action.
7. The method according to claim 5 , wherein there is no intervening action performed by the target object between the first action and the second action.
8. The method according to claim 1 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
detecting a long-press operation on a control key by the user of the computing device; and
controlling, in response to the long-press operation, the target object to perform the second action for the predefined time period.
9. A computing device, comprising a memory and a processor, the memory storing a plurality of computer programs, and the processor, when executing the plurality of computer programs, causing the computing device to perform a method in a virtual gaming environment, the method including:
setting a key status of a first virtual key in the virtual gaming environment to a touchable state in response to a target object associated with the first virtual key completes a first action;
in response to a first touch operation performed on the first virtual key by a user of the computing device:
resetting the key status of the first virtual key to an untouchable state;
accelerating the target object to perform a second action for a predefined time period, wherein the first action and the second action are of a same type of action performed by the target object; and
setting the key status of the first virtual key to the touchable state in response to the target object completes the second action.
10. The computing device according to claim 9 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
determining a velocity vector of the target object for the second action; and
determining, according to the velocity vector, a target action trajectory of the target object for the second action, wherein a collision time generated in a process that the target object performs the second action according to the target action trajectory is less than a target threshold.
11. The computing device according to claim 9 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
determining a quantity of times that the first virtual key has been currently touched;
obtaining a target acceleration according to the quantity of times; and
controlling the target object to perform the second action according to the target acceleration.
12. The computing device according to claim 11 , wherein the obtaining a target acceleration according to the quantity of times comprises:
obtaining a target proportion matching the quantity of times;
increasing a traveling acceleration of the target object according to the target proportion, to obtain an updated traveling acceleration; and
using the updated traveling acceleration as the target acceleration.
13. The computing device according to claim 9 , wherein the second action is performed within a target time period of the first action.
14. The computing device according to claim 13 , wherein the second action is configured to cause an acceleration of the target object greater than that of the first action.
15. The computing device according to claim 13 , wherein there is no intervening action performed by the target object between the first action and the second action.
16. The computing device according to claim 9 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
detecting a long-press operation on a control key by the user of the computing device; and
controlling, in response to the long-press operation, the target object to perform the second action for the predefined time period.
17. A non-transitory computer-readable storage medium, storing a plurality of computer programs, the computer programs, when executed by a processor of a computing device, causing the computing device to perform a method in a virtual gaming environment, the method including:
setting a key status of a first virtual key in the virtual gaming environment to a touchable state in response to a target object associated with the first virtual key completes a first action;
in response to a first touch operation performed on the first virtual key by a user of the computing device:
resetting the key status of the first virtual key to an untouchable state;
accelerating the target object to perform a second action for a predefined time period, wherein the first action and the second action are of a same type of action performed by the target object; and
setting the key status of the first virtual key to the touchable state in response to the target object completes the second action.
18. The non-transitory computer-readable storage medium according to claim 17 , wherein the accelerating the target object to perform a second action for a predefined time period comprises:
determining a quantity of times that the first virtual key has been currently touched;
obtaining a target acceleration according to the quantity of times; and
controlling the target object to perform the second action according to the target acceleration.
19. The non-transitory computer-readable storage medium according to claim 17 , wherein the second action is performed within a target time period of the first action.
20. The non-transitory computer-readable storage medium according to claim 19 , wherein the second action is configured to cause an acceleration of the target object greater than that of the first action.