ifDistFlag==0 ifDist=20 DistFlag=1; else ifDistFlag==1 ifms_Value=Ms_Cnt Ms_Cnt=1000 ifDist=20 DistFlag=2; else DistFlag=ms_Value=0;
This code checks for the distance between two objects and sets a flag based on the distance.
If the distance flag is zero and the distance is less than or equal to 20, the distance flag is set to one.
If the distance flag is one and the time value is less than or equal to one thousand (Ms_Cnt), the distance flag is set to two if the distance is still less than or equal to 20. Otherwise, the distance flag, as well as the time value, are set back to zero.
Note that the meaning of the variables Dist, DistFlag, ms_Value, and Ms_Cnt are not provided in the code snippet and must be defined elsewhere
原文地址: https://www.cveoy.top/t/topic/cRbz 著作权归作者所有。请勿转载和采集!