Ejemplo n.º 1
0
 public LevelTutorialMonsterShield(LevelTutorialHelperPlugin helper, LevelTutorialMetaData metaData) : base(helper, metaData)
 {
     this._finished           = false;
     this._monsterSubTypeName = "UL_040";
     this._pauseTimer         = new EntityTimer(3f);
     this._pauseTimer.Reset(false);
 }
Ejemplo n.º 2
0
 public FollowAvatarControlledRotate(MainCameraFollowState followState) : base(followState)
 {
     base.maskedShortStates.Add(base._owner.standByState);
     base.maskedShortStates.Add(base._owner.lookAtPositionState);
     base.maskedShortStates.Add(base._owner.timedPullZState);
     this._exitTimer = new EntityTimer(0.75f, base._owner.mainCamera);
 }
Ejemplo n.º 3
0
 public AbilityShieldMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._shieldResumeRatio = 1f;
     this.config             = (ShieldMixin)config;
     if (base.entity is BaseMonoMonster)
     {
         this._monsterEntity = (BaseMonoMonster)base.entity;
         this._monsterActor  = (MonsterActor)base.actor;
     }
     this._showShieldBar = instancedAbility.Evaluate(this.config.ShowShieldBar) != 0;
     if (this.config.UseLevelTimeScale)
     {
         this._betweenAttackResumeTimer = new EntityTimer(this.config.BetweenAttackResumeCD);
         this._forceResumeTimer         = new EntityTimer(this.config.ForceResumeCD);
         this._minForceResumeTimer      = new EntityTimer(this.config.MinForceResumeCD);
         this._shieldResumeTimer        = new EntityTimer(this.config.ShieldResumeTimeSpan);
     }
     else
     {
         this._betweenAttackResumeTimer = new EntityTimer(this.config.BetweenAttackResumeCD, base.entity);
         this._forceResumeTimer         = new EntityTimer(this.config.ForceResumeCD, base.entity);
         this._minForceResumeTimer      = new EntityTimer(this.config.MinForceResumeCD, base.entity);
         this._shieldResumeTimer        = new EntityTimer(this.config.ShieldResumeTimeSpan, base.entity);
     }
 }
Ejemplo n.º 4
0
 public AbilityDefendChargeMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config = (DefendChargeMixin)config;
     this._perfectDefendTimer = new EntityTimer(0f, base.entity);
     this._perfectDefendTimer.SetActive(false);
     this._perfectDefendDuration = instancedAbility.Evaluate(this.config.DefendPerfectEndTime) - instancedAbility.Evaluate(this.config.DefendPerfectStartTime);
 }
Ejemplo n.º 5
0
 protected void Awake()
 {
     this._collisionMask = -1;
     this._rigidbody     = base.GetComponent <Rigidbody>();
     this._enteredIDs    = new HashSet <uint>();
     this._aliveTimer    = new EntityTimer(this._aliveDuration);
 }
Ejemplo n.º 6
0
        public AbilityDefendModeMonsterMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
        {
            this._hatredAIAreaSections = new List <float>();
            this._hatredAIValues       = new List <int>();
            this.config            = (DefendModeMonsterMixin)config;
            this._monsterActor     = base.actor as MonsterActor;
            this._monster          = base.entity as BaseMonoMonster;
            this._monsterHatredDic = new Dictionary <uint, float>();
            this._monsterHatredDic.Clear();
            this._hatredDecreaseTimer = new EntityTimer(instancedAbility.Evaluate(this.config.HatredDecreaseInterval));
            this._hatredDecreaseTimer.Reset(false);
            this._minAISwitchTimer = new EntityTimer(instancedAbility.Evaluate(this.config.MinAISwitchDuration));
            this._minAISwitchTimer.Reset(false);
            for (int i = 0; i < this.config.hatredAIAreaSections.Length; i++)
            {
                this._hatredAIAreaSections.Add(this.config.hatredAIAreaSections[i]);
            }
            this._hatredAIAreaSections.Add(1f);
            for (int j = 0; j < this.config.hatredAIValues.Length; j++)
            {
                this._hatredAIValues.Add(this.config.hatredAIValues[j]);
            }
            this._defaultHatredAIValue = this.config.DefaultAIValue;
            this._currentHatredAIValue = this._defaultHatredAIValue;
            BTreeMonsterAIController activeAIController = (BTreeMonsterAIController)this._monster.GetActiveAIController();

            if (activeAIController != null)
            {
                activeAIController.OnAIActive = (Action <bool>)Delegate.Combine(activeAIController.OnAIActive, new Action <bool>(this.OnMonsterAIActive));
            }
        }
Ejemplo n.º 7
0
 public void ChangeSwitchInCDTime(float CDTime)
 {
     this._switchInTimer = new EntityTimer(CDTime, base.entity);
     this._switchInTimer.timeupAction = (Action)Delegate.Combine(this._switchInTimer.timeupAction, new Action(this.OnSwitchInReady));
     this._switchInTimer.Reset(false);
     this._switchInTimer.isTimeUp = true;
 }
Ejemplo n.º 8
0
 public override void Init(uint runtimeID)
 {
     base.Init(runtimeID);
     this._isActive     = true;
     this._destroyTimer = new EntityTimer(this.DestroyDelay, this);
     this._destroyTimer.Reset(false);
     this._state = State.Idle;
 }
Ejemplo n.º 9
0
 public AbilityTriggerFieldExMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config = (TriggerFieldExMixin)config;
     this._timer = new EntityTimer(instancedAbility.Evaluate(this.config.Duration));
     this._timer.SetActive(false);
     this._createEffectDelayTimer = new EntityTimer(this.config.CreateEffectDelay);
     this._insideActors           = new List <BaseAbilityActor>();
 }
Ejemplo n.º 10
0
 protected void Awake()
 {
     this._rigidbody            = base.GetComponent <Rigidbody>();
     this._rigidbody.useGravity = false;
     this._hasTriggerEntered    = false;
     this.attractTimer          = new EntityTimer(2.5f);
     this.attractTimer.SetActive(false);
 }
Ejemplo n.º 11
0
 public void ResetInside(float resetTime = 0.4f)
 {
     if (this._resetTimer == null)
     {
         this._resetTimer = new EntityTimer(resetTime, this);
     }
     this._resetTimer.Reset(true);
 }
 public AbilityMonsterAreaLastingBuffMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config     = (MonsterAreaLastingBuffMixin)config;
     this._buffTimer = new EntityTimer(instancedAbility.Evaluate(this.config.Duration), base.entity);
     this._buffTimer.SetActive(false);
     this._state        = State.Idle;
     this._insideActors = new List <BaseAbilityActor>();
 }
Ejemplo n.º 13
0
 public AbilityBlockMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._allowBlock  = true;
     this.config       = (BlockMixin)config;
     this._blockChance = instancedAbility.Evaluate(this.config.BlockChance);
     this._blockChance = Mathf.Clamp(this._blockChance, 0f, 1f);
     this._blockTimer  = new EntityTimer(instancedAbility.Evaluate(this.config.BlockTimer));
 }
 public AbilityLimitLoopWithMaskTriggerMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config = (LimitLoopWithMaskTriggerMixin)config;
     this._timer = new EntityTimer(this.config.MaskDuration, base.entity);
     if (this.config.UseOverCount)
     {
         this._overCountTimer = new EntityTimer(this.config.ResetOverCountTime, base.entity);
     }
 }
Ejemplo n.º 15
0
 public AbilityEvadeMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config      = (EvadeMixin)config;
     this._evadeTimer = new EntityTimer(instancedAbility.Evaluate(this.config.EvadeWindow));
     this._evadeTimer.SetActive(false);
     this._extendedBlockAttackTimer = new EntityTimer(instancedAbility.Evaluate(this.config.EvadeSuccessExtendedInvincibleWindow));
     this._extendedBlockAttackTimer.SetActive(false);
     this._state = State.Idle;
 }
Ejemplo n.º 16
0
 public AbilityBlackHoleMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._addedVelocityActorsAndIndexDic = new Dictionary <BaseAbilityActor, int>();
     this.config          = (BlackHoleMixin)config;
     this._blackHoleTimer = new EntityTimer(instancedAbility.Evaluate(this.config.Duration));
     this._blackHoleTimer.SetActive(false);
     this._pullVelocity = instancedAbility.Evaluate(this.config.PullVelocity);
     this._insideActors = new List <BaseAbilityActor>();
 }
Ejemplo n.º 17
0
 public AbilityMonsterSkillIDChargeAnimatorMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config                = (MonsterSkillIDChargeAnimatorMixin)config;
     this._monster              = (BaseMonoMonster)base.entity;
     this._chargeTimer          = new EntityTimer();
     this._triggeredChargeTimer = new EntityTimer();
     this._switchTimer          = new EntityTimer(this.config.ChargeSwitchWindow, base.entity);
     this._loopCount            = this.config.ChargeLoopSkillIDs.Length;
     this._chargeTimeRatio      = instancedAbility.Evaluate(this.config.ChargeTimeRatio);
 }
Ejemplo n.º 18
0
 public AbilitySmokeBombMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config     = (SmokeBombMixin)config;
     this._buffTimer = new EntityTimer(instancedAbility.Evaluate(this.config.Duration), base.entity);
     this._buffTimer.SetActive(false);
     this._isSmokeOn          = false;
     this._isSmokeAvaliable   = false;
     this._insideAlliedActors = new List <BaseAbilityActor>();
     this._insideEnemyActors  = new List <BaseAbilityActor>();
 }
Ejemplo n.º 19
0
 public AbilityAvatarQTEMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._qteTargetList = new List <QTETarget>();
     this.config         = (AvatarQTEMixin)config;
     this._avatarActor   = base.actor as AvatarActor;
     this._qteMaxTimer   = new EntityTimer(instancedAbility.Evaluate(this.config.QTEMaxTimeSpan));
     this._qteMaxTimer.Reset(false);
     this._delayQteTimer = new EntityTimer(instancedAbility.Evaluate(this.config.DelayQTETimeSpan));
     this._delayQteTimer.Reset(false);
 }
Ejemplo n.º 20
0
 public AbilityMonsterTeleportMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config            = (MonsterTeleportMixin)config;
     this._baselineDistance = instancedAbility.Evaluate(this.config.BaselineDistance);
     this._monster          = (BaseMonoMonster)base.entity;
     this._isTeleporting    = false;
     this._teleportInterval = this.config.TeleportInverval;
     this._teleportTimer    = new EntityTimer(this._teleportInterval);
     this._teleportTimer.Reset(false);
 }
 public BaseAbilityAvatarSkillButtonHoldChargeMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._checkPointerDownInBS = true;
     this.config  = (BaseAvatarSkillButtonHoldChargeAnimatorMixin)config;
     this._avatar = (BaseMonoAvatar)base.entity;
     this._triggeredChargeTimer = new EntityTimer();
     this._switchTimer          = new EntityTimer(this.config.ChargeSwitchWindow, base.entity);
     this._loopCount            = this.config.ChargeLoopSkillIDs.Length;
     this._subSelectTargetList  = new List <BaseMonoEntity>();
     this._chargeTimeRatio      = 1f;
 }
Ejemplo n.º 22
0
 public AbilityMirrorMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config          = (MirrorMixin)config;
     this._mirrorLifespan = instancedAbility.Evaluate(this.config.MirrorLastingTime);
     this._mirrorAmount   = instancedAbility.Evaluate(this.config.MirrorAmount);
     this._delayTimer     = new EntityTimer(this.config.DelayTime);
     this._mirrorDatas    = new MirrorData[this._mirrorAmount];
     for (int i = 0; i < this._mirrorAmount; i++)
     {
         this._mirrorDatas[i] = new MirrorData();
     }
     this._state = State.Idle;
 }
Ejemplo n.º 23
0
 public void SetupPositioning(Vector3 originalPosition, Vector3 targetPosition, float duration, float resumeSpeed, float steerCoef, float steerCoefAcc, Vector3 tracingPosition, bool passBy = false)
 {
     this._state        = BulletState.Placing;
     this._placingTimer = new EntityTimer(duration);
     this._placingTimer.Reset(true);
     this._originalPosition = originalPosition;
     this._placingPosition  = targetPosition;
     this._resumeSpeed      = resumeSpeed;
     this._traceLerpCoef    = steerCoef;
     this._traceLerpCoefAcc = steerCoefAcc;
     this._targetPosition   = tracingPosition;
     this._passBy           = passBy;
 }
Ejemplo n.º 24
0
 public AbilityDefendMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this.config                  = (DefendMixin)config;
     this._defendWindow           = instancedAbility.Evaluate(this.config.DefendWindow);
     this._defendPerfectStartTime = instancedAbility.Evaluate(this.config.DefendPerfectStartTime);
     this._defendPerfectEndTime   = instancedAbility.Evaluate(this.config.DefendPerfectEndTime);
     this._defendFailTimer        = new EntityTimer(this._defendWindow);
     this._defendPerfectFailTimer = new EntityTimer(this._defendPerfectStartTime);
     this._isDefendingPerfect     = false;
     this._defendFailTimer.SetActive(false);
     this._defendPerfectFailTimer.SetActive(false);
     this._state = State.Idle;
 }
Ejemplo n.º 25
0
 public virtual void Awake()
 {
     this._renderingDataStack           = new FixedStack <RenderingDataTransition>(10, new Action <RenderingDataTransition, int, RenderingDataTransition, int>(this.OnRenderingDataChanged));
     this._currentRendertingData        = null;
     this._renderingDataTransitionTimer = new EntityTimer(0f);
     this._renderingDataTransitionTimer.SetActive(false);
     this._renderingDataState     = RenderingDataState.Idle;
     this._mainCameraTransform    = Camera.main.transform;
     this._subWeatherStack        = new FixedStack <SubWeatherTransition>(5, new Action <SubWeatherTransition, int, SubWeatherTransition, int>(this.OnSubWeatherChanged));
     this._rainPrefab             = Miscs.LoadResource <GameObject>(this.RAIN_PREFAB_PATH, BundleType.RESOURCE_FILE);
     this._weatherState           = WeatherState.Idle;
     this._weatherTransitionTimer = new EntityTimer(0f);
     this._weatherTransitionTimer.SetActive(false);
 }
Ejemplo n.º 26
0
 public AbilityMonsterSuicideAttack(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._basicBrightness        = 1f;
     this._brightnessPropertyName = "_Emission";
     this.config              = (MonsterSuicideAttackMixin)config;
     this._suicideTimer       = new EntityTimer(instancedAbility.Evaluate(this.config.SuicideCountDownDuration));
     this._warningTimer       = new EntityTimer(instancedAbility.Evaluate(this.config.SuicideCountDownDuration) * 0.15f);
     this._isTouchExplode     = this.config.IsTouchExplode;
     this._onTouchTriggerID   = this.config.OnTouchTriggerID;
     this._skinedMeshRenderer = base.actor.gameObject.GetComponentInChildren <SkinnedMeshRenderer>();
     if (this._skinedMeshRenderer != null)
     {
         this._basicBrightness = this._skinedMeshRenderer.sharedMaterial.GetFloat(this._brightnessPropertyName);
     }
 }
Ejemplo n.º 27
0
        private void Awake()
        {
            this.hintArrowManager = new HintArrowManager();
            this._showHPTimer     = new EntityTimer(float.MaxValue);
            this._showHPTimer.SetActive(false);
            base.transform.Find("TopPanels/StageTransitPanel").gameObject.SetActive(true);
            Singleton <MainUIManager> .Instance.SetMainCanvas(this);

            this._movieBarPanel            = base.transform.Find("TopPanels/StageMovieBarPanel").gameObject;
            this._movieBarCanvasGroup      = this._movieBarPanel.GetComponent <CanvasGroup>();
            this._stageTransitPanel        = base.transform.Find("TopPanels/StageTransitPanel").gameObject;
            this._stageTransitImage        = this._stageTransitPanel.GetComponent <Image>();
            this._fadeState                = FadeState.Normal;
            this._stageTransitFadeTimeSpan = 0.18f;
            this._fadeEndCallback          = null;
        }
Ejemplo n.º 28
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);
 }
Ejemplo n.º 29
0
 public AbilityGlobalMainShieldMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._shieldResumeRatio = 1f;
     this.config             = (GlobalMainShieldMixin)config;
     if (this.config.UseLevelTimeScale)
     {
         this._betweenAttackResumeTimer = new EntityTimer(instancedAbility.Evaluate(this.config.BetweenAttackResumeCD));
         this._forceResumeTimer         = new EntityTimer(this.config.ForceResumeCD);
         this._minForceResumeTimer      = new EntityTimer(this.config.MinForceResumeCD);
         this._shieldResumeTimer        = new EntityTimer(this.config.ShieldResumeTimeSpan);
     }
     else
     {
         this._betweenAttackResumeTimer = new EntityTimer(instancedAbility.Evaluate(this.config.BetweenAttackResumeCD), base.entity);
         this._forceResumeTimer         = new EntityTimer(this.config.ForceResumeCD, base.entity);
         this._minForceResumeTimer      = new EntityTimer(this.config.MinForceResumeCD, base.entity);
         this._shieldResumeTimer        = new EntityTimer(this.config.ShieldResumeTimeSpan, base.entity);
     }
 }
Ejemplo n.º 30
0
 public AbilityMonsterDefendMixin(ActorAbility instancedAbility, ActorModifier instancedModifier, ConfigAbilityMixin config) : base(instancedAbility, instancedModifier, config)
 {
     this._breakDefendAniDamageRatio     = 1f;
     this._defendActionRange             = 1f;
     this._defendActionChance            = 1f;
     this._shieldLightLayer              = 3;
     this._shieldLightMax                = 1f;
     this._layerWeightTransitionDuration = 0.3f;
     this.config                     = (MonsterDefendMixin)config;
     this._defendAngle               = instancedAbility.Evaluate(this.config.DefendAngle);
     this._defendActionTimer         = new EntityTimer(instancedAbility.Evaluate(this.config.DefendActionCD));
     this._inDefendStateTimer        = new EntityTimer(instancedAbility.Evaluate(this.config.InDefendMaxTime));
     this._breakDefendAniDamageRatio = instancedAbility.Evaluate(this.config.BreakDefendAniDamageRatio);
     this._defendActionRange         = instancedAbility.Evaluate(this.config.DefendActionRange);
     this._defendActionChance        = instancedAbility.Evaluate(this.config.DefendActionChance);
     this._defendActionChance        = Mathf.Clamp(this._defendActionChance, 0f, 1f);
     this._defendActionTimer.SetActive(this.config.DefendSuccessActions.Length > 0);
     this._shieldLightLayer  = this.config.ShieldLightLayer;
     this._shieldLightMax    = Mathf.Clamp(this.config.ShieldLightMax, 0f, 1f);
     this._shieldLightMin    = Mathf.Clamp(this.config.ShieldLightMin, 0f, 1f);
     this._allowLayerControl = this.config.AllowLayerLightControl;
     this._animatorEntity    = (BaseMonoAnimatorEntity)base.entity;
 }