protected override void Initialize()
        {
            _playerInfo = base.Entity.Get<CPlayerInfo>();
            _weapon = base.Entity.Get<CWeapon>();
            _movementThumbstick = this.EntityWorld.FindEntityByName(EntityNames.MovementThumbStick).Get<CVirtualThumbstick>().Thumbstick;
            _rotationThumbstick = this.EntityWorld.FindEntityByName(EntityNames.RotationThumbStick).Get<CVirtualThumbstick>().Thumbstick;

            _boosterState = this.EntityWorld.Services.Get<IBoosterState>();
            _playerPassiveStats = this.EntityWorld.Services.Get<IPlayerPassiveStats>();
        }
        protected override void Initialize()
        {
            _weapon = base.Entity.Get<CWeapon>();

            IPlayerPassiveStats passiveStats = this.EntityWorld.Services.Get<IPlayerPassiveStats>();
            if (passiveStats.SpawnWithRandomWeapon)
            {
                _weapon.Weapon = WeaponFactory.CreateWeapon(EnumHelper.GetRandom<WeaponType>(Global.Random), passiveStats.AmmoMultiplier);
            }
        }
Example #3
0
 public WeaponRenderer(EntityWorld entityWorld)
 {
     _entityWorld = entityWorld;
     _playerWeapon = entityWorld.FindEntityByName(EntityNames.Player).Get<CWeapon>();
 }