예제 #1
0
        public Shop(Player Owner)
        {
            this.Owner      = Owner;
            PlayerInventory = Owner.Equipment;

            ShopFilter           = ShopFilters.Characters;
            ListShopCharacter    = new List <CharacterMenuEquipment>();
            ListShopEquipment    = new List <MenuEquipment>();
            DragAndDropEquipment = null;
        }
예제 #2
0
        public IOnlineConnection OnlineClient;//Used by the server

        public Player(string ID, string Name, string PlayerType, bool IsOnline, int Team)
        {
            this.ConnectionID = ID;
            this.Name         = Name;
            this.PlayerType   = PlayerType;
            this.IsOnline     = IsOnline;
            this.Team         = Team;

            GameplayType = GameplayTypes.MouseAndKeyboard;

            Equipment = new PlayerEquipment();
        }
        public EquipmentLoadout(PlayerEquipment Equipment, RobotAnimation Owner)
        {
            if (Equipment.EquipedArmor != null && Equipment.EquipedArmor.Name == "Armor 1")
            {
                EquipedArmor = new Armor1(Owner);
            }
            else
            {
                EquipedArmor = new DefaultArmor(Owner);
            }

            EquipedBooster = new JumpJetpack(Owner.PlayerSFXGenerator, Owner);

            ArrayEquipment    = new UsableEquipment[6];
            ArrayEquipment[0] = new EmptyEquipment(Owner);
            ArrayEquipment[1] = new EmptyEquipment(Owner);
            ArrayEquipment[2] = EquipedArmor;
            ArrayEquipment[3] = new EmptyEquipment(Owner);
            ArrayEquipment[4] = EquipedBooster;
            //ArrayEquipment[5] = new LongJumpShoes(Owner);
            //ArrayEquipment[5] = new WallJumpShoes(Owner);
            ArrayEquipment[5] = new RegularShoes(Owner);
        }
예제 #4
0
        public Player(string ID, string Name, PlayerTypes PlayerType, bool IsOnline, int Team)
        {
            this.ConnectionID = ID;
            this.Name         = Name;
            this.IsOnline     = IsOnline;
            this.Team         = Team;

            if (PlayerType == PlayerTypes.Offline)
            {
                this.PlayerType = PlayerTypeOffline;
            }
            else if (PlayerType == PlayerTypes.Online)
            {
                this.PlayerType = PlayerTypeOnline;
            }
            else if (PlayerType == PlayerTypes.Host)
            {
                this.PlayerType = PlayerTypeHost;
            }
            else if (PlayerType == PlayerTypes.Player)
            {
                this.PlayerType = PlayerTypePlayer;
            }
            else if (PlayerType == PlayerTypes.Ready)
            {
                this.PlayerType = PlayerTypeReady;
            }
            else
            {
                this.PlayerType = PlayerTypeSpectator;
            }

            GameplayType = GameplayTypes.MouseAndKeyboard;

            Equipment = new PlayerEquipment();
        }
예제 #5
0
 public BuyEquipment(MenuEquipment EquipmentToBuy, Player Owner)
 {
     this.EquipmentToBuy = EquipmentToBuy;
     this.Owner          = Owner;
     PlayerInventory     = Owner.Equipment;
 }
 public BuyCharacter(CharacterMenuEquipment CharacterToBuy, Player Owner)
 {
     this.CharacterToBuy = CharacterToBuy;
     this.Owner          = Owner;
     PlayerInventory     = Owner.Equipment;
 }
예제 #7
0
        public Vehicle(string Name, Layer CurrentLayer, Vector2 Position, int Team, PlayerEquipment Equipment, ISFXGenerator PlayerSFXGenerator, List <Weapon> ListExtraWeapon)
            : base(Name, CurrentLayer, Position, Team, new EquipmentLoadout(), PlayerSFXGenerator)
        {
            ListUser = new List <RobotAnimation>();

            FileStream   FS = new FileStream("Content/Units/Triple Thunder/Vehicles/" + Name + ".peuv", FileMode.Open, FileAccess.Read);
            BinaryReader BR = new BinaryReader(FS, Encoding.UTF8);

            BR.BaseStream.Seek(0, SeekOrigin.Begin);

            MaxHP        = BR.ReadInt32();
            MaxEN        = BR.ReadInt32();
            Accel        = BR.ReadSingle();
            MaxWalkSpeed = BR.ReadSingle();
            JumpSpeed    = BR.ReadSingle();
            byte ControlType = BR.ReadByte();
            byte CaptureType = BR.ReadByte();

            HasKnockback = BR.ReadBoolean();
            IsDynamic    = BR.ReadBoolean();

            int ListExtraAnimationCount = BR.ReadInt32();

            ListStanceAnimation = new List <Weapon>(ListExtraAnimationCount);
            for (int W = 0; W < ListExtraAnimationCount; ++W)
            {
                string ExtraAnimationPath = BR.ReadString();
                if (!string.IsNullOrEmpty(ExtraAnimationPath))
                {
                    ListStanceAnimation.Add(new Weapon(ExtraAnimationPath, CurrentLayer.DicRequirement, CurrentLayer.DicEffect));
                }
            }

            CurrentStanceAnimations = StandingAnimations;

            int ListWeaponCount = BR.ReadInt32();

            Weapons = new WeaponHolder(ListWeaponCount);
            for (int W = 0; W < ListWeaponCount; ++W)
            {
                string WeaponName = BR.ReadString();
                Weapons.AddWeaponToStash(new Weapon(WeaponName, CurrentLayer.DicRequirement, CurrentLayer.DicEffect));
            }

            if (ListExtraWeapon != null)
            {
                foreach (Weapon ActiveWeapon in ListExtraWeapon)
                {
                    Weapons.AddWeaponToStash(ActiveWeapon);
                    Weapons.UseWeapon(ActiveWeapon);
                }
            }

            FS.Close();
            BR.Close();

            Load();

            SetAnimation(StandingAnimations.NoneCombo.AnimationName);
            CurrentMovementInput = MovementInputs.None;
            ActiveMovementStance = "None";
            Update(new GameTime());
            SetIdle();

            if (!Weapons.HasActiveWeapons)
            {
                if (Weapons.HasWeapons)
                {
                    ChangeWeapon(0);
                }
                else
                {
                    ChangeWeapon(-1);
                }
            }

            UpdateSkills(BaseSkillRequirement.OnCreatedRequirementName);
        }