// Use this for initialization void Start() { provider = FindObjectOfType <LeapProvider>() as LeapProvider; newFluids = FindObjectOfType <Fluids>() as Fluids; position = new Vector3(0, 0, 0); isClosedFist = false; }
public override string HeadLossEq(string param, float flowRate) { // H=8fLQ^2/(pi^2 * D^5 * g) var velocity = 4 * flowRate / (Mathf.PI * InnerDiameter * InnerDiameter); var rN = Fluids.Reynolds(Fluids.Density, velocity, InnerDiameter, Fluids.Viscosity); var f = Fluids.FrictionFactor(rN, Roughness); return((8 * f * Length / (Mathf.PI * Mathf.PI * 9.81 * Mathf.Pow(InnerDiameter, 5))).ToString("F5") + "*" + param + "^2"); }
protected override void OnQueryChanged(string oldValue, string newValue) { base.OnQueryChanged(oldValue, newValue); if (string.IsNullOrWhiteSpace(newValue)) { ItemsSource = null; } else { ItemsSource = Fluids .Where(fluid => fluid.Name.ToLower().Contains(newValue.ToLower())) .ToList <Fluids>(); } }
public List <Fluid> GetActiveFluids(Vector2 sprite) { return(Fluids.FindAll(s => s.IsInRange(parameters.hitboxArea, sprite)).ToList()); }
public void AddFluid(Fluid block) => Fluids.Add(block);
public void RemoveFluid(Fluid fluid) { Fluids.Remove(fluid); drawer.remove(fluid); }