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); }
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); }
//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); }
private void SetCursor(CursorType type) { CursorMapping mapping = GetCursorMapping(type); Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.ForceSoftware); }
private void SetCursor(CursorType cursorType) { CursorMapping mapping = GetCursorMapping(cursorType); Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto); }
/// <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); }
//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 }
//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); }
private void SetCursor(CursorType type) { CursorMapping cursorMapping = GetCursorMapping(type); Cursor.SetCursor(cursorMapping.texture, cursorMapping.hotspot, CursorMode.Auto); }
void Awake() { mover = GetComponent <Mover>(); health = GetComponent <Health>(); defaultMapping = cursorMappings[0]; }
public void SetCursor(CursorType type) { CursorMapping mapping = GetCursorMapping(type); Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto); }