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(); } }
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; }
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)); } }
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)); } }
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)); } }
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)); } }
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>(); }
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)); } } }
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); }
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)); }
public void AttachMaskedAnimEventID(BaseMonoAbilityEntity target, string animEventID) { this.CheckInit <Tuple <BaseMonoAbilityEntity, string> >(ref this._animEventMasked); this._animEventMasked.Add(Tuple.Create <BaseMonoAbilityEntity, string>(target, animEventID)); }
public void AttachNoCollision(BaseMonoAbilityEntity target) { target.PushNoCollision(); this.CheckInit <BaseMonoAbilityEntity>(ref this._attachedNoCollisions); this._attachedNoCollisions.Add(target); }
public void AttachPushMaterialGroup(BaseMonoAbilityEntity target) { this.CheckInit <BaseMonoAbilityEntity>(ref this._materialGroupPushed); this._materialGroupPushed.Add(target); }
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)); }
public void AttachEffectOverride(BaseMonoAbilityEntity target, string key) { this.CheckInit <Tuple <BaseMonoAbilityEntity, string> >(ref this._attachedEffectOverrides); this._attachedEffectOverrides.Add(Tuple.Create <BaseMonoAbilityEntity, string>(target, key)); }
private void ApplyStopEffectOn(BaseMonoAbilityEntity target) { target.PushTimeScale(0.05f, 2); }
public override void OnAwake() { this._entity = base.GetComponent <BaseMonoAbilityEntity>(); }
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)); }
public AbilityDynamicDistanceMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config) { this.config = (DynamicDistanceMixin)config; this._entity = base.entity; }
private void RemoveStopEffectOn(BaseMonoAbilityEntity target) { target.PopTimeScale(2); }