Example #1
0
    int main (int argc, char *argv[]) {
		int count[26]={0};
		char c;
     
       // getchar() reads and returns one character from the keyboard
       // returns -1 when it reads end-of-file character (^D in linux)
       while (!feof(stdin)) {
			c = getchar();
			//putchar(c);
			charcount(count,c);
       }
	   charStat(count);
       return EXIT_SUCCESS;
    }
/*---------------------------------------------------------------------*//**
	スキルフレーム処理 - 実行中
**//*---------------------------------------------------------------------*/
bool Char1401_Ungetsuiwa_EnemySpirit::execSkillAct(ExecRes* res, const ExecCtx* ec, s32 cntStep, f32 frmcntStep)
{
	const f32 FRAME_STEP = 10.0f * FRAMERATE;

	if(cntStep == 1)
	{
		setBefaviorMaxFrame(FRAME_STEP);	// 最大の行動フレーム数設定
	}

	setBefaviorCurrentFrame(frmcntStep);	// 現在の行動フレーム数設定

	// ガード処理
	CharStat* cstatSelf = charStat();
	cstatSelf->guardingFrame();	// 防御

	// 終了フレームまで実行
	if(frmcntStep >= FRAME_STEP)
	{
		resetBefaviorFrame();	// 行動フレームリセット
		return true;	// 次のステップへ
	}

	return false;	// 継続する
}