public DamageMessage (float dmg, Vector3 dir, float dmgFrce, Weapon.DamageBias bs, Weapon.WeaponType tp, Ship own) { damage = dmg; damageDirection = dir; damageForce = dmgFrce; bias = bs; type = tp; if (own != null) owner = own.gameObject; else return; hasShip = true; try { viewID = own.GetComponent<PhotonView>().viewID; } catch { Debug.Log(owner.name + " does not have a photon View ID"); } if (own is AiShip) player = false; else player = true; }
public DamageMessage (float dmg, Vector3 dir, float dmgFrce, Weapon.DamageBias bs, Weapon.WeaponType tp, GameObject own) { damage = dmg; damageDirection = dir; damageForce = dmgFrce; bias = bs; type = tp; owner = own; try { viewID = own.GetComponent<PhotonView>().viewID; } catch { Debug.Log(owner.name + " does not have a photon View ID"); } }
public void SetModifiers(Weapon.DamageBias inBias, float inDamageMultiplier, float inBlastRadiusMultiper, float inTurnSpeedMultiplier, float inVelocityMulitplier) { bias = inBias; damage *= inDamageMultiplier; blastRadius *= inBlastRadiusMultiper; rotationsPerMinute *= inTurnSpeedMultiplier; speed *= inVelocityMulitplier; }