internal void Stop(AdvParticleStopType stopType) { IAdvGraphicObjectParticleController controller = GetComponentInChildren <IAdvGraphicObjectParticleController>(); if (controller == null) { //コントローラー未設定 switch (stopType) { case AdvParticleStopType.StopEmitting: this.GetComponentInChildren <ParticleSystem>().Stop(true, ParticleSystemStopBehavior.StopEmitting); break; case AdvParticleStopType.Clear: default: //即座に消しておわり ParentObject.FadeOut(0); break; } } else { controller.Stop(stopType); } }
//パーティクルを全て非表示にする internal void FadeOutAllParticle(AdvParticleStopType stopType) { foreach (var keyValue in Groups) { keyValue.Value.FadeOutAllParticle(stopType); } }
//指定名のパーティクルを非表示にする internal void FadeOutParticle(string targetName, AdvParticleStopType stopType) { foreach (var keyValue in Groups) { keyValue.Value.FadeOutParticle(targetName, stopType); } }
//パーティクルを全て非表示にする internal void FadeOutAllParticle(AdvParticleStopType stopType) { List <AdvGraphicObject> values = new List <AdvGraphicObject>(currentGraphics.Values); foreach (var obj in values) { FadOutParticle(obj, stopType); } }
//指定名のパーティクルを非表示にする internal void FadeOutParticle(string targetName, AdvParticleStopType stopType) { AdvGraphicObject obj; if (currentGraphics.TryGetValue(targetName, out obj)) { FadOutParticle(obj, stopType); } }
void FadOutParticle(AdvGraphicObject obj, AdvParticleStopType stopType) { AdvGraphicObjectParticle particle = obj.TargetObject as AdvGraphicObjectParticle; if (particle != null) { particle.Stop(stopType); fadeOutingObjets.Add(obj); Remove(obj); } }
public AdvCommandParticleOff(StringGridRow row) : base(row) { this.name = ParseCellOptional <string>(AdvColumnName.Arg1, ""); this.stopType = ParseCellOptional <AdvParticleStopType>(AdvColumnName.Arg2, AdvParticleStopType.Default); }