Files
2025-05-13 05:18:03 +03:00

27 lines
1.0 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using UnityEngine;
using System.Collections;
public static class AdvancedPhysics {
public class Matter{
public float Density; //kg/m^3
public float MeltingPoint; //*C
public float BoilingPoint; //*C
public float SoundSpeed; //м/с
public float GetMass(float volume){
return Density * volume;
}
public float GetVolume(float mass){
return mass / Density;
}
}
public static class Matters{
public static Matter Water = new Matter{ Density = 999.9720f, MeltingPoint = 0.0f, BoilingPoint = 99.974f, SoundSpeed = 1348.0f };
public static Matter Iron = new Matter{ Density = 7800.0f, MeltingPoint = 1538.85f, BoilingPoint = 2860.85f, SoundSpeed = 5130.0f};
public static Matter AbsPlastic = new Matter{ Density = 1020.0f, MeltingPoint = 105.0f, BoilingPoint = -1, SoundSpeed = -1};
public static Matter Glass = new Matter{ Density = 2500.0f, MeltingPoint = 1500.0f, BoilingPoint = -1, SoundSpeed = -1};
public static Matter Air = new Matter{ Density = 1.25f, MeltingPoint = -1, BoilingPoint = -1, SoundSpeed = -1};
}
}