27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
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};
|
||
}
|
||
|
||
}
|