Exemplo n.º 1
0
    // Token: 0x06001F7B RID: 8059 RVA: 0x000970A4 File Offset: 0x000952A4
    public bool Shoot()
    {
        bool result = false;

        if (this.IsWeaponReady)
        {
            if (this.CheckAmmoCount())
            {
                this._currentSlot.InputHandler.FireHandler.RegisterShot();
                if (!GameFlags.IsFlagSet(GameFlags.GAME_FLAGS.QuickSwitch, GameState.Current.RoomData.GameFlags))
                {
                    this._holsterTime = WeaponConfigurationHelper.GetRateOfFire(this._currentSlot.View);
                }
                Ray ray = new Ray(GameState.Current.PlayerData.ShootingPoint + GameState.Current.Player.EyePosition, GameState.Current.PlayerData.ShootingDirection);
                CmunePairList <BaseGameProp, ShotPoint> cmunePairList;
                this._currentSlot.Logic.Shoot(ray, out cmunePairList);
                if (!this._currentSlot.Decorator.HasShootAnimation)
                {
                    WeaponFeedbackManager.Instance.Fire();
                }
                AmmoDepot.UseAmmoOfClass(this._currentSlot.View.ItemClass, this._currentSlot.Logic.AmmoCountPerShot);
                GameState.Current.PlayerData.WeaponFired.Value = this._currentSlot;
                result = true;
            }
            else
            {
                this._currentSlot.Decorator.PlayOutOfAmmoSound();
                GameData.Instance.OnNotificationFull.Fire(string.Empty, "Out of ammo!", 1f);
            }
        }
        return(result);
    }
 // Token: 0x0600204B RID: 8267 RVA: 0x0009A550 File Offset: 0x00098750
 public void Shoot(ICharacterState state)
 {
     if (state != null && this._nextShootTime < Time.time && this._currentSlot != null && (!(this._currentSlot.Logic is ProjectileWeapon) || this._currentSlot.View.ItemClass == UberstrikeItemClass.WeaponSplattergun))
     {
         this._nextShootTime = Time.time + WeaponConfigurationHelper.GetRateOfFire(this._currentSlot.View);
         this.BeginShooting();
         CmunePairList <BaseGameProp, ShotPoint> cmunePairList;
         this._currentSlot.Logic.Shoot(new Ray(this.ShootingPoint(state) + GameState.Current.Player.EyePosition, this.ShootingDirection(state)), out cmunePairList);
         this.EndShooting();
     }
 }
 // Token: 0x06001F11 RID: 7953 RVA: 0x00095EA0 File Offset: 0x000940A0
 public SniperRifleInputHandler(IWeaponLogic logic, bool isLocal, ZoomInfo zoomInfo, UberStrikeItemWeaponView view) : base(logic, isLocal)
 {
     this._zoomInfo = zoomInfo;
     if (view.HasAutomaticFire)
     {
         base.FireHandler = new FullAutoFireHandler(logic.Decorator, WeaponConfigurationHelper.GetRateOfFire(view));
     }
     else
     {
         base.FireHandler = new SemiAutoFireHandler(logic.Decorator, WeaponConfigurationHelper.GetRateOfFire(view));
     }
 }
 // Token: 0x06001EF8 RID: 7928 RVA: 0x00095E44 File Offset: 0x00094044
 public DefaultWeaponInputHandler(IWeaponLogic logic, bool isLocal, UberStrikeItemWeaponView view, IWeaponFireHandler secondaryFireHandler = null) : base(logic, isLocal)
 {
     if (view.HasAutomaticFire)
     {
         base.FireHandler = new FullAutoFireHandler(logic.Decorator, WeaponConfigurationHelper.GetRateOfFire(view));
     }
     else
     {
         base.FireHandler = new SemiAutoFireHandler(logic.Decorator, WeaponConfigurationHelper.GetRateOfFire(view));
     }
     this._secondaryFireHandler = secondaryFireHandler;
 }
    // Token: 0x06001FAD RID: 8109 RVA: 0x00097F80 File Offset: 0x00096180
    public static Vector3 ApplyDispersion(Vector3 shootingRay, UberStrikeItemWeaponView view, bool ironSight)
    {
        float num = WeaponConfigurationHelper.GetAccuracySpread(view);

        if (WeaponFeedbackManager.Instance && WeaponFeedbackManager.Instance.IsIronSighted && ironSight)
        {
            num *= 0.5f;
        }
        Vector2 vector = UnityEngine.Random.insideUnitCircle * num * 0.5f;

        return(Quaternion.AngleAxis(vector.x, GameState.Current.Player.WeaponCamera.transform.right) * Quaternion.AngleAxis(vector.y, GameState.Current.Player.WeaponCamera.transform.up) * shootingRay);
    }
 // Token: 0x06002040 RID: 8256 RVA: 0x00099FCC File Offset: 0x000981CC
 public Projectile EmitProjectile(Ray ray, int projectileID, int cmid)
 {
     if (this._decorator && this._decorator.Missle)
     {
         Vector3    muzzlePosition = this._decorator.MuzzlePosition;
         Quaternion rotation       = Quaternion.LookRotation(ray.direction);
         Projectile projectile     = UnityEngine.Object.Instantiate(this._decorator.Missle, muzzlePosition, rotation) as Projectile;
         if (projectile)
         {
             if (projectile is GrenadeProjectile)
             {
                 GrenadeProjectile grenadeProjectile = projectile as GrenadeProjectile;
                 grenadeProjectile.Sticky = base.Config.Sticky;
             }
             projectile.transform.parent = ProjectileManager.Container.transform;
             projectile.gameObject.tag   = "Prop";
             projectile.ExplosionEffect  = this.ExplosionType;
             projectile.TimeOut          = this._decorator.MissileTimeOut;
             projectile.SetExplosionSound(this._decorator.ExplosionSound);
             projectile.transform.position = ray.origin + (float)this.MinProjectileDistance * ray.direction;
             if (base.Controller.IsLocal)
             {
                 projectile.gameObject.layer = 26;
             }
             else
             {
                 projectile.gameObject.layer = 24;
             }
             CharacterConfig characterConfig;
             if (GameState.Current != null && GameState.Current.TryGetPlayerAvatar(cmid, out characterConfig) && characterConfig.Avatar.Decorator && projectile.gameObject.activeSelf)
             {
                 foreach (CharacterHitArea characterHitArea in characterConfig.Avatar.Decorator.HitAreas)
                 {
                     if (characterHitArea.gameObject.activeInHierarchy)
                     {
                         Physics.IgnoreCollision(projectile.gameObject.collider, characterHitArea.collider);
                     }
                 }
             }
             projectile.MoveInDirection(ray.direction * WeaponConfigurationHelper.GetProjectileSpeed(this._view));
             return(projectile);
         }
     }
     return(null);
 }
Exemplo n.º 7
0
 // Token: 0x06001FBA RID: 8122 RVA: 0x000984FC File Offset: 0x000966FC
 public void PickUp(WeaponSlot slot)
 {
     if (this._pickupWeaponState != null && this._pickupWeaponState.IsValid)
     {
         if (this._pickupWeaponState.Weapon == slot.Logic)
         {
             return;
         }
         this.PutDownWeapon(this._pickupWeaponState.Weapon, this._pickupWeaponState.Decorator, false);
     }
     else if (this._pickupWeaponState == null && this._putDownWeaponState != null && this._putDownWeaponState.Weapon == slot.Logic)
     {
         this._putDownWeaponState.Finish();
     }
     this._pickupWeaponState    = new WeaponFeedbackManager.PickUpState(slot.Logic, slot.Decorator);
     this.WeaponFire.recoilTime = WeaponConfigurationHelper.GetRateOfFire(slot.View);
     this.WeaponFire.strength   = WeaponConfigurationHelper.GetRecoilMovement(slot.View);
     this.WeaponFire.angle      = WeaponConfigurationHelper.GetRecoilKickback(slot.View);
 }
Exemplo n.º 8
0
    // Token: 0x0600140C RID: 5132 RVA: 0x00073F38 File Offset: 0x00072138
    public IEnumerator StartGetShop()
    {
        yield return(ShopWebServiceClient.GetShop(delegate(UberStrikeItemShopClientView shop)
        {
            if (shop != null)
            {
                this.UpdateShopItems(shop);
                WeaponConfigurationHelper.UpdateWeaponStatistics(shop);
            }
            else
            {
                Debug.LogError("ShopWebServiceClient.GetShop returned with NULL");
            }
        }, delegate(Exception ex)
        {
            Debug.LogError(ex);
        }));

        yield break;
    }
Exemplo n.º 9
0
 // Token: 0x06001F99 RID: 8089 RVA: 0x0009788C File Offset: 0x00095A8C
 private void ApplyDamage(WeaponSlot slot, CmunePairList <BaseGameProp, ShotPoint> hits)
 {
     foreach (KeyValuePair <BaseGameProp, ShotPoint> keyValuePair in hits)
     {
         DamageInfo damageInfo = new DamageInfo(Convert.ToInt16(slot.View.DamagePerProjectile * keyValuePair.Value.Count))
         {
             Bullets = (byte)keyValuePair.Value.Count,
             Force   = GameState.Current.Player.WeaponCamera.transform.forward * (float)(slot.View.DamagePerProjectile * keyValuePair.Value.Count),
             UpwardsForceMultiplier = 10f,
             Hitpoint            = keyValuePair.Value.MidPoint,
             ProjectileID        = keyValuePair.Value.ProjectileId,
             SlotId              = slot.SlotId,
             WeaponID            = slot.View.ID,
             WeaponClass         = slot.View.ItemClass,
             CriticalStrikeBonus = WeaponConfigurationHelper.GetCriticalStrikeBonus(slot.View)
         };
         if (keyValuePair.Key != null)
         {
             keyValuePair.Key.ApplyDamage(damageInfo);
         }
     }
 }
 // Token: 0x06001DE9 RID: 7657 RVA: 0x00013EA3 File Offset: 0x000120A3
 public static float GetSplashRadius(UberStrikeItemWeaponView view)
 {
     return((view == null) ? 0f : ((float)WeaponConfigurationHelper.GetSecureSplashRadius(view.ID) / 100f));
 }
Exemplo n.º 11
0
    // Token: 0x060009B5 RID: 2485 RVA: 0x0003D888 File Offset: 0x0003BA88
    public void SetItem(IUnityItem item, Rect bounds, PopupViewSide side, int daysLeft = -1, BuyingDurationType duration = BuyingDurationType.None)
    {
        if (Event.current.type != EventType.Repaint || item == null || Singleton <ItemManager> .Instance.IsDefaultGearItem(item.View.PrefabName) || (item.View.LevelLock > PlayerDataManager.PlayerLevel && !Singleton <InventoryManager> .Instance.Contains(item.View.ID)))
        {
            return;
        }
        bool flag = this._alpha < Time.time + 0.1f;

        this._alpha = Mathf.Lerp(this._alpha, Time.time + 1.1f, Time.deltaTime * 12f);
        if (this._item != item || this._cacheRect != bounds || !this.IsEnabled)
        {
            this._cacheRect   = bounds;
            bounds            = GUITools.ToGlobal(bounds);
            this.IsEnabled    = true;
            this._item        = item;
            this._level       = ((item.View == null) ? 0 : item.View.LevelLock);
            this._description = ((item.View == null) ? string.Empty : item.View.Description);
            this._daysLeft    = daysLeft;
            this._criticalHit = 0;
            this._duration    = duration;
            switch (side)
            {
            case PopupViewSide.Left:
            {
                float tipPosition = bounds.y - 10f + bounds.height * 0.5f;
                Rect  rect        = new Rect(bounds.x - this.Size.x - 9f, bounds.y - this.Size.y * 0.5f, this.Size.x, this.Size.y);
                Rect  rect2       = new Rect(rect.xMax - 1f, tipPosition, 12f, 21f);
                if (rect.y <= (float)GlobalUIRibbon.Instance.Height())
                {
                    rect.y += (float)GlobalUIRibbon.Instance.Height() - rect.y;
                }
                if (rect.yMax >= (float)Screen.height)
                {
                    rect.y -= rect.yMax - (float)Screen.height;
                }
                if (rect2.y < this._finalRect.y || rect2.yMax > this._finalRect.yMax || this._finalRect.x != rect.x)
                {
                    this._finalRect = rect;
                    if (flag)
                    {
                        this._rect = rect;
                    }
                }
                this.OnDrawTip = delegate()
                {
                    GUI.DrawTexture(new Rect(this._rect.xMax - 1f, tipPosition, 12f, 21f), ConsumableHudTextures.TooltipRight);
                };
                break;
            }

            case PopupViewSide.Top:
            {
                float tipPosition = bounds.x - 10f + bounds.width * 0.5f;
                Rect  rect3       = new Rect(bounds.x + (bounds.width - this.Size.x) * 0.5f, bounds.y - this.Size.y - 9f, this.Size.x, this.Size.y);
                Rect  rect4       = new Rect(tipPosition, rect3.yMax - 1f, 21f, 12f);
                if (rect3.xMin <= 10f)
                {
                    rect3.x = 10f;
                }
                if (rect3.xMax >= (float)(Screen.width - 10))
                {
                    rect3.x -= rect3.xMax - (float)Screen.width + 10f;
                }
                if (rect4.x < this._finalRect.x || rect4.xMax > this._finalRect.xMax || this._finalRect.y != rect3.y)
                {
                    this._finalRect = rect3;
                    if (flag)
                    {
                        this._rect = rect3;
                    }
                }
                this.OnDrawTip = delegate()
                {
                    GUI.DrawTexture(new Rect(tipPosition, this._rect.yMax - 1f, 21f, 12f), ConsumableHudTextures.TooltipDown);
                };
                break;
            }
            }
            switch (item.View.ItemClass)
            {
            case UberstrikeItemClass.WeaponMelee:
            {
                this.OnDrawItemDetails = new Action(this.DrawMeleeWeapon);
                UberStrikeItemWeaponView uberStrikeItemWeaponView = item.View as UberStrikeItemWeaponView;
                if (uberStrikeItemWeaponView != null)
                {
                    this._damage.Value   = WeaponConfigurationHelper.GetDamage(uberStrikeItemWeaponView);
                    this._damage.Max     = WeaponConfigurationHelper.MaxDamage;
                    this._fireRate.Value = WeaponConfigurationHelper.GetRateOfFire(uberStrikeItemWeaponView);
                    this._fireRate.Max   = WeaponConfigurationHelper.MaxRateOfFire;
                }
                return;
            }

            case UberstrikeItemClass.WeaponMachinegun:
            case UberstrikeItemClass.WeaponShotgun:
            case UberstrikeItemClass.WeaponSniperRifle:
            {
                this.OnDrawItemDetails = new Action(this.DrawInstantHitWeapon);
                UberStrikeItemWeaponView uberStrikeItemWeaponView2 = item.View as UberStrikeItemWeaponView;
                if (uberStrikeItemWeaponView2 != null)
                {
                    this._ammo.Value     = WeaponConfigurationHelper.GetAmmo(uberStrikeItemWeaponView2);
                    this._ammo.Max       = WeaponConfigurationHelper.MaxAmmo;
                    this._damage.Value   = WeaponConfigurationHelper.GetDamage(uberStrikeItemWeaponView2);
                    this._damage.Max     = WeaponConfigurationHelper.MaxDamage;
                    this._fireRate.Value = WeaponConfigurationHelper.GetRateOfFire(uberStrikeItemWeaponView2);
                    this._fireRate.Max   = WeaponConfigurationHelper.MaxRateOfFire;
                    this._accuracy.Value = WeaponConfigurationHelper.MaxAccuracySpread - WeaponConfigurationHelper.GetAccuracySpread(uberStrikeItemWeaponView2);
                    this._accuracy.Max   = WeaponConfigurationHelper.MaxAccuracySpread;
                    //_armorPierced.Value = WeaponConfigurationHelper.GetArmorPierced(uberStrikeItemWeaponView2);
                    //_armorPierced.Max = WeaponConfigurationHelper.MaxArmorPierced;

                    if (item.View.ItemProperties.ContainsKey(ItemPropertyType.CritDamageBonus))
                    {
                        this._criticalHit = item.View.ItemProperties[ItemPropertyType.CritDamageBonus];
                    }
                    else
                    {
                        this._criticalHit = 0;
                    }
                }
                return;
            }

            case UberstrikeItemClass.WeaponCannon:
            case UberstrikeItemClass.WeaponSplattergun:
            case UberstrikeItemClass.WeaponLauncher:
            {
                this.OnDrawItemDetails = new Action(this.DrawProjectileWeapon);
                UberStrikeItemWeaponView uberStrikeItemWeaponView3 = item.View as UberStrikeItemWeaponView;
                if (uberStrikeItemWeaponView3 != null)
                {
                    this._ammo.Value         = WeaponConfigurationHelper.GetAmmo(uberStrikeItemWeaponView3);
                    this._ammo.Max           = WeaponConfigurationHelper.MaxAmmo;
                    this._damage.Value       = WeaponConfigurationHelper.GetDamage(uberStrikeItemWeaponView3);
                    this._damage.Max         = WeaponConfigurationHelper.MaxDamage;
                    this._fireRate.Value     = WeaponConfigurationHelper.GetRateOfFire(uberStrikeItemWeaponView3);
                    this._fireRate.Max       = WeaponConfigurationHelper.MaxRateOfFire;
                    this._velocity.Value     = WeaponConfigurationHelper.GetProjectileSpeed(uberStrikeItemWeaponView3);
                    this._velocity.Max       = WeaponConfigurationHelper.MaxProjectileSpeed;
                    this._damageRadius.Value = WeaponConfigurationHelper.GetSplashRadius(uberStrikeItemWeaponView3);
                    this._damageRadius.Max   = WeaponConfigurationHelper.MaxSplashRadius;
                }
                return;
            }

            case UberstrikeItemClass.GearBoots:
            case UberstrikeItemClass.GearHead:
            case UberstrikeItemClass.GearFace:
            case UberstrikeItemClass.GearUpperBody:
            case UberstrikeItemClass.GearLowerBody:
            case UberstrikeItemClass.GearGloves:
            case UberstrikeItemClass.GearHolo:
                this.OnDrawItemDetails   = new Action(this.DrawGear);
                this._armorCarried.Value = (float)((UberStrikeItemGearView)item.View).ArmorPoints;
                this._armorCarried.Max   = 200f;
                return;

            case UberstrikeItemClass.QuickUseGeneral:
            case UberstrikeItemClass.QuickUseGrenade:
            case UberstrikeItemClass.QuickUseMine:
                this.OnDrawItemDetails = new Action(this.DrawQuickItem);
                return;
            }
            this.OnDrawItemDetails = null;
        }
    }
 // Token: 0x06001DE6 RID: 7654 RVA: 0x00013E41 File Offset: 0x00012041
 public static float GetAccuracySpread(UberStrikeItemWeaponView view)
 {
     return((view == null) ? 0f : ((float)WeaponConfigurationHelper.GetSecureSpread(view.ID) / 10f));
 }
 // Token: 0x06000E43 RID: 3651 RVA: 0x00061858 File Offset: 0x0005FA58
 public void Draw()
 {
     if (this._item != null)
     {
         GUITools.ProgressBar(new Rect(14f, 95f, 165f, 12f), LocalizedStrings.Damage, WeaponConfigurationHelper.GetDamageNormalized(this._item), ColorScheme.ProgressBar, 64);
         GUITools.ProgressBar(new Rect(14f, 111f, 165f, 12f), LocalizedStrings.RateOfFire, WeaponConfigurationHelper.GetRateOfFireNormalized(this._item), ColorScheme.ProgressBar, 64);
         if (this._item.ItemClass == UberstrikeItemClass.WeaponCannon || this._item.ItemClass == UberstrikeItemClass.WeaponLauncher || this._item.ItemClass == UberstrikeItemClass.WeaponSplattergun)
         {
             GUITools.ProgressBar(new Rect(175f, 95f, 165f, 12f), LocalizedStrings.Velocity, WeaponConfigurationHelper.GetProjectileSpeedNormalized(this._item), ColorScheme.ProgressBar, 64);
             GUITools.ProgressBar(new Rect(175f, 111f, 165f, 12f), LocalizedStrings.Impact, WeaponConfigurationHelper.GetSplashRadiusNormalized(this._item), ColorScheme.ProgressBar, 64);
         }
         else if (this._item.ItemClass == UberstrikeItemClass.WeaponMelee)
         {
             bool enabled = GUI.enabled;
             GUI.enabled = false;
             GUITools.ProgressBar(new Rect(175f, 95f, 165f, 12f), LocalizedStrings.Accuracy, 0f, ColorScheme.ProgressBar, 64);
             GUITools.ProgressBar(new Rect(175f, 111f, 165f, 12f), LocalizedStrings.Recoil, 0f, ColorScheme.ProgressBar, 64);
             GUI.enabled = enabled;
         }
         else
         {
             GUITools.ProgressBar(new Rect(175f, 95f, 165f, 12f), LocalizedStrings.Accuracy, WeaponConfigurationHelper.GetAccuracySpreadNormalized(this._item), ColorScheme.ProgressBar, 64);
             GUITools.ProgressBar(new Rect(175f, 111f, 165f, 12f), LocalizedStrings.Recoil, WeaponConfigurationHelper.GetRecoilKickbackNormalized(this._item), ColorScheme.ProgressBar, 64);
             //GUITools.ProgressBar(new Rect(175f, 127f, 165f, 12f), LocalizedStrings.ArmorPierced, WeaponConfigurationHelper.GetArmorPiercedNormalized(this._item), ColorScheme.ProgressBar, 64);
         }
     }
 }
Exemplo n.º 14
0
    // Token: 0x06001F9A RID: 8090 RVA: 0x000979E8 File Offset: 0x00095BE8
    private void AddGameLogicToWeapon(WeaponSlot weapon)
    {
        float movement = WeaponConfigurationHelper.GetRecoilMovement(weapon.View);
        float kickback = WeaponConfigurationHelper.GetRecoilKickback(weapon.View);
        global::LoadoutSlotType slot = weapon.Slot;

        if (weapon.Logic is ProjectileWeapon)
        {
            ProjectileWeapon w = weapon.Logic as ProjectileWeapon;
            w.OnProjectileShoot += delegate(ProjectileInfo p)
            {
                ProjectileDetonator projectileDetonator = new ProjectileDetonator(WeaponConfigurationHelper.GetSplashRadius(weapon.View), (float)weapon.View.DamagePerProjectile, weapon.View.DamageKnockback, p.Direction, weapon.SlotId, p.Id, weapon.View.ID, weapon.View.ItemClass, w.Config.DamageEffectFlag, w.Config.DamageEffectValue);
                if (p.Projectile != null)
                {
                    p.Projectile.Detonator = projectileDetonator;
                    if (weapon.View.ItemClass != UberstrikeItemClass.WeaponSplattergun)
                    {
                        GameState.Current.Actions.EmitProjectile(p.Position, p.Direction, slot, p.Id, false);
                    }
                }
                else
                {
                    projectileDetonator.Explode(p.Position);
                    if (weapon.View.ItemClass != UberstrikeItemClass.WeaponSplattergun)
                    {
                        GameState.Current.Actions.EmitProjectile(p.Position, p.Direction, slot, p.Id, true);
                    }
                }
                if (weapon.View.ItemClass != UberstrikeItemClass.WeaponSplattergun)
                {
                    if (w.HasProjectileLimit)
                    {
                        Singleton <ProjectileManager> .Instance.AddLimitedProjectile(p.Projectile, p.Id, w.MaxConcurrentProjectiles);
                    }
                    else
                    {
                        Singleton <ProjectileManager> .Instance.AddProjectile(p.Projectile, p.Id);
                    }
                }
                LevelCamera.DoFeedback(LevelCamera.FeedbackType.ShootWeapon, Vector3.back, 0f, movement / 8f, 0.1f, 0.3f, kickback / 3f, Vector3.left);
            };
        }
        else if (weapon.Logic is MeleeWeapon)
        {
            float delay = weapon.Logic.HitDelay;
            weapon.Logic.OnTargetHit += delegate(CmunePairList <BaseGameProp, ShotPoint> h)
            {
                if (!weapon.View.HasAutomaticFire)
                {
                    GameState.Current.Actions.SingleBulletFire();
                }
                if (h != null)
                {
                    UnityRuntime.StartRoutine(this.StartApplyDamage(weapon, delay, h));
                }
                LevelCamera.DoFeedback(LevelCamera.FeedbackType.ShootWeapon, Vector3.back, 0f, movement / 8f, 0.1f, 0.3f, kickback / 3f, Vector3.left);
            };
        }
        else
        {
            weapon.Logic.OnTargetHit += delegate(CmunePairList <BaseGameProp, ShotPoint> h)
            {
                if (!weapon.View.HasAutomaticFire)
                {
                    GameState.Current.Actions.SingleBulletFire();
                }
                if (h != null)
                {
                    this.ApplyDamage(weapon, h);
                }
                LevelCamera.DoFeedback(LevelCamera.FeedbackType.ShootWeapon, Vector3.back, 0f, movement / 8f, 0.1f, 0.3f, kickback / 3f, Vector3.left);
            };
        }
    }
Exemplo n.º 15
0
    // Token: 0x060009BA RID: 2490 RVA: 0x0003E504 File Offset: 0x0003C704
    private void DrawInstantHitWeapon()
    {
        bool flag = Singleton <DragAndDrop> .Instance.IsDragging && ShopUtils.IsInstantHitWeapon(Singleton <DragAndDrop> .Instance.DraggedItem.Item) && Singleton <DragAndDrop> .Instance.DraggedItem.Item.View.ItemClass == this._item.View.ItemClass;

        this.ProgressBar(new Rect(20f, 120f, 200f, 12f), this._damage.Title, this._damage.Percent, ColorScheme.ProgressBar, string.Empty);
        this.ProgressBar(new Rect(20f, 135f, 200f, 12f), this._fireRate.Title, 1f - this._fireRate.Percent, ColorScheme.ProgressBar, string.Empty);
        this.ProgressBar(new Rect(20f, 150f, 200f, 12f), this._accuracy.Title, this._accuracy.Percent, ColorScheme.ProgressBar, string.Empty);
        this.ProgressBar(new Rect(20f, 165f, 200f, 12f), this._ammo.Title, this._ammo.Percent, ColorScheme.ProgressBar, string.Empty);
        //this.ProgressBar(new Rect(20f, 180f, 200f, 12f), this._armorPierced.Title, this._armorPierced.Percent, ColorScheme.ProgressBar, string.Empty);
        if (flag)
        {
            UberStrikeItemWeaponView view = Singleton <DragAndDrop> .Instance.DraggedItem.Item.View as UberStrikeItemWeaponView;
            this.ComparisonOverlay(new Rect(20f, 120f, 200f, 12f), this._damage.Percent, WeaponConfigurationHelper.GetDamageNormalized(view));
            this.ComparisonOverlay(new Rect(20f, 135f, 200f, 12f), 1f - this._fireRate.Percent, 1f - WeaponConfigurationHelper.GetRateOfFireNormalized(view));
            this.ComparisonOverlay(new Rect(20f, 150f, 200f, 12f), this._accuracy.Percent, 1f - WeaponConfigurationHelper.GetAccuracySpreadNormalized(view));
        }
    }
Exemplo n.º 16
0
 // Token: 0x060009BB RID: 2491 RVA: 0x0003E72C File Offset: 0x0003C92C
 private void DrawMeleeWeapon()
 {
     this.ProgressBar(new Rect(20f, 120f, 200f, 12f), this._damage.Title, this._damage.Percent, ColorScheme.ProgressBar, string.Empty);
     this.ProgressBar(new Rect(20f, 135f, 200f, 12f), this._fireRate.Title, 1f - this._fireRate.Percent, ColorScheme.ProgressBar, string.Empty);
     if (Singleton <DragAndDrop> .Instance.IsDragging && ShopUtils.IsMeleeWeapon(Singleton <DragAndDrop> .Instance.DraggedItem.Item))
     {
         UberStrikeItemWeaponView view = Singleton <DragAndDrop> .Instance.DraggedItem.Item.View as UberStrikeItemWeaponView;
         this.ComparisonOverlay(new Rect(20f, 120f, 200f, 12f), this._damage.Percent, WeaponConfigurationHelper.GetDamageNormalized(view));
         this.ComparisonOverlay(new Rect(20f, 135f, 200f, 12f), 1f - this._fireRate.Percent, 1f - WeaponConfigurationHelper.GetRateOfFireNormalized(view));
     }
 }
 // Token: 0x06001DE7 RID: 7655 RVA: 0x00013E65 File Offset: 0x00012065
 public static float GetRateOfFire(UberStrikeItemWeaponView view)
 {
     return((view == null) ? 1f : ((float)WeaponConfigurationHelper.GetSecureRateOfFire(view.ID) / 1000f));
 }
Exemplo n.º 18
0
 // Token: 0x06001F09 RID: 7945 RVA: 0x000147D9 File Offset: 0x000129D9
 public MinigunInputHandler(IWeaponLogic logic, bool isLocal, MinigunWeaponDecorator weapon, UberStrikeItemWeaponView view) : base(logic, isLocal)
 {
     this._weapon     = weapon;
     base.FireHandler = new FullAutoFireHandler(weapon, WeaponConfigurationHelper.GetRateOfFire(view));
 }
 // Token: 0x06001DE8 RID: 7656 RVA: 0x00013E89 File Offset: 0x00012089
 public static float GetProjectileSpeed(UberStrikeItemWeaponView view)
 {
     return((float)((view == null) ? 1 : WeaponConfigurationHelper.GetSecureProjectileSpeed(view.ID)));
 }