public override void Unpack(BinaryReader reader) { Id = reader.ReadUInt32(); MaxHealth.Unpack(reader); MaxStamina.Unpack(reader); MaxMana.Unpack(reader); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Team != 0) { hash ^= Team.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (ImageUrl.Length != 0) { hash ^= ImageUrl.GetHashCode(); } if (Fp != 0) { hash ^= Fp.GetHashCode(); } if (Stamina != 0) { hash ^= Stamina.GetHashCode(); } if (MaxStamina != 0) { hash ^= MaxStamina.GetHashCode(); } if (FortType != 0) { hash ^= FortType.GetHashCode(); } if (Latitude != 0L) { hash ^= Latitude.GetHashCode(); } if (Longitude != 0L) { hash ^= Longitude.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } if (Modifier != 0D) { hash ^= Modifier.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (FortId.Length != 0) { hash ^= FortId.GetHashCode(); } if (TeamColor != 0) { hash ^= TeamColor.GetHashCode(); } if (pokemonData_ != null) { hash ^= PokemonData.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } hash ^= imageUrls_.GetHashCode(); if (Fp != 0) { hash ^= Fp.GetHashCode(); } if (Stamina != 0) { hash ^= Stamina.GetHashCode(); } if (MaxStamina != 0) { hash ^= MaxStamina.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (Latitude != 0D) { hash ^= Latitude.GetHashCode(); } if (Longitude != 0D) { hash ^= Longitude.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } hash ^= modifiers_.GetHashCode(); return(hash); }
public bool Equals(PlayerPed other) { if (other == null) { return(false); } return(Type.Equals(other.Type) && ModelIndex.Equals(other.ModelIndex) && Handle.Equals(other.Handle) && Position.Equals(other.Position) && CreatedBy.Equals(other.CreatedBy) && Health.Equals(other.Health) && Armor.Equals(other.Armor) && Weapons.SequenceEqual(other.Weapons) && MaxStamina.Equals(other.MaxStamina) && TargetableObjects.SequenceEqual(other.TargetableObjects) && MaxWantedLevel.Equals(other.MaxWantedLevel) && MaxChaosLevel.Equals(other.MaxChaosLevel) && ModelName.Equals(other.ModelName)); }
public override int GetHashCode() { int hash = 1; if (FortId.Length != 0) { hash ^= FortId.GetHashCode(); } if (TeamColor != 0) { hash ^= TeamColor.GetHashCode(); } if (pokemonData_ != null) { hash ^= PokemonData.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } hash ^= imageUrls_.GetHashCode(); if (Fp != 0) { hash ^= Fp.GetHashCode(); } if (Stamina != 0) { hash ^= Stamina.GetHashCode(); } if (MaxStamina != 0) { hash ^= MaxStamina.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (Latitude != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Latitude); } if (Longitude != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Longitude); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } hash ^= modifiers_.GetHashCode(); if (CloseSoon != false) { hash ^= CloseSoon.GetHashCode(); } if (CheckinImageUrl.Length != 0) { hash ^= CheckinImageUrl.GetHashCode(); } if (eventInfo_ != null) { hash ^= EventInfo.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
//Set currentvalues to start values private void Start() { currentMana = Mathf.RoundToInt(maxMana.GetValue()); currentStamina = Mathf.RoundToInt(MaxStamina.GetValue()); currentHealth = Mathf.RoundToInt(MaxHealth.GetValue()); }