public void Remake(AdvLayerSetting setting) { foreach (AdvGraphicGroup group in this.Groups.Values) { group.DestroyAll(); } this.Groups.Clear(); IEnumerator enumerator = Enum.GetValues(typeof(AdvLayerSettingData.LayerType)).GetEnumerator(); try { while (enumerator.MoveNext()) { AdvLayerSettingData.LayerType current = (AdvLayerSettingData.LayerType)enumerator.Current; AdvGraphicGroup group2 = new AdvGraphicGroup(current, setting, this); this.Groups.Add(current, group2); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } }
public override void DoCommand(AdvEngine engine) { float fadeTime = engine.Page.ToSkippedTime(this.time); AdvGraphicGroup characterManager = engine.GraphicManager.CharacterManager; if (string.IsNullOrEmpty(this.name)) { characterManager.FadeOutAll(fadeTime); } else { AdvGraphicLayer layer = characterManager.FindLayerFromObjectName(this.name); if (layer != null) { layer.FadeOut(this.name, fadeTime); } else { layer = characterManager.FindLayer(this.name); if (layer != null) { layer.FadeOutAll(fadeTime); } } } }
/// <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); } }
/// <summary> /// 章追加時などリメイク /// </summary> public void Remake(AdvLayerSetting setting) { foreach (AdvGraphicGroup group in Groups.Values) { group.DestroyAll(); } Groups.Clear(); foreach (AdvLayerSettingData.LayerType type in Enum.GetValues(typeof(AdvLayerSettingData.LayerType))) { AdvGraphicGroup group = new AdvGraphicGroup(type, setting, this); Groups.Add(type, group); } }
/// <summary> /// 起動時初期化 /// </summary> /// <param name="setting">レイヤー設定データ</param> public virtual void BootInit(AdvEngine engine, AdvLayerSetting setting) { this.engine = engine; Groups.Clear(); foreach (AdvLayerSettingData.LayerType type in Enum.GetValues(typeof(AdvLayerSettingData.LayerType))) { if (type == AdvLayerSettingData.LayerType.Dummy) { continue; } AdvGraphicGroup group = new AdvGraphicGroup(type, setting, this); Groups.Add(type, group); } }
//指定の名前のオブジェクトのレイヤーを変更する public void ChangeLayer(string objectName, string layerName, AdvChangeLayerRepositionType repositionType, float fadeOutTime) { AdvGraphicLayer newLayer = FindLayer(layerName); if (newLayer == null) { Debug.LogErrorFormat("{0} is not found", layerName); return; } AdvGraphicGroup group = null; AdvGraphicObject targetObject = null; foreach (var keyValue in Groups) { group = keyValue.Value; targetObject = group.FindObject(objectName); if (targetObject != null) { break; } } if (targetObject == null) { Debug.LogErrorFormat("{0} is not found", objectName); return; } AdvGraphicLayer oldLayer = targetObject.Layer; if (oldLayer == newLayer) { return; } bool isDefaultObject = (oldLayer.DefaultObject == targetObject); if (group.Type == AdvLayerSettingData.LayerType.Sprite) { isDefaultObject = false; } newLayer.ChangeLayer(isDefaultObject, targetObject, repositionType, fadeOutTime); oldLayer.Remove(targetObject); }
public void BootInit(AdvEngine engine, AdvLayerSetting setting) { this.engine = engine; this.Groups.Clear(); IEnumerator enumerator = Enum.GetValues(typeof(AdvLayerSettingData.LayerType)).GetEnumerator(); try { while (enumerator.MoveNext()) { AdvLayerSettingData.LayerType current = (AdvLayerSettingData.LayerType)enumerator.Current; AdvGraphicGroup group = new AdvGraphicGroup(current, setting, this); this.Groups.Add(current, group); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } }
/// <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); } }