void Update() { if (Fluid != null) { Fluid.InjectColorAtPoint(transform.position, FluidColor, FluidRadius, FluidLerp); Fluid.InjectVelocityAtPoint(transform.position, FluidVelocity, FluidRadius, FluidLerp); } }
private void Ink() { //if (!canSwim) if (boostSpeed > 0.0f) { FluidGrid fluidScript = fluidGrid.GetComponent <FluidGrid>(); Color color = (GetTeam() == Team.Blue) ? GameManager.BlueColor : GameManager.RedColor; fluidScript.InjectColorAtPoint(transform.position, color, 0.04f, 1.0f); fluidScript.InjectVelocityAtPoint(transform.position, GetMovementAxis() * -100f, 0.04f, 1.0f); } }