예제 #1
0
        private void SetCursor(CursorType type)
        {
            CursorMapping mapping = GetCursorMapping(type);

            mapping.hotspot = new Vector2(mapping.texture.width / 2, mapping.texture.height / 2);
            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }
예제 #2
0
        private void SetCursor(CursorType type)
        {
            CursorMapping mapping = GetCursorMapping(type);

            //Cursor is part of Unity
            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }
        //Cursor şeklini değiştiren fonksiyon
        private void SetCursor(CursorType type)
        {
            //Tipe göre cursor mapi oluşturuldu
            CursorMapping mapping = GetCursorMapping(type);

            //Cursor şekli değiştirildi
            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }
예제 #4
0
        //NOTE this SetCursor is our function. The Cursor.SetCursor is a Unity function.
        private void SetCursor(CursorType type)
        {
            //This will return with the mapping type from the function below.
            //Ex movement.
            CursorMapping mapping = GetCursorMapping(type);

            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }
예제 #5
0
        private void SetCursor(CursorType type)
        {
            CursorMapping mapping = GetCursorMapping(type);

            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.ForceSoftware);
        }
예제 #6
0
        private void SetCursor(CursorType cursorType)
        {
            CursorMapping mapping = GetCursorMapping(cursorType);

            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }
예제 #7
0
        /// <summary>
        /// Handles changing the type of curosr that is displayed.
        /// </summary>
        /// <param name="type"></param>
        private void SetCursor(CursorType type)
        {
            CursorMapping cursormap = GetCursorMapping(type);

            Cursor.SetCursor(cursormap.image, cursormap.hotspot, CursorMode.Auto);
        }
예제 #8
0
    //alterador de cursor
    private void SetCursor(CursorType type)
    {
        CursorMapping mapping = GetCursorMapping(type);                      //referencia do cursor

        Cursor.SetCursor(mapping.Texture, mapping.hostpos, CursorMode.Auto); //altera cursor
    }
예제 #9
0
    //private float GetLengthPath(NavMeshPath path)//the full distance to the target
    //{
    //    float pathDistance = 0f;

    //    if (path.corners.Length < 2)
    //        return pathDistance;
    //    for (int i = 0; i < path.corners.Length - 1; i++)
    //    {
    //        pathDistance += Vector3.Distance(path.corners[i], path.corners[i + 1]);
    //    }
    //    return pathDistance;
    //}

    private void SetCursor(Cursors cursor)
    {
        CursorMapping cursorMapping = GetCursorMapping(cursor);

        Cursor.SetCursor(cursorMapping.texture, Vector2.zero, CursorMode.Auto);
    }
예제 #10
0
        private void SetCursor(CursorType type)
        {
            CursorMapping cursorMapping = GetCursorMapping(type);

            Cursor.SetCursor(cursorMapping.texture, cursorMapping.hotspot, CursorMode.Auto);
        }
예제 #11
0
 void Awake()
 {
     mover          = GetComponent <Mover>();
     health         = GetComponent <Health>();
     defaultMapping = cursorMappings[0];
 }
예제 #12
0
        public void SetCursor(CursorType type)
        {
            CursorMapping mapping = GetCursorMapping(type);

            Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
        }