Beispiel #1
0
        public void UpdateOutfit()
        {
            var weapon = Game.Player.Inventory.GetPrimaryWeapon();

            if (weapon != WeaponType.NONE)
            {
                _PrimaryWeapon = WeaponLibrary.GetWeaponData(weapon);
            }
            else
            {
                _PrimaryWeapon = null;
            }

            weapon = Game.Player.Inventory.GetSecondaryWeapon();
            if (weapon != WeaponType.NONE)
            {
                _SecondaryWeapon = WeaponLibrary.GetWeaponData(weapon);
            }
            else
            {
                _SecondaryWeapon = null;
            }
        }
Beispiel #2
0
        private void CmdShooting(ShootProjectileCommand cmd, int connId)
        {
            var weapon = WeaponLibrary.GetWeaponData(cmd.type);

            Game.Spawns.ShootProjectile(cmd.pos, cmd.dir, weapon, connId);
        }
 private void OnSetType(WeaponType type)
 {
     _Renderer.sprite = WeaponLibrary.GetWeaponData(type).projectileSprite;
 }