public override void DoCommand(AdvEngine engine) { if (IsEnable(engine.Param)) { engine.ScenarioPlayer.JumpManager.RegistoreLabel(jumpLabel); } }
/// <summary> /// 初期化。スクリプトから動的に生成する場合に /// </summary> /// <param name="engine">ADVエンジン</param> public void InitOnCreate(AdvEngine engine, AdvUiMessageWindow messageWindow, AdvUiSelectionManager selection, AdvUiBacklogManager backLog) { this.engine = engine; this.messageWindow = messageWindow; this.selection = selection; this.backLog = backLog; }
public override void DoCommand(AdvEngine engine) { if (IsEnable(engine.Param)) { engine.ScenarioPlayer.JumpManager.AddRandom(jumpLabel,rate); } }
public override void DoCommand(AdvEngine engine) { if (exp == null || engine.Param.CalcExpressionBoolean(exp)) { engine.SelectionManager.AddSelectionClick(jumpLabel, name, isPolygon, selectedExp, RowData ); } }
public override void DoCommand(AdvEngine engine) { //ページコントローラー処理 engine.Page.Contoller.Update( this.pageCtrlType ); engine.Page.ChangeMessageWindowText(text, windowType); if (text.Length > 0) engine.BacklogManager.Add(engine.Page.TextData.NoneMetaString); }
/// <summary> /// 初期化。スクリプトから動的に生成する場合に /// </summary> /// <param name="engine">ADVエンジン</param> public void InitOnCreate(AdvEngine engine, TextArea2D text, TextArea2D nameText, GameObject rootChildren, Node2D transrateMessageWindowRoot) { this.engine = engine; this.text = text; this.nameText = nameText; this.rootChildren = rootChildren; this.transrateMessageWindowRoot = transrateMessageWindowRoot; }
public override bool Wait(AdvEngine engine) { if (engine.UiManager.IsPointerDowned) { WrapperMoviePlayer.Cancel(); } bool isWait = WrapperMoviePlayer.IsPlaying(); return isWait; }
//テキストに変更があった場合 public void OnPageTextChange(AdvEngine engine) { List<AdvGraphicObject> graphics = engine.GraphicManager.CharacterManager.AllGraphics(); foreach (AdvGraphicObject obj in graphics) { Color color = GetColor(engine, obj); obj.EffectColors.SetColor(EffectColors.Index.Color1, color); } }
//テクスチャパスからグラフィック情報を取得(古いバージョンのセーブデータを読むのに使う) internal static GraphicInfoList FindGraphicInfoFromTexturePath(AdvEngine engine, string texturePath) { GraphicInfoList graphic = engine.DataManager.SettingDataManager.CharacterSetting.FindFromPath(texturePath); if (graphic != null) return graphic; graphic = engine.DataManager.SettingDataManager.TextureSetting.FindFromPath(texturePath); if (graphic != null) return graphic; return new GraphicInfoList(texturePath); }
public override void DoCommand(AdvEngine engine) { engine.SystemSaveData.GalleryData.AddCgLabel(label); //表示する engine.GraphicManager.IsEventMode = true; //キャラクターは非表示にする engine.GraphicManager.CharacterManager.FadeOutAll(graphicOperaitonArg.FadeTime); //表示する engine.GraphicManager.BgManager.DrawToDefault(engine.GraphicManager.BgSpriteName, graphicOperaitonArg); }
/// <summary> /// 起動時初期化 /// </summary> /// <param name="setting">レイヤー設定データ</param> public void BootInit(AdvEngine engine, AdvLayerSetting setting) { this.engine = engine; allGruop.Clear(); foreach( AdvLayerSettingData.LayerType type in Enum.GetValues(typeof(AdvLayerSettingData.LayerType) )) { AdvGraphicGroup group = new AdvGraphicGroup(type, setting, this); allGruop.Add(group); } }
public bool TryPlayVoice(AdvEngine engine, AdvBacklog backlog) { if (backlog.IsVoice) { StartCoroutine(CoPlayVoice(engine, backlog.VoiceFile, backlog.CharacterLabel )); return true; } else { return false; } }
//指定のタイプ、キーのGraphicを取得 internal static GraphicInfoList FindGraphicInfo(AdvEngine engine, string dataType, string key) { switch (dataType) { case GraphicInfoList.TypeFilePath: return new GraphicInfoList(key); case TypeCharacter: return engine.DataManager.SettingDataManager.CharacterSetting.KeyToGraphicInfo(key); case TypeTexture: default: return engine.DataManager.SettingDataManager.TextureSetting.LabelToGraphic(key); } }
//コマンド終了待ち public override bool Wait(AdvEngine engine) { if (engine.SelectionManager.IsSelected) { AdvSelection selected = engine.SelectionManager.Selected; string label = selected.JumpLabel; if (selected.Exp != null) { engine.Param.CalcExpression(selected.Exp); } engine.SelectionManager.Clear(); engine.ScenarioPlayer.JumpManager.RegistoreLabel(label); return false; } return true; }
public override void DoCommand(AdvEngine engine) { //ページコントローラー処理 engine.Page.Contoller.Update( this.pageCtrlType ); //キャラクター表示更新 if (!engine.GraphicManager.IsEventMode) { //非表示なら if (characterInfo.IsHide) { engine.GraphicManager.CharacterManager.FadeOut( characterInfo.Label, graphicOperaitonArg.FadeTime ); } else { if ( characterInfo.Graphic == null || characterInfo.Graphic.Main == null) { } else { //パターン指定なしで、既に同名のキャラがいるなら、表示パターンを引き継ぐ仕様は廃止? //if (data.CharacterInfo.IsNonePattern && IsContiansDefalutGraphic(data.Name)) //表示する engine.GraphicManager.CharacterManager.DrawCharacter(layerName, characterInfo.Label, graphicOperaitonArg); } } } if (null != voiceFile) { engine.SoundManager.PlayVoice(characterInfo.Label, voiceFile); } if (text.Length > 0) { engine.Page.ChangeMessageWindowText(characterInfo.NameText, characterInfo.Label, text, windowType); engine.BacklogManager.Add(engine.Page.TextData.NoneMetaString, characterInfo, voiceFile); } }
/// <summary> /// 初期化 /// </summary> public void Init(AdvEngine engine) { this.engine = engine; string saveDir = FileIOManager.SdkPersistentDataPath + DirectoryName + "/"; //セーブデータのディレクトリがなければ作成 FileIOManager.CreateDirectory(saveDir); path = saveDir + FileName; isInit = true; if ( DontUseSystemSaveData || !FileIOManager.Exists(Path)) { //デフォルト値で初期化 InitDefault(); } else { if (!FileIOManager.ReadBinaryDecode(Path, ReadBinary)) { //デフォルト値で初期化 InitDefault(); } } }
public override void DoCommand(AdvEngine engine) { engine.SoundManager.Play(SoundManager.StreamType.Ambience, file, isLoop, false); }
static void OnChangeScene() { AdvEditorSettingWindow editorSetting = AdvEditorSettingWindow.GetInstance(); if (UnityEngine.Object.ReferenceEquals(editorSetting, null)) { return; } AdvEngine engine = null; AdvEngineStarter starter = null; //宴のシーンが切り替わったら、自動でプロジェクトを変更するか if (editorSetting.AutoChangeProject) { if (engine == null) { engine = UtageEditorToolKit.FindComponentAllInTheScene <AdvEngine>(); } starter = UtageEditorToolKit.FindComponentAllInTheScene <AdvEngineStarter>(); if (engine == null || starter == null) { return; } CheckCurrentProject(engine, starter); } //宴のシーンが切り替わったら、自動でシーンのチェックをするか if (editorSetting.AutoCheckScene) { engine = UtageEditorToolKit.FindComponentAllInTheScene <AdvEngine>(); if (engine == null) { return; } //Unityのバージョンアップによる致命的な不具合をチェックする if (editorSetting.AutoCheckUnityVersionUp && CheckVersionUpScene(engine)) { if (EditorUtility.DisplayDialog( "UTAGE Version Up Scene" , LanguageSystemText.LocalizeText(SystemText.VersionUpScene) , LanguageSystemText.LocalizeText(SystemText.Yes) , "Cancel") ) { VersionUpScene(engine); } } if (starter != null && !starter.EditorCheckVersion()) { AdvScenarioDataProject project = starter.ScenarioDataProject as AdvScenarioDataProject; if (project != null) { if (EditorUtility.DisplayDialog( "UTAGE Version Up Sccenario" , LanguageSystemText.LocalizeText(SystemText.VersionUpScenario) , LanguageSystemText.LocalizeText(SystemText.Yes) , "Cancel") ) { AdvScenarioDataBuilderWindow.Import(); starter.Scenarios = project.Scenarios; starter.EditorVersionUp(); } } } } }
public override void DoCommand(AdvEngine engine) { engine.Param.SetParameterInt("seed", (int)(Time.get_time() * 10000f)); }
public override void DoCommand(AdvEngine engine) { float fadetime = engine.Page.CheckSkip() ? time / engine.Config.SkipSpped : time; engine.TransitionManager.FadeIn(fadetime, color); }
public override void DoCommand(AdvEngine engine) { engine.Config.StopSkipInSelection(); engine.SelectionManager.StartWaiting(); engine.Page.SetSelectionWait(); }
/// <summary> /// ボイスの再生 /// </summary> /// <param name="index">バックログのインデックス</param> /// <returns>成否</returns> public bool TryPlayVoice(AdvEngine engine, int index) { return TryPlayVoice(engine,Backlogs[index]); }
public override void DoCommand(AdvEngine engine) { engine.GraphicManager.BgManager.FadeOutAll(this.fadeTime); }
public override void DoCommand(AdvEngine engine) { this.inputCanvas.ShowInputPanel(engine); }
//エフェクト開始時のコールバック protected override void OnStartEffect(GameObject target, AdvEngine engine, AdvScenarioThread thread) { Camera camera = target.GetComponentInChildren <Camera>(true); ImageEffectBase imageEffect; bool alreadyEnabled; if (!ImageEffectUtil.TryGetComonentCreateIfMissing(imageEffectType, out imageEffect, out alreadyEnabled, camera.gameObject)) { Complete(imageEffect, thread); return; } if (!inverse) { imageEffect.enabled = true; } bool enableAnimation = !string.IsNullOrEmpty(animationName); bool enableFadeStregth = imageEffect is IImageEffectStrength; if (!enableFadeStregth && !enableAnimation) { Complete(imageEffect, thread); return; } if (enableFadeStregth) { IImageEffectStrength fade = imageEffect as IImageEffectStrength; float start = inverse ? fade.Strength : 0; float end = inverse ? 0 : 1; Timer timer = camera.gameObject.AddComponent <Timer>(); timer.AutoDestroy = true; timer.StartTimer( engine.Page.ToSkippedTime(this.time), (x) => { fade.Strength = x.GetCurve(start, end); }, (x) => { if (!enableAnimation) { Complete(imageEffect, thread); } }); } if (enableAnimation) { //アニメーションの適用 AdvAnimationData animationData = engine.DataManager.SettingDataManager.AnimationSetting.Find(animationName); if (animationData == null) { Debug.LogError(RowData.ToErrorString("Animation " + animationName + " is not found")); Complete(imageEffect, thread); return; } AdvAnimationPlayer player = camera.gameObject.AddComponent <AdvAnimationPlayer>(); player.AutoDestory = true; player.EnableSave = true; player.Play(animationData.Clip, engine.Page.SkippedSpeed, () => { Complete(imageEffect, thread); }); } }
protected override void OnStartEffect(GameObject target, AdvEngine engine, AdvScenarioThread thread) {
/// <summary> /// 初期化。スクリプトから動的に生成する場合に /// </summary> /// <param name="engine">ADVエンジン</param> public void InitOnCreate(AdvEngine engine, AdvUguiSelection selectionItemPrefab) { this.engine = engine; this.ListView.ItemPrefab = selectionItemPrefab.gameObject; }
public override bool Wait(AdvEngine engine) { return(this.inputCanvas.wait); }
//コマンド終了待ち public virtual bool Wait(AdvEngine engine) { return false; }
public override void DoCommand(AdvEngine engine) { engine.ScenarioPlayer.IfManager.ElseIf(engine.Param, exp); }
public override void DoCommand(AdvEngine engine) { this.countDownManager.StopCountdown(); }
public override bool Wait(AdvEngine engine) { UtageToolKit.SafeSendMessage(this, engine.ScenarioPlayer.SendMessageTarget, "OnWait"); return IsWait; }
/// <summary> /// 初期化。スクリプトから動的に生成する場合に /// </summary> /// <param name="engine">ADVエンジン</param> public void InitOnCreate(AdvEngine engine, AdvUiBacklog backlogItemPrefab) { this.engine = engine; this.ListView.ItemPrefab = backlogItemPrefab.GetComponent <ListViewItem>(); }
public override void DoCommand(AdvEngine engine) { engine.SoundManager.Play(SoundManager.StreamType.Bgm, file, true, false); }
public override bool Wait(AdvEngine engine) { return engine.Page.IsWaitText; }
public override void DoCommand(AdvEngine engine) { engine.MessageWindowManager.ChangeCurrentWindow(name); }
public override void DoCommand(AdvEngine engine) { this.imControl.ClearMessage(); }
public override bool Wait(AdvEngine engine) { return(engine.TransitionManager.IsWait); }
private bool CheckNewCharacterInfo(AdvEngine engine) { return((engine.Page.CharacterLabel != this.characterInfo.Label) || ((engine.Page.NameText != this.characterInfo.NameText) || !string.IsNullOrEmpty(this.characterInfo.Pattern))); }
//バージョンアップでシーンを修正する必要があるかチェック static void VersionUpScene(AdvEngine engine) { VersionUpSceneToUnity52(engine); VersionUpSceneToUtage25(engine); }
public override void DoCommand(AdvEngine engine) { this.mapManager.HideMap(); }
public override void DoCommand(AdvEngine engine) { engine.Param.CalcExpression(exp); }
//コマンド実行 public abstract void DoCommand(AdvEngine engine);
/// <summary> /// コンストラクタ /// </summary> /// <param name="reader">バイナリリーダー</param> public AdvSelection(BinaryReader reader, AdvEngine engine) { Read(reader, engine); }
//言語変更時に呼ばれる処理(ボイスコマンドなどでファイルを入れ替えるために行う) public virtual void OnChangeLanguage(AdvEngine engine) { }
public override void DoCommand(AdvEngine engine) { engine.SoundManager.PlayAmbience(file, isLoop); }
public override void DoCommand(AdvEngine engine) { engine.SoundManager.StopSe(label, fadeTime); }
public override void DoCommand(AdvEngine engine) { // engine.Page.Contoller.IsKeepText = true; }
public override void DoCommand(AdvEngine engine) { UtageToolKit.SafeSendMessage( this, engine.ScenarioPlayer.SendMessageTarget, "OnDoCommand" ); }
public override void DoCommand(AdvEngine engine) { engine.SoundManager.PlayBgm(file, fadeInTime, fadeOutTime); }
//ボイスの再生 IEnumerator CoPlayVoice( AdvEngine engine, AssetFile voiceFile, string charcterLabel) { if (voiceFile == null) { Debug.LogError("Backlog voiceFile is NULL"); } AssetFileManager.Load(voiceFile, this); while (!voiceFile.IsReadyStreaming) { yield return 0; } engine.SoundManager.PlayVoice(charcterLabel, voiceFile); voiceFile.Unuse(this); }
public override void DoCommand(AdvEngine engine) { WrapperMoviePlayer.Play (label); }
//コマンド実行 public override void DoCommand(AdvEngine engine) { Debug.Log(log); }
/// <summary> /// 初期化。スクリプトから動的に生成する場合に /// </summary> /// <param name="engine">ADVエンジン</param> public void InitOnCreate(AdvEngine engine, AdvUiSelection selectionItemPrefab) { this.engine = engine; this.ListView.ItemPrefab = selectionItemPrefab.GetComponent <ListViewItem>(); }
public override bool Wait(AdvEngine engine) { return engine.TransitionManager.IsWait; }
public override void DoCommand(AdvEngine engine) { #if (UNITY_IPHONE || UNITY_ANDROID) && !UTAGE_IGNORE_VIBRATE Handheld.Vibrate(); #endif }