public void TakeDamage(DamageProperties damageProperties) { if (EntityProperties.TakeDamage(damageProperties)) { toDestroy = true; } }
protected GunDefinition(string unlocalizedName, GunCategory category, int price, float bulletCost, int magazineSize, int startingMagazineCount, FiringMode[] firingModes, int rpm, float baseMoveSpeedModifier, int killAward, int damage, float baseAccuracy, float baseAccuracyChangePerShot, float armorPenetration, int penetrationPower, DamageProperties damageProperties, bool canBeMounted = false) { UnlocalizedName = unlocalizedName; Category = category; Category.Add(this); Price = price; BulletCost = bulletCost; MagazineSize = magazineSize; StartingMagazineCount = startingMagazineCount; FiringModes = firingModes; RPM = rpm; BaseMoveSpeedModifier = baseMoveSpeedModifier; KillAward = killAward; Damage = damage; BaseAccuracy = baseAccuracy; BaseAccuracyChangePerShot = baseAccuracyChangePerShot; ArmorPenetration = armorPenetration; PenetrationPower = penetrationPower; DamageProperties = damageProperties; CanBeMounted = canBeMounted; }
public void Clear() { type = Type.Generic; AttackRay = default(Ray); Radius = 0f; Forgiveness = 0f; MaxDistance = 0f; RayHit = default(RaycastHit); MultiHit = false; BestHit = false; DidHit = false; damageProperties = null; gameObject = null; collider = null; ignoreEntity = null; HitEntity = null; HitPoint = default(Vector3); HitNormal = default(Vector3); HitDistance = 0f; HitTransform = null; HitPart = 0u; HitMaterial = null; }
public void Clear() { this.type = HitTest.Type.Generic; this.AttackRay = (Ray)null; this.Radius = 0.0f; this.Forgiveness = 0.0f; this.MaxDistance = 0.0f; this.RayHit = (RaycastHit)null; this.MultiHit = false; this.BestHit = false; this.DidHit = false; this.damageProperties = (DamageProperties)null; this.gameObject = (GameObject)null; this.collider = (Collider)null; this.ignoreEntity = (BaseEntity)null; this.HitEntity = (BaseEntity)null; this.HitPoint = (Vector3)null; this.HitNormal = (Vector3)null; this.HitDistance = 0.0f; this.HitTransform = (Transform)null; this.HitPart = 0U; this.HitMaterial = (string)null; }
public void Clear() { this.type = HitTest.Type.Generic; this.AttackRay = new Ray(); this.Radius = 0f; this.Forgiveness = 0f; this.MaxDistance = 0f; this.RayHit = new RaycastHit(); this.MultiHit = false; this.BestHit = false; this.DidHit = false; this.damageProperties = null; this.gameObject = null; this.collider = null; this.ignoreEntity = null; this.HitEntity = null; this.HitPoint = new Vector3(); this.HitNormal = new Vector3(); this.HitDistance = 0f; this.HitTransform = null; this.HitPart = 0; this.HitMaterial = null; }
public DamageProperties ModifyDamage(DamageProperties dp) { return(new DamageProperties(dp.SoftDamage * this.DamageMultiplier)); }
public bool TakeDamage(DamageProperties damageProperties) { this.Health -= damageProperties.SoftDamage; return(this.Health < 0); }