Скачиваний:
17
Добавлен:
01.05.2014
Размер:
1.1 Кб
Скачать
// Officer.cpp: implementation of the COfficer class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Officer.h"
#include "LSYSLIB\FDelayCLK.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

extern LArc OfficerTBL[];
COfficer::COfficer(TNetFsa *pNetFsa):CRifleman(0,pNetFsa,OfficerTBL)
{
	bCommandFair = false;
}

COfficer::~COfficer() { }

LArc OfficerTBL[] = {
	LArc("сон",		"огонь",	"x1", 	"y1"),
	LArc("огонь",	"ждать",	"--", 	"y2"),
	LArc("ждать",	"все",		"x2", 	"y3"),
	LArc("все",		"00",		"--", 	"--"),
	LArc()
  };

int COfficer::x1() { return bCommandFair; }

int COfficer::x2() { return string(pFsaRightMan->FGetState()) == "сон"; }

void COfficer::y1() { bCommandFair = false; }

void COfficer::y2() { 
	FDelayCLK *pCFDelay;
	pCFDelay = new FDelayCLK(1);
	pCFDelay->FCall(this);
}

void COfficer::y3() { 
}

void COfficer::SetCommand() { bCommandFair = true; }
Соседние файлы в папке Shot