Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 在帧计数中使用条件语句是否正确编码?_Actionscript 3_Flash - Fatal编程技术网

Actionscript 3 在帧计数中使用条件语句是否正确编码?

Actionscript 3 在帧计数中使用条件语句是否正确编码?,actionscript-3,flash,Actionscript 3,Flash,例如: if (enemy.hit.currentFrame == enemy.hit.totalFrames) { //enemy hit animation end health -= enemy.damage; } 因为我想知道我的游戏是否可能会延迟导致跳过帧,从而导致代码无效?它将被保存,Flash不会跳过帧。如果应用程序滞后且渲染时间过长,帧速率将下降,而不是跳过帧

例如:

if (enemy.hit.currentFrame == enemy.hit.totalFrames) { //enemy hit animation end
    health -= enemy.damage;
}

因为我想知道我的游戏是否可能会延迟导致跳过帧,从而导致代码无效?

它将被保存,Flash不会跳过帧。如果应用程序滞后且渲染时间过长,帧速率将下降,而不是跳过帧