/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void Mcut::play(ActMatter* owner)
{
	EventData* evdat = owner->getEventSystemRefer()->getEventData(); ASSERT(evdat != 0L);

	// ムービーカット定義開始
	_evid = evdat->addChildMatter(owner->getEvId(), "MOVIECUT"); ASSERT(_evid != 0);
	MovieCutMatter* vfmatter = (MovieCutMatter*)evdat->getMatterFromEvid(_evid); ASSERT(vfmatter != 0L);
	vfmatter->setting(&_setting);	// 動作設定
	// イベント開始
	EvCause evcause(EventCause::CID_ACT);
	owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

	Act::play(owner);
}
Beispiel #2
0
/*---------------------------------------------------------------------*//**
	動作停止
**//*---------------------------------------------------------------------*/
void Msg::stop(ActMatter* owner)
{
    EventData* evdat = owner->getEventSystemRefer()->getEventData();
    ASSERT(evdat != 0L);

    // メッセージを終了する
    TalkMatter* matter = (TalkMatter*)evdat->getMatterFromEvid(_evid);
    ASSERT(matter != 0L);
    matter->terminate();
    // マターを削除する
//	evdat->removeMatter(_evid);

    Act::stop(owner);
}
/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void ScrEff::play(ActMatter* owner)
{
	EventData* evdat = owner->getEventSystemRefer()->getEventData(); ASSERT(evdat != 0L);

	// スクリーンエフェクト開始
	_evid = evdat->addChildMatter(owner->getEvId(), "SCREFF"); ASSERT(_evid != 0);
	ScrEffMatter* matter = (ScrEffMatter*)evdat->getMatterFromEvid(_evid); ASSERT(matter != 0L);
	matter->setting(&_setting);	// 動作設定
	// イベント開始
	EvCause evcause(EventCause::CID_ACT);
	owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

	Act::play(owner);
}
/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void TexFacial::play(ActMatter* owner)
{
	EventData* evdat = owner->getEventSystemRefer()->getEventData(); ASSERT(evdat != 0L);

	// スプライト表示
	_evid = evdat->addChildMatter(owner->getEvId(), "TEXFACIAL"); ASSERT(_evid != 0);
	TexFacialMatter* matter = (TexFacialMatter*)evdat->getMatterFromEvid(_evid); ASSERT(matter != 0L);
	matter->setting(&_setting);	// 動作設定
	// イベント開始
	EvCause evcause(EventCause::CID_ACT);
	owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

	Game::getGame()->setWaitFrame();	// ゲームへ読み込み負荷のためのウェイトフレーム設定

	Act::play(owner);
}
/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void Rtmv::play(ActMatter* owner)
{
	EventData* evdat = owner->getEventSystemRefer()->getEventData(); ASSERT(evdat != 0L);

	// リアルタイムムービーを再生する
	_evid = evdat->addChildMatter(owner->getEvId(), "RTMOVIE"); ASSERT(_evid != 0);
	RealtimeMovieMatter* matter = (RealtimeMovieMatter*)evdat->getMatterFromEvid(_evid); ASSERT(matter != 0L);
	matter->setting(_fileid);	// 動作設定
	// イベント開始
	EvCause evcause(EventCause::CID_ACT);
	owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

	Game::getGame()->setWaitFrame();	// ゲームへ読み込み負荷のためのウェイトフレーム設定

	Act::play(owner);
}
Beispiel #6
0
/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void Msg::play(ActMatter* owner)
{
    EventData* evdat = owner->getEventSystemRefer()->getEventData();
    ASSERT(evdat != 0L);

    // メッセージを表示する
    _evid = evdat->addChildMatter(owner->getEvId(), "TALK");
    ASSERT(_evid != 0);
    TalkMatter* matter = (TalkMatter*)evdat->getMatterFromEvid(_evid);
    ASSERT(matter != 0L);
    matter->setting(&_setting, evdat->getMsgDataSet());	// 動作設定
    // イベント開始
    EvCause evcause(EventCause::CID_ACT);
    owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

    Act::play(owner);
}
/*---------------------------------------------------------------------*//**
	動作開始
**//*---------------------------------------------------------------------*/
void Prog::play(ActMatter* owner)
{
	EventData* evdat = owner->getEventSystemRefer()->getEventData();	ASSERT(evdat != 0L);

	// カスタムプログラムを再生する
	ASSERT(_name != 0L);
	_evid = evdat->addChildMatter(owner->getEvId(), _name);				ASSERT(_evid != 0);
	EvMatter* matter = evdat->getMatterFromEvid(_evid);
	if(matter != 0L)
	{
		matter->setPreserveParam(owner->getPreserveParam());	// プログラムでの取得・解析用に ActMatter の保持パラメータを渡す
		if(matter->getMatterType() == EMTYPE_PROG)
		{
			((ProgMatter*)matter)->setting(&_setting);	// 動作設定
		}
	}
	// イベント開始
	EvCause evcause(EventCause::CID_ACT);
	owner->getEventSystemRefer()->begin(_evid, owner->getBeginParam(), &evcause);

	Act::play(owner);
}
/*---------------------------------------------------------------------*//**
	フレーム処理実装
**//*---------------------------------------------------------------------*/
void QsEmp_ConfirmContract::execImplement(ExecRes* res, const ExecCtx* ec, f32 frameBegun)
{
	GameGui* gui = Game::getGame()->getGui(); ASSERT(gui != 0L);
	GameSysMsgWindow* wndSysMsg = (GameSysMsgWindow*)gui->getSysMsgWindow(); ASSERT(wndSysMsg != 0L);
	ScreenEffect* screff = Game::getGame()->getSceneScreenEffect(); ASSERT(screff != 0L);

	switch(getStep())
	{
	case STEP_WAIT_BEGIN:		// 継続監視
		///STRACE("!!! WAIT...\n");
		if(!getOwner()->checkBegunOtherMatter(this, true))	// 自身以外のイベントが起動していない
		{
			// メッセージを得る
			EventData* evdat = getOwner()->getEventData(); ASSERT(evdat != 0L);
			const MsgDataSet* msgdatset = evdat->getMsgDataSet(); ASSERT(msgdatset != 0L);
			// YES / NO メッセージウインドウを表示する
			wndSysMsg->setKind(MessageWindow::KIND_YESNO);
			wndSysMsg->showMessage(GameFixedStrTbl::getString(GameFixedStrTbl::SID_QUEST_CONFIRM_CONTRACT), MSGWND_CTRL_HINT);

			// 次のステップへ
			advanceStep();
		}
		break;
	case STEP_WAIT_YESNO:
		{
			const GameSysMsgWindow::Result* res = wndSysMsg->getResult();
			if(res->isClickYesButton())
			{
				// ウインドウを閉じる
				wndSysMsg->showWindow(false);

				// スプライトを読み込む
				_sprite->create(FILEID_CONV_LANG(QUESTEVENT_SPRITE_QUESTACCEPT_EN_PNG), 0, true, 0x000000ff, true);

				// SE 再生
				Game::getGame()->getSoundManager()->playUiSe(GameSoundDef::SE_QUEST_ADV, false);

				// 次のステップへ
				advanceStep();
			}
			else if(res->isClickNoButton())
			{
				// ウインドウを閉じる
				wndSysMsg->showWindow(false);

				// 終了
				end();

				// 親マターも終了してイベントを閉じる
				EventData* evdat = getOwner()->getEventData(); ASSERT(evdat != 0L);
				EvMatter* matter = evdat->getMatterFromEvid(getParentEvId());
				if(matter != 0L) { matter->end(); }
			}
		}
		break;
	case STEP_WAIT_EFFECT:
		if(_sprite->isEnd())
		{
			// フェードアウト
			ColorU8 colBlack(0, 0, 0, 255);
			screff->setColor1(&colBlack);
			screff->setMaxFrame(60);
			screff->start(ScreenEffect::MODE_FADE_OUT);

			// 次のステップへ
			advanceStep();
		}
		_sprite->exec(ec);
		break;
	case STEP_WAIT_FOUT:
		if(!screff->isWorking())
		{
			// クエスト受託
			contractQuest();

			// フェードインへ
			ColorU8 colBlack(0, 0, 0, 255);
			screff->setColor1(&colBlack);
			screff->setMaxFrame(30);
			screff->start(ScreenEffect::MODE_FADE_IN);
			// 次のステップへ
			advanceStep();
		}
		break;
	case STEP_WAIT_FIN:
		if(!screff->isWorking())
		{
			screff->end(0);
			end();
		}
		break;
	}
}