/// <summary> /// Override OnCursorType change to set the correct animation /// </summary> /// <param name="type"></param> public override void OnCursorActionChange(CursorTransformEnum type) { base.OnCursorActionChange(type); var newActive = new CursorActionDatum(); for (int cursorIndex = 0; cursorIndex < CursorActionData.Length; cursorIndex++) { CursorActionDatum cursor = CursorActionData[cursorIndex]; if (cursor.CursorType == type) { newActive = cursor; break; } } if (newActive.Name == null) { return; } for (int cursorIndex = 0; cursorIndex < CursorActionData.Length; cursorIndex++) { CursorActionDatum cursor = CursorActionData[cursorIndex]; if (cursor.CursorSecondary.activeSelf) { cursor.CursorSecondary.SetActive(false); break; } } newActive.CursorSecondary.SetActive(true); }
public virtual CursorTransformEnum CheckCursorSecondary() { if (TargetedObject == null) { targetType = CursorTransformEnum.None; } return(targetType); }
private void UpdateCursorAction() { CursorTransformEnum newType = CheckCursorSecondary(); if (cursorType != newType) { OnCursorActionChange(newType); } }
public void GetModifiedCursorType(ICursor cursor, out CursorTransformEnum type) { type = GetModifiedType(cursor); }
public virtual void OnCursorActionChange(CursorTransformEnum newType) { cursorType = newType; }