Exemplo n.º 1
0
        // Token: 0x06000754 RID: 1876 RVA: 0x00032FE8 File Offset: 0x000311E8
        public CameraBobManager(LevelCamera camera)
        {
            this.camera  = camera;
            this.bobData = new Dictionary <LevelCamera.BobMode, LevelCamera.CameraBobManager.BobData>();
            foreach (object obj in Enum.GetValues(typeof(LevelCamera.BobMode)))
            {
                LevelCamera.BobMode key = (LevelCamera.BobMode)((int)obj);
                switch (key)
                {
                case LevelCamera.BobMode.Idle:
                    this.bobData[key] = new LevelCamera.CameraBobManager.BobData(0.2f, 0f, 2f);
                    continue;

                case LevelCamera.BobMode.Walk:
                    this.bobData[key] = new LevelCamera.CameraBobManager.BobData(0.3f, 0.3f, 6f);
                    continue;

                case LevelCamera.BobMode.Run:
                    this.bobData[key] = new LevelCamera.CameraBobManager.BobData(0.5f, 0.3f, 8f);
                    continue;

                case LevelCamera.BobMode.Crouch:
                    this.bobData[key] = new LevelCamera.CameraBobManager.BobData(0.8f, 0.8f, 12f);
                    continue;
                }
                this.bobData[key] = new LevelCamera.CameraBobManager.BobData(0f, 0f, 0f);
            }
            this.data = this.bobData[LevelCamera.BobMode.Idle];
        }
Exemplo n.º 2
0
 // Token: 0x06001FB5 RID: 8117 RVA: 0x00098174 File Offset: 0x00096374
 public static void SetBobMode(LevelCamera.BobMode mode)
 {
     if (WeaponFeedbackManager.Instance && WeaponFeedbackManager.Instance._bobManager.Mode != mode)
     {
         WeaponFeedbackManager.Instance._bobManager.Mode = mode;
         if (mode == LevelCamera.BobMode.Run)
         {
             WeaponFeedbackManager.Instance._needLerp = false;
             WeaponFeedbackManager.Instance._sign     = (float)((!AutoMonoBehaviour <InputManager> .Instance.IsDown(GameInputKey.Right)) ? 1 : -1);
             WeaponFeedbackManager.Instance._time     = Mathf.Asin(WeaponFeedbackManager.Instance._angleX / WeaponFeedbackManager.Instance._bobManager.Data.XAmplitude) / WeaponFeedbackManager.Instance._bobManager.Data.Frequency;
         }
         else
         {
             WeaponFeedbackManager.Instance._needLerp = true;
         }
     }
 }
Exemplo n.º 3
0
        // Token: 0x06001FC5 RID: 8133 RVA: 0x00098668 File Offset: 0x00096868
        public WeaponBobManager()
        {
            this._bobData = new Dictionary <LevelCamera.BobMode, WeaponFeedbackManager.WeaponBobManager.BobData>();
            foreach (object obj in Enum.GetValues(typeof(LevelCamera.BobMode)))
            {
                LevelCamera.BobMode key = (LevelCamera.BobMode)((int)obj);
                switch (key)
                {
                case LevelCamera.BobMode.Walk:
                    this._bobData[key] = new WeaponFeedbackManager.WeaponBobManager.BobData(0.5f, 3f, 6f);
                    continue;

                case LevelCamera.BobMode.Run:
                    this._bobData[key] = new WeaponFeedbackManager.WeaponBobManager.BobData(1f, 3f, 8f);
                    continue;

                case LevelCamera.BobMode.Crouch:
                    this._bobData[key] = new WeaponFeedbackManager.WeaponBobManager.BobData(0.5f, 3f, 12f);
                    continue;
                }
                this._bobData[key] = new WeaponFeedbackManager.WeaponBobManager.BobData(0f, 0f, 0f);
            }
            this._data = this._bobData[LevelCamera.BobMode.Idle];
        }