예제 #1
0
        private void DeleteEffect(IEventArgs args)
        {
            FreeEffectDeleteAction fda = new FreeEffectDeleteAction();

            if (effectAction == null)
            {
                if (!StringUtil.IsNullOrEmpty(effect))
                {
                    fda.SetKey(effect);
                }
                else
                {
                    fda.SetKey(string.Empty);
                }
            }
            else
            {
                fda.SetKey("bufeffect_" + realKey);
            }
            fda.SetScope(4);
            fda.Act(args);
        }
예제 #2
0
        public override void DoAction(IEventArgs args)
        {
            FreeRuleEventArgs fr  = (FreeRuleEventArgs)args;
            object            obj = fr.GetEntity(FreeUtil.ReplaceVar(entity, args));

            if (obj is FreeMoveEntity)
            {
                FreeEntityData data = (FreeEntityData)((FreeMoveEntity)obj).freeData.FreeData;
                if (data.effect != null)
                {
                    FreeEffectDeleteAction del = new FreeEffectDeleteAction();
                    del.SetKey(data.effect.GetKey());
                    del.SetScope(4);
                    del.Act(args);
                }

                if (data.gameObject != null)
                {
                    GameObject.Destroy(data.gameObject);
                }

                ((FreeMoveEntity)obj).isFlagDestroy = true;
            }
        }