Exemplo n.º 1
0
    /// <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);
    }
Exemplo n.º 2
0
 public virtual CursorTransformEnum CheckCursorSecondary()
 {
     if (TargetedObject == null)
     {
         targetType = CursorTransformEnum.None;
     }
     return(targetType);
 }
Exemplo n.º 3
0
    private void UpdateCursorAction()
    {
        CursorTransformEnum newType = CheckCursorSecondary();

        if (cursorType != newType)
        {
            OnCursorActionChange(newType);
        }
    }
Exemplo n.º 4
0
 public void GetModifiedCursorType(ICursor cursor, out CursorTransformEnum type)
 {
     type = GetModifiedType(cursor);
 }
Exemplo n.º 5
0
 public virtual void OnCursorActionChange(CursorTransformEnum newType)
 {
     cursorType = newType;
 }