// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); swc = GameObject.Find("SoftwareCursor").GetComponent <SoftwareCursor>(); interior_camera = Camera.main; interior_camera.enabled = true; exterior_camera = GameObject.Find("ExteriorCamera").GetComponent <Camera>(); exterior_camera.enabled = false; rb.centerOfMass = interior_camera.transform.position; }
private void OnHandsItemChanged(Item item) { if (item != null) { var dc6 = DC6.Load(item.invFile, palette, loadAllDirections: true); var texture = dc6.textures[0]; var frame = dc6.directions[0].frames[0]; var hotSpot = new Vector2(frame.width / 2, frame.height / 2); SoftwareCursor.SetCursor(texture, hotSpot); Cursor.visible = false; } else { SoftwareCursor.SetCursor(null); Cursor.visible = true; } }
private void Awake() { instance = this; rectTransform = GetComponent <RectTransform>(); }