private IEnumerator AnimateFX(VolumetricLineStripBehavior lineScript) { float maxLineWidth = lineScript.LineWidth; Destroy(lineScript.gameObject, 0.07f + 0.15f); // this is executed even when pulse gun script is disabled yield return(this.AnimateScalar(0.07f, 0, maxLineWidth, v => lineScript.LineWidth = v)); yield return(this.AnimateScalar(0.15f, maxLineWidth, 0, v => lineScript.LineWidth = v)); }
void Start() { int steps = stepsPerCurve * CurveCount; Vector3[] points = new Vector3[steps + 1]; for (int i = 0; i <= steps; i++) { points[i] = GetPoint(i / (float)steps); } volLines = Instantiate(GameManager.MetalLineStripTemplate); volLines.GetComponent <MeshRenderer>().enabled = true; volLines.UpdateLineVertices(points); volLines.LineColor = new Color(0, AllomanticIronSteel.lowLineColor * luminosityFactor, AllomanticIronSteel.highLineColor * luminosityFactor, 1); volLines.LightSaberFactor = 1; volLines.LineWidth = AllomanticIronSteel.blueLineThirdPersonWidth; }
public void OnEnable() { m_Instance = target as VolumetricLineStripBehavior; m_fields = ExposeProperties.GetProperties(m_Instance); }