Средства разработки приложений


Листинг 2


Модель командира class COfficer : public CRifleman { public: COfficer(); virtual ~COfficer(); void SetCommand(); protected: CFireApp *pApp; // int x1(); // Is fire? void y1(); bool bCommandFire; }; extern LArc OfficerTBL[]; COfficer::COfficer():CRifleman (0,NULL,OfficerTBL) { bCommandFire = false; pApp = (CFireApp*)AfxGetApp(); // FLoad(pApp->pNetFsa,1); // подключить объект к КА-сети } COfficer::~COfficer() { } LArc OfficerTBL[] = { LArc("Сон", "Огонь", "x1", "y1"), LArc("Огонь", "Сон", "-", "-"), LArc() }; int COfficer::x1() { return bCommandFire; } void COfficer::y1() { bCommandFire = false; } void COfficer::SetCommand() { bCommandFire = true; }


Начало  Назад  Вперед



Книжный магазин