示例#1
0
 public void Init(uint ownerID, uint runtimeID, string propName, bool appearAnim = false)
 {
     this.config       = PropObjectData.GetPropObjectConfig(propName);
     base.commonConfig = this.config.CommonConfig;
     this.Init(runtimeID);
     this._timeScaleStack = new FixedStack <float>(8, null);
     this._timeScaleStack.Push(1f, true);
     if ((Singleton <LevelManager> .Instance != null) && (Singleton <LevelManager> .Instance.levelEntity != null))
     {
         this._timeScale = this._lastTimeScale = this._timeScaleStack.value * Singleton <LevelManager> .Instance.levelEntity.TimeScale;
     }
     else
     {
         this._timeScale = this._lastTimeScale = this._timeScaleStack.value;
     }
     if (Singleton <EventManager> .Instance != null)
     {
         this.owner = (BaseMonoAbilityEntity)Singleton <EventManager> .Instance.GetEntity(ownerID);
     }
     if ((this.config.PropArguments != null) && !this.config.PropArguments.IsTargetable)
     {
         base.SetCountedDenySelect(true, true);
     }
     if ((this.config.PropArguments != null) && (this.config.PropArguments.Duration > 0f))
     {
         base.StartCoroutine(this.WaitDestroyByDuration(this.config.PropArguments.Duration));
     }
     if (appearAnim)
     {
         this.Appear();
     }
 }
示例#2
0
 public BaseAbilityMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config)
 {
     this.instancedAbility  = instancedAbility;
     this.instancedModifier = instancedModifier;
     this.actor             = (instancedModifier == null) ? instancedAbility.caster : instancedModifier.owner;
     this.entity            = this.actor.entity;
     this.mixinLocalID      = config.localID;
 }
示例#3
0
        private void OnDestroy()
        {
            BaseMonoAbilityEntity owner = this.owner as BaseMonoAbilityEntity;

            if (owner != null)
            {
                owner.onBeHitCanceled = (Action <string>)Delegate.Remove(owner.onBeHitCanceled, new Action <string>(this.OnOwnerBeHitCancelCallback));
            }
        }
示例#4
0
        public void EnableOnOwnerBeHitCanceledDestroySelf()
        {
            BaseMonoAbilityEntity owner = this.owner as BaseMonoAbilityEntity;

            if (owner != null)
            {
                owner.onBeHitCanceled = (Action <string>)Delegate.Combine(owner.onBeHitCanceled, new Action <string>(this.OnOwnerBeHitCancelCallback));
            }
        }
示例#5
0
        public void AttachOpacity(BaseMonoAbilityEntity target, float opacity)
        {
            PropObjectActor actor = Singleton <EventManager> .Instance.GetActor <PropObjectActor>(target.GetRuntimeID());

            if (actor != null)
            {
                actor.SetPorpObjectOpacity(opacity);
                this.CheckInit <Tuple <BaseMonoAbilityEntity, float> >(ref this._attachedOpacity);
                this._attachedOpacity.Add(Tuple.Create <BaseMonoAbilityEntity, float>(target, opacity));
            }
        }
示例#6
0
        public void AttachMuteOtherQTE(BaseMonoAbilityEntity target, bool muteOtherQTE)
        {
            this.CheckInit <Tuple <AvatarActor, bool> >(ref this._attachMuteOtherQTE);
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(target.GetRuntimeID());

            if (actor != null)
            {
                actor.MuteOtherQTE = muteOtherQTE;
                this._attachMuteOtherQTE.Add(Tuple.Create <AvatarActor, bool>(actor, muteOtherQTE));
            }
        }
示例#7
0
        public override void OnAwake()
        {
            BaseMonoAnimatorEntity component = base.GetComponent <BaseMonoAnimatorEntity>();

            if (component is BaseMonoAvatar)
            {
                this._aiEntity = (BaseMonoAvatar)component;
            }
            else if (component is BaseMonoMonster)
            {
                this._aiEntity = (BaseMonoMonster)component;
            }
            this._aiController  = this._aiEntity.GetActiveAIController();
            this._abilityEntity = component;
            this._levelAIPlugin = Singleton <LevelManager> .Instance.levelActor.GetPlugin <LevelAIPlugin>();
        }
示例#8
0
        public void AttachAllowSwitchOther(BaseMonoAbilityEntity target, bool allowSwitchOther)
        {
            if (Singleton <LevelManager> .Instance.levelActor.levelMode == LevelActor.Mode.Single)
            {
                this.CheckInit <Tuple <AvatarActor, bool> >(ref this._attachAllowSwitchOther);
                AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(target.GetRuntimeID());

                if (actor != null)
                {
                    actor.AllowOtherSwitchIn = allowSwitchOther;
                    if (allowSwitchOther)
                    {
                        actor.ResetSwitchInTimer();
                    }
                    this._attachAllowSwitchOther.Add(Tuple.Create <AvatarActor, bool>(actor, allowSwitchOther));
                }
            }
        }
示例#9
0
 public override void Init(BaseMonoEntity entity)
 {
     this.entity                    = (BaseMonoAbilityEntity)entity;
     this._actorProperties          = new Dictionary <string, FixedSafeFloatStack>();
     this._propertyChangedCallbacks = new Dictionary <string, Action>();
     this.abilityIDMap              = new Dictionary <string, string>();
     this.appliedAbilities          = new List <Tuple <ConfigAbility, Dictionary <string, object> > >();
     this._resistanceBuffDebuffs    = new List <ConfigBuffDebuffResistance>();
     this.isAlive                   = 1;
     this.onAbilityStateAdd         = (Action <AbilityState, bool>)Delegate.Combine(this.onAbilityStateAdd, new Action <AbilityState, bool>(this.OnAbilityStateAdd));
     this.onAbilityStateRemove      = (Action <AbilityState>)Delegate.Combine(this.onAbilityStateRemove, new Action <AbilityState>(this.OnAbilityStateRemove));
     this.RegisterPropertyChangedCallback("Actor_MaxHPRatio", new Action(this.HPPropertyChangedCallback));
     this.RegisterPropertyChangedCallback("Actor_MaxHPDelta", new Action(this.HPPropertyChangedCallback));
     this.RegisterPropertyChangedCallback("Actor_MaxSPRatio", new Action(this.SPPropertyChangedCallback));
     this.RegisterPropertyChangedCallback("Actor_MaxSPDelta", new Action(this.SPPropertyChangedCallback));
     this._witchTimeResumeTimer = new EntityTimer(0.5f, Singleton <LevelManager> .Instance.levelEntity);
     this._witchTimeResumeTimer.SetActive(false);
 }
示例#10
0
 public void AttachAnimEventPredicate(BaseMonoAbilityEntity target, string predicate)
 {
     this.CheckInit <Tuple <BaseMonoAbilityEntity, string, OwnedPredicateState> >(ref this._ownedPredicates);
     this._ownedPredicates.Add(Tuple.Create <BaseMonoAbilityEntity, string, OwnedPredicateState>(target, predicate, OwnedPredicateState.Attach));
 }
示例#11
0
 public void AttachMaskedAnimEventID(BaseMonoAbilityEntity target, string animEventID)
 {
     this.CheckInit <Tuple <BaseMonoAbilityEntity, string> >(ref this._animEventMasked);
     this._animEventMasked.Add(Tuple.Create <BaseMonoAbilityEntity, string>(target, animEventID));
 }
示例#12
0
 public void AttachNoCollision(BaseMonoAbilityEntity target)
 {
     target.PushNoCollision();
     this.CheckInit <BaseMonoAbilityEntity>(ref this._attachedNoCollisions);
     this._attachedNoCollisions.Add(target);
 }
示例#13
0
 public void AttachPushMaterialGroup(BaseMonoAbilityEntity target)
 {
     this.CheckInit <BaseMonoAbilityEntity>(ref this._materialGroupPushed);
     this._materialGroupPushed.Add(target);
 }
示例#14
0
 public void AttachIsGhost(BaseMonoAbilityEntity target, bool isGhost)
 {
     target.SetCountedIsGhost(isGhost);
     this.CheckInit <Tuple <BaseMonoAbilityEntity, bool> >(ref this._attachedIsGhost);
     this._attachedIsGhost.Add(Tuple.Create <BaseMonoAbilityEntity, bool>(target, isGhost));
 }
示例#15
0
 public void AttachEffectOverride(BaseMonoAbilityEntity target, string key)
 {
     this.CheckInit <Tuple <BaseMonoAbilityEntity, string> >(ref this._attachedEffectOverrides);
     this._attachedEffectOverrides.Add(Tuple.Create <BaseMonoAbilityEntity, string>(target, key));
 }
示例#16
0
 private void ApplyStopEffectOn(BaseMonoAbilityEntity target)
 {
     target.PushTimeScale(0.05f, 2);
 }
示例#17
0
 public override void OnAwake()
 {
     this._entity = base.GetComponent <BaseMonoAbilityEntity>();
 }
示例#18
0
 public void AttachAllowSelected(BaseMonoAbilityEntity target, bool allowSelected)
 {
     target.SetCountedDenySelect(!allowSelected, false);
     this.CheckInit <Tuple <BaseMonoAbilityEntity, bool> >(ref this._attachedAllowSelected);
     this._attachedAllowSelected.Add(Tuple.Create <BaseMonoAbilityEntity, bool>(target, allowSelected));
 }
示例#19
0
 public AbilityDynamicDistanceMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config  = (DynamicDistanceMixin)config;
     this._entity = base.entity;
 }
示例#20
0
 private void RemoveStopEffectOn(BaseMonoAbilityEntity target)
 {
     target.PopTimeScale(2);
 }