public Player() { position = new Position(); flags = new Flags(); keyCards = new KeyCards(); cheatFlags = new CheatFlags(); }
public void Clear() { mobj = null; playerState = 0; cmd.Clear(); viewZ = Fixed.Zero; viewHeight = Fixed.Zero; deltaViewHeight = Fixed.Zero; bob = Fixed.Zero; health = 0; armorPoints = 0; armorType = 0; Array.Clear(powers, 0, powers.Length); Array.Clear(cards, 0, cards.Length); backpack = false; Array.Clear(frags, 0, frags.Length); readyWeapon = 0; pendingWeapon = 0; Array.Clear(weaponOwned, 0, weaponOwned.Length); Array.Clear(ammo, 0, ammo.Length); Array.Clear(maxAmmo, 0, maxAmmo.Length); useDown = false; attackDown = false; cheats = 0; refire = 0; killCount = 0; itemCount = 0; secretCount = 0; message = null; messageTime = 0; damageCount = 0; bonusCount = 0; attacker = null; extraLight = 0; fixedColorMap = 0; colorMap = 0; foreach (var psp in playerSprites) { psp.Clear(); } didSecret = false; }
public void Clear() { this.Entity = null; this.mobj = null; this.playerState = 0; this.cmd.Clear(); this.viewZ = Fixed.Zero; this.viewHeight = Fixed.Zero; this.deltaViewHeight = Fixed.Zero; this.bob = Fixed.Zero; this.health = 0; this.armorPoints = 0; this.armorType = 0; Array.Clear(this.powers, 0, this.powers.Length); Array.Clear(this.cards, 0, this.cards.Length); this.backpack = false; Array.Clear(this.frags, 0, this.frags.Length); this.ReadyWeapon = null; this.PendingWeapon = null; this.useDown = false; this.attackDown = false; this.cheats = 0; this.refire = 0; this.killCount = 0; this.itemCount = 0; this.secretCount = 0; this.message = null; this.messageTime = 0; this.damageCount = 0; this.bonusCount = 0; this.attacker = null; this.extraLight = 0; this.fixedColorMap = 0; this.colorMap = 0; foreach (var psp in this.playerSprites) { psp.Clear(); } this.didSecret = false; }
public void Reborn(World world) { world.Entities.Add(this.Entity = EntityInfo.Create <DoomEngine.Game.Entities.Player>(world)); this.mobj = null; this.playerState = PlayerState.Live; this.cmd.Clear(); this.viewZ = Fixed.Zero; this.viewHeight = Fixed.Zero; this.deltaViewHeight = Fixed.Zero; this.bob = Fixed.Zero; this.armorPoints = 0; this.armorType = 0; Array.Clear(this.powers, 0, this.powers.Length); this.backpack = false; var inventory = this.Entity.GetComponent <InventoryComponent>(); inventory.TryAdd(EntityInfo.Create <WeaponFists>(world)); inventory.TryAdd(this.ReadyWeapon = this.PendingWeapon = EntityInfo.Create <WeaponPistol>(world)); inventory.TryAdd(EntityInfo.Create <AmmoBullets>(world)); // Don't do anything immediately. this.useDown = true; this.attackDown = true; this.cheats = 0; this.refire = 0; this.message = null; this.messageTime = 0; this.damageCount = 0; this.bonusCount = 0; this.attacker = null; this.extraLight = 0; this.fixedColorMap = 0; this.colorMap = 0; foreach (var psp in this.playerSprites) { psp.Clear(); } this.didSecret = false; }
public void Reborn() { mobj = null; playerState = PlayerState.Live; cmd.Clear(); viewZ = Fixed.Zero; viewHeight = Fixed.Zero; deltaViewHeight = Fixed.Zero; bob = Fixed.Zero; health = DoomInfo.DeHackEdConst.InitialHealth; armorPoints = 0; armorType = 0; Array.Clear(powers, 0, powers.Length); Array.Clear(cards, 0, cards.Length); backpack = false; readyWeapon = WeaponType.Pistol; pendingWeapon = WeaponType.Pistol; Array.Clear(weaponOwned, 0, weaponOwned.Length); Array.Clear(ammo, 0, ammo.Length); Array.Clear(maxAmmo, 0, maxAmmo.Length); weaponOwned[(int)WeaponType.Fist] = true; weaponOwned[(int)WeaponType.Pistol] = true; ammo[(int)AmmoType.Clip] = DoomInfo.DeHackEdConst.InitialBullets; for (var i = 0; i < (int)AmmoType.Count; i++) { maxAmmo[i] = DoomInfo.AmmoInfos.Max[i]; } // Don't do anything immediately. useDown = true; attackDown = true; cheats = 0; refire = 0; message = null; messageTime = 0; damageCount = 0; bonusCount = 0; attacker = null; extraLight = 0; fixedColorMap = 0; colorMap = 0; foreach (var psp in playerSprites) { psp.Clear(); } didSecret = false; }
public void Reborn() { Mobj = null; PlayerState = PlayerState.Live; Cmd.Clear(); ViewZ = Fixed.Zero; ViewHeight = Fixed.Zero; DeltaViewHeight = Fixed.Zero; Bob = Fixed.Zero; Health = MAXHEALTH; ArmorPoints = 0; ArmorType = 0; Array.Clear(Powers, 0, Powers.Length); Array.Clear(Cards, 0, Cards.Length); Backpack = false; Array.Clear(Frags, 0, Frags.Length); ReadyWeapon = WeaponType.Pistol; PendingWeapon = WeaponType.Pistol; Array.Clear(WeaponOwned, 0, WeaponOwned.Length); Array.Clear(Ammo, 0, Ammo.Length); Array.Clear(MaxAmmo, 0, MaxAmmo.Length); WeaponOwned[(int)WeaponType.Fist] = true; WeaponOwned[(int)WeaponType.Pistol] = true; Ammo[(int)AmmoType.Clip] = 50; for (var i = 0; i < (int)AmmoType.Count; i++) { MaxAmmo[i] = DoomInfo.AmmoInfos.Max[i]; } // don't do anything immediately UseDown = true; AttackDown = true; Cheats = 0; Refire = 0; Message = null; DamageCount = 0; BonusCount = 0; Attacker = null; ExtraLight = 0; FixedColorMap = 0; ColorMap = 0; foreach (var psp in PlayerSprites) { psp.Clear(); } DidSecret = false; }