Ejemplo n.º 1
0
 protected override void Update()
 {
     base.UpdatePlugins();
     if (this._state == State.Idle)
     {
         this._destroyTimer.Core(1f);
         if (this._destroyTimer.isTimeUp)
         {
             if ((base.config.PropArguments.OnDestroyEffectPattern != null) && base.gameObject.activeSelf)
             {
                 this.FireEffect(base.config.PropArguments.OnDestroyEffectPattern);
             }
             if (!string.IsNullOrEmpty(base.config.PropArguments.AnimEventIDForHit) && this._toExplode)
             {
                 string animEventIDForHit   = base.config.PropArguments.AnimEventIDForHit;
                 ConfigPropAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(base.config, animEventIDForHit);
                 event2.AttackPattern.patternMethod(animEventIDForHit, event2.AttackPattern, this, (((int)1) << InLevelData.MONSTER_HITBOX_LAYER) | (((int)1) << InLevelData.AVATAR_HITBOX_LAYER));
             }
             this._destroyTimer.Reset(true);
             this._destroyTimer.timespan = 0.1f;
             this._state = State.WaitingForDestroy;
         }
     }
     else if (this._state == State.WaitingForDestroy)
     {
         this._destroyTimer.Core(1f);
         if (this._destroyTimer.isTimeUp)
         {
             this._destroyTimer.Reset(false);
             base._isToBeRemove = true;
         }
     }
 }
Ejemplo n.º 2
0
 public static AttackData CreateAttackDataFromAttackerAnimEvent(BaseActor from, string animEventID)
 {
     if (from is AvatarActor)
     {
         AvatarActor           actor  = (AvatarActor)from;
         ConfigAvatarAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(actor.config, animEventID);
         return(CreateAttackDataFromAttackProperty(from, event2.AttackProperty, event2.AttackEffect, event2.CameraShake));
     }
     if (from is MonsterActor)
     {
         MonsterActor           actor2     = (MonsterActor)from;
         ConfigMonsterAnimEvent event3     = SharedAnimEventData.ResolveAnimEvent(actor2.config, animEventID);
         AttackData             attackData = CreateAttackDataFromAttackProperty(from, event3.AttackProperty, event3.AttackEffect, event3.CameraShake);
         actor2.RefillAttackDataDamagePercentage(animEventID, ref attackData);
         return(attackData);
     }
     if (from is PropObjectActor)
     {
         PropObjectActor     actor3 = (PropObjectActor)from;
         ConfigPropAnimEvent event4 = SharedAnimEventData.ResolveAnimEvent(actor3.config, animEventID);
         return(CreateAttackDataFromAttackProperty(from, event4.AttackProperty, event4.AttackEffect, event4.CameraShake));
     }
     return(null);
 }
Ejemplo n.º 3
0
        public override void TriggerAttackPattern(string animEventID, LayerMask layerMask)
        {
            ConfigPropAnimEvent event2 = SharedAnimEventData.ResolveAnimEvent(this.config, animEventID);

            event2.AttackPattern.patternMethod(animEventID, event2.AttackPattern, this, layerMask);
        }