public void StartFocus(int focusTechnique) { print("start focus"); focus = true; this.focusTechnique = focusTechnique; MolColor haloColor = new MolColor(50.0f, 0.0f, 0.0f); float haloScale = 2.0f; // if(focusTechnique == 3){ // haloScale = 2.5f; // } if (focusTechnique == 0) { this.t_prev = -1; this.T_prev = 0.0f; } else { this.halo = HaloObject.CreateNewHaloObject(this.transform.parent, this.transform.position, haloColor, this.targetSize, haloScale); } if (focusTechnique == 2) { this.trail = TrailObject.CreateNewTrailObject(this.transform.parent, this.transform.position, haloColor, this.targetSize, haloScale); } stopWatch.Reset(); stopWatch.Start(); }
public void StopFocus() { focus = false; currentColor = defaultColor; gameObject.GetComponent <MeshRenderer> ().material.color = currentColor.rgba; if (this.halo != null) { Destroy(this.halo.gameObject); } this.halo = null; if (this.trail != null) { Destroy(this.trail.gameObject); } this.trail = null; stopWatch.Stop(); stopWatch.Reset(); }