Exemplo n.º 1
0
    protected virtual void Update()
    {
        int num = 0;

        while (num < hitOffTimers.Count)
        {
            if (hitOffTimers[num].endTime <= Time.get_time())
            {
                hitOffFlag &= ~hitOffTimers[num].hitOffFlag;
                hitOffTimers.RemoveAt(num);
            }
            else
            {
                num++;
            }
        }
        if (packetReceiver != null)
        {
            packetReceiver.OnUpdate();
        }
        if (packetSender != null)
        {
            packetSender.OnUpdate();
        }
        UpdateWaitingPacket();
        int i = 0;

        for (int count = continuationList.Count; i < count; i++)
        {
            OnAttackedContinuationUpdate(continuationList[i]);
        }
    }
Exemplo n.º 2
0
 public StageObject()
 {
     objectType               = OBJECT_TYPE.STAGE_OBJECT;
     id                       = 0;
     isInitialized            = false;
     coopMode                 = COOP_MODE_TYPE.NONE;
     coopClientId             = 0;
     isCoopInitialized        = false;
     hitOffFlag               = HIT_OFF_FLAG.NONE;
     ignoreHitAttackColliders = new List <Collider>();
 }
Exemplo n.º 3
0
 public virtual void OnLoadComplete()
 {
     nodeCache.Clear();
     hitOffFlag &= ~HIT_OFF_FLAG.LOAD;
     isLoading   = false;
     _rigidbody  = this.GetComponent <Rigidbody>();
     _collider   = this.GetComponent <Collider>();
     if (!isInitialized)
     {
         Initialize();
     }
     if (MonoBehaviourSingleton <MiniMap> .IsValid())
     {
         MonoBehaviourSingleton <MiniMap> .I.Attach(this);
     }
 }
Exemplo n.º 4
0
 public virtual void SetHitOffTimer(HIT_OFF_FLAG flag, float time)
 {
     if (!(time <= 0f) && flag != 0)
     {
         hitOffFlag |= flag;
         float num = Time.get_time() + time;
         int   i   = 0;
         for (int count = hitOffTimers.Count; i < count; i++)
         {
             if (hitOffTimers[i].hitOffFlag == flag)
             {
                 if (hitOffTimers[i].endTime < num)
                 {
                     hitOffTimers[i].endTime = num;
                 }
                 return;
             }
         }
         HitOffTimer hitOffTimer = new HitOffTimer();
         hitOffTimer.endTime    = num;
         hitOffTimer.hitOffFlag = flag;
         hitOffTimers.Add(hitOffTimer);
     }
 }
Exemplo n.º 5
0
    public virtual void OnAnimEvent(AnimEventData.EventData data)
    {
        //IL_0078: Unknown result type (might be due to invalid IL or missing references)
        switch (data.id)
        {
        case AnimEventFormat.ID.SHAKE_CAMERA:
        {
            float percent    = data.floatArgs[0];
            float cycle_time = (data.floatArgs.Length <= 1) ? 0f : data.floatArgs[1];
            if (MonoBehaviourSingleton <InGameCameraManager> .IsValid())
            {
                MonoBehaviourSingleton <InGameCameraManager> .I.SetShakeCamera(_position, percent, cycle_time);
            }
            return;
        }

        case AnimEventFormat.ID.INVICIBLE_ON:
            hitOffFlag |= HIT_OFF_FLAG.INVICIBLE;
            return;

        case AnimEventFormat.ID.INVICIBLE_OFF:
            hitOffFlag &= ~HIT_OFF_FLAG.INVICIBLE;
            return;

        case AnimEventFormat.ID.SE_ONESHOT:
        {
            int    num2  = data.intArgs[0];
            string name2 = data.stringArgs[0];
            if (num2 != 0)
            {
                if (EnablePlaySound())
                {
                    SoundManager.PlayOneShotSE(num2, this, FindNode(name2));
                }
                return;
            }
            break;
        }

        case AnimEventFormat.ID.SE_LOOP_PLAY:
        {
            int num = data.intArgs[0];
            if (data.intArgs.Length > 1 && data.intArgs[1] != 0)
            {
                loopSeForceEndList.Add(num);
            }
            string name = data.stringArgs[0];
            if (EnablePlaySound())
            {
                SoundManager.PlayLoopSE(num, this, FindNode(name));
            }
            return;
        }

        case AnimEventFormat.ID.SE_LOOP_STOP:
        {
            int se_id = data.intArgs[0];
            SoundManager.StopLoopSE(se_id, this);
            return;
        }
        }
        Log.Error(LOG.INGAME, "AnimEvent Error! Event={0} Object={1}", data.name, this.get_name());
    }
Exemplo n.º 6
0
 public virtual void OnLoadStart()
 {
     isLoading = true;
     Clear();
     hitOffFlag |= HIT_OFF_FLAG.LOAD;
 }