Пример #1
0
        public virtual void OnCreate(BaseCoreMono self, BaseCoreMono cast, BaseCoreMono target)
        {
            SelfMono   = self;
            CastMono   = cast;
            TargetMono = target;
            Self       = self as BaseUnit;
            Cast       = cast as BaseUnit;
            Target     = target as BaseUnit;
            if (UseFollow)
            {
                SetFollow();
            }
            TouchGround();
            SetLifeTime(LifeTime);
            OnPlaySFX();
            LastedPos = Pos;

            if (DispearType == PerformDispearType.Flicker)
            {
                effectFlicker = BaseCoreMono.GetUnityComponet <EffectFlicker>(this);
                effectFlicker.StopEffect();
            }
            else if (DispearType == PerformDispearType.Scale)
            {
                Trans.localScale = Vector3.one;
            }
            Callback_OnCreated?.Invoke(this);
        }
Пример #2
0
        public virtual void OnCreate(BaseCoreMono selfMono, BaseCoreMono castMono, params object[] ps)
        {
            SelfMono = selfMono;
            CastMono = castMono;
            if (UseFollow)
            {
                SetFollow();
            }
            TouchGround();
            SetLifeTime(LifeTime);
            OnPlaySFX();
            LastedPos = Pos;

            if (DispearType == PerformDispearType.Flicker)
            {
                flickerEffect = BaseCoreMono.GetUnityComponet <FlickerEffect>(this);
                flickerEffect.StopEffect();
            }
            else if (DispearType == PerformDispearType.Scale)
            {
                Trans.localScale = Vector3.one;
            }
            Callback_OnCreated?.Invoke(this);
        }