1、从右向左流动,从左向右流动,从下向上流动,从上向下流动,水流 C 控制,#include “apdefap.h“long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) static int a=209; if(!GetTagBit(“油泵“)a=209; else if (a500) a=a+15;else if (GetTagBit(“油泵“) a=209;return a; ,static int a=209; 设置C变量 a; 声明C变量 a的数据格式是整型数据int; 定义C变量a的
2、开始数据时209(X坐标起始值)。,从左向右流动,if(!GetTagBit(“油泵“)a=209; 如果外部变量“油泵”(二进制)为0(油泵没启动); 图形在起始位置不动。 C语言使用判断语句: IF (条件)为真,执行a=209;,static int a=209; if(!GetTagBit(“油泵“)a=209; else if (a500) a=a+15;else if (GetTagBit(“油泵“) a=209;return a;,static int a=209; if(!GetTagBit(“油泵“)a=209;else if (a900) a=a+15;else if (G
3、etTagBit(“油泵“) a=209;return a; ,static int a=77; if(!GetTagBit(“油泵“)a=77; else if (a764) a=a+15;else if (GetTagBit(“油泵“) a=77;return a; ,#include “apdefap.h“long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) static int i=659; if(!GetTagBit(“oil_pump1“)i=650; else if (i53
4、2) i=i-5;else if (GetTagBit(“oil_pump1“) i=659;return i; ,从右向左流动,从下向上流动,#include “apdefap.h“long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) static int b=608; if(!GetTagBit(“oil_pump4“)b=608; elseif (b528) b=b-10;else if(GetTagBit(“oil_pump4“)b=608; return b; ,#include
5、 “apdefap.h“long _main(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName) static int b=507; if(!GetTagBit(“oil_pump5“)b=507; elseif (b=586) b=b+15;else if(GetTagBit(“oil_pump5“)b=507; return b; ,从上向下流动,车移动 C 动作,#include “apdefap.h“long _main(char* lpszPictureName, char* lpszObjectN
6、ame, char* lpszPropertyName) static int x=40; if(GetTagBit(“gate_men”) if(x=40 ,static int x=40; if(GetTagBit(“gate_men“)外部变量gate_men(二进制) if(x=40,if(x=700) SetTagBit(“che_dao_wei“,1); else SetTagBit(“che_dao_wei“,0); if(x=990) SetTagBit(“off_oil_full“,1); else SetTagBit(“off_oil_full“,0); return x;,全为二进制外部变量,