private void SetSe() { if (!this.skipStatus.invalidRestart) { ScriptCommandParams.SeInfo info = this.scriptEngine.GetSeInfo(); if (info.play && info.loop) { if (!this.tutorialStatus.loopSeInfo.Any((ScriptCommandParams.SeInfo x) => x.fileName == info.fileName)) { this.tutorialStatus.loopSeInfo.Add(info); } } else if (this.tutorialStatus.loopSeInfo.Any((ScriptCommandParams.SeInfo x) => x.fileName == info.fileName)) { int index = this.tutorialStatus.loopSeInfo.FindIndex((ScriptCommandParams.SeInfo x) => x.fileName == info.fileName); this.tutorialStatus.loopSeInfo.RemoveAt(index); } } }
private void SetSe() { ScriptCommandParams.SeInfo info = this.scriptEngine.GetSeInfo(); if (info.loop) { if (!this.seLoopPlayList.Any((ScriptCommandParams.SeInfo x) => x.fileName == info.fileName)) { this.seLoopPlayList.Add(info); } else { this.seLoopPlayList = this.seLoopPlayList.ConvertAll <ScriptCommandParams.SeInfo>(delegate(ScriptCommandParams.SeInfo x) { if (x.fileName == info.fileName) { x.play = info.play; } return(x); }); } } }
public void SkipCommand(TutorialCommandSkip.SkipMode mode) { this.skipMode = mode; this.scriptEngine.StartSkip(new Action <ScriptEngine.Status, int>(base.ActionScriptCommand)); if (!string.IsNullOrEmpty(this.charaFaceId)) { this.tutorialUI.Thumbnail.SetFace(this.charaFaceId); } if (this.screenShake == TutorialCommandSkip.ScreenShakeActionType.START) { ScriptCommandParams.ShakeInfo shakeInfo = this.scriptEngine.GetShakeInfo(); this.controlToGame.ShakeBackGround(shakeInfo.intensity, 0f, null); } else if (this.screenShake == TutorialCommandSkip.ScreenShakeActionType.STOP) { this.controlToGame.SuspendShakeBackGround(); } if (this.screenEffect == TutorialCommandSkip.ScreenEffectSirenActionType.START) { ScriptCommandParams.ScreenEffectInfo screenEffectInfo = this.scriptEngine.GetScreenEffectInfo(); this.controlToGame.StartEffect(screenEffectInfo.type, null); } else if (this.screenEffect == TutorialCommandSkip.ScreenEffectSirenActionType.STOP) { ScriptCommandParams.ScreenEffectInfo screenEffectInfo2 = this.scriptEngine.GetScreenEffectInfo(); this.controlToGame.StopEffect(screenEffectInfo2.type); } if (0 < this.seLoopPlayList.Count) { for (int i = 0; i < this.seLoopPlayList.Count; i++) { ScriptCommandParams.SeInfo seInfo = this.seLoopPlayList[i]; this.controlToGame.SetSe(seInfo.fileName, seInfo.play, 0f, true, seInfo.pitch); } } base.ResumeScript(); }
public void CreateScreenParts(TutorialCreateRestartScreen createRestartScreen) { ScriptEngine scriptEngine = this.scriptEngine; if (this.tutorialStatus.displayTextWindow) { ScriptCommandParams.WindowInfo windowInfo = scriptEngine.GetWindowInfo(); createRestartScreen.OpenMessageWindow(windowInfo.xFromCenter, windowInfo.yFromCenter); ScriptCommandParams.TextInfo textInfo = scriptEngine.GetTextInfo(); TutorialMaster.NaviMessage naviMessage = MasterDataMng.Instance().Tutorial.GetNaviMessage(textInfo.displayText); this.tutorialUI.MessageWindow.SetDisplayMessage(naviMessage.message); } if (this.tutorialStatus.displayNonFrameText) { this.tutorialUI.NonFrameText.Open(NGUIText.Alignment.Center); } if (this.tutorialStatus.displayChara) { ScriptCommandParams.CharaInfo charaInfo = scriptEngine.GetCharaInfo(); createRestartScreen.DisplayChara(charaInfo.type, this.tutorialStatus.charaFaceId, charaInfo.yFromCenter); } if (this.scriptEngine.GetMaskEnableFlag()) { createRestartScreen.DisplayScreenMask(); } if (this.tutorialStatus.displayTargetPopUI) { ScriptCommandParams.UIInfo uiInfo = this.scriptEngine.GetUiInfo(); createRestartScreen.DisplayUIPop(uiInfo.type, uiInfo.arrowPosition, this.controlToGame); } if (this.tutorialStatus.farmCameraMove) { ScriptCommandParams.FarmCameraMoveInfo farmCameraMoveInfo = this.scriptEngine.GetFarmCameraMoveInfo(); createRestartScreen.SetFarmCameraPosition(farmCameraMoveInfo.posGridX, farmCameraMoveInfo.posGridY, this.controlToGame); } if (this.tutorialStatus.shakeBackGround) { ScriptCommandParams.ShakeInfo shakeInfo = this.scriptEngine.GetShakeInfo(); createRestartScreen.ShakeBackGround(shakeInfo.intensity, shakeInfo.decay, this.controlToGame); } if (0 < this.tutorialStatus.farmBuildCompleteList.Count) { createRestartScreen.FacilityBuildComplete(this.tutorialStatus.farmBuildCompleteList, this.controlToGame); } if (this.scriptEngine.GetSelectFacilityInfo().selected) { createRestartScreen.SetSelectFarmFacility(this.scriptEngine.GetSelectFacilityInfo().id, this.controlToGame); } if (this.scriptEngine.GetTargetFacilityInfo().popEnable) { ScriptCommandParams.TargetFacilityInfo targetFacilityInfo = this.scriptEngine.GetTargetFacilityInfo(); createRestartScreen.SetTargetFarmFacility(targetFacilityInfo.id, targetFacilityInfo.popEnable, this.controlToGame, targetFacilityInfo.adjustY); } if (this.tutorialStatus.displayDigimon) { ScriptCommandParams.DigimonInfo digimonInfo = this.scriptEngine.GetDigimonInfo(); createRestartScreen.DisplayDigimon(digimonInfo.monsterGroupID, digimonInfo.scale, digimonInfo.adjustPosition, this.controlToGame); } if (this.tutorialStatus.digimonChange) { createRestartScreen.LocalDigimonEvolution(this.controlToGame); } if (this.tutorialStatus.displaySkipButton) { this.tutorialUI.SetSkipButton(true, null); } if (this.scriptEngine.GetScreenEffectInfo().start) { createRestartScreen.DisplayScreenEffect(this.scriptEngine.GetScreenEffectInfo().type, this.controlToGame); } if (this.tutorialStatus.bgmCommandEnable) { ScriptCommandParams.BgmInfo bgmInfo = this.tutorialStatus.bgmInfo; this.controlToGame.SetBgm(bgmInfo.fileName, bgmInfo.play, bgmInfo.fadeTime); } if (0 < this.tutorialStatus.loopSeInfo.Count) { for (int i = 0; i < this.tutorialStatus.loopSeInfo.Count; i++) { ScriptCommandParams.SeInfo seInfo = this.tutorialStatus.loopSeInfo[i]; this.controlToGame.SetSe(seInfo.fileName, seInfo.play, seInfo.fadeTime, seInfo.loop, seInfo.pitch); } } }
private void SetSe() { ScriptCommandParams.SeInfo seInfo = this.scriptEngine.GetSeInfo(); this.controlToGame.SetSe(seInfo.fileName, seInfo.play, seInfo.fadeTime, seInfo.loop, seInfo.pitch); }