} //Start void SetAxisColor(AXIS_COLOR axisColor) { _axisColor = axisColor; if (!transform.GetComponent <Renderer>()) { return; } switch (_axisColor) { case AXIS_COLOR.NORMAL: transform.GetComponent <Renderer>().material.color = NormalColor; break; case AXIS_COLOR.HOVER: transform.GetComponent <Renderer>().material.color = HoverColor; break; case AXIS_COLOR.DRAG: transform.GetComponent <Renderer>().material.color = DragColor; break; } //switch } //SetAxisColor
public virtual void SetAxisColor(AXIS_COLOR axisColor)//SetAxisColor { this._axisColor = axisColor; if (!this.transform.GetComponent <Renderer>()) { return; } switch (this._axisColor) { case AXIS_COLOR.NORMAL: this.transform.GetComponent <Renderer>().material.color = this.NormalColor; break; case AXIS_COLOR.HOVER: this.transform.GetComponent <Renderer>().material.color = this.HoverColor; break; case AXIS_COLOR.DRAG: this.transform.GetComponent <Renderer>().material.color = this.DragColor; break; } }
public GizmoAxisHandle() { this._axisColor = AXIS_COLOR.NORMAL; }