Exemplo n.º 1
0
	public StoreTouchInfo()
	{
		idx = -1;
		type = StoreTouchType.STORE_TOUCH_NONE;
		storeItemController = null;
		touchObject = null;
	}
    public StoreItemInfoUI GetStoreItemUIInfo(StoreTouchType _touchType)
    {
        if (_touchType == StoreTouchType.STORE_TOUCH_LEFT)
            return itemUp.itemUIInfoData;
        else if (_touchType == StoreTouchType.STORE_TOUCH_RIGHT)
            return itemDown.itemUIInfoData;

        return null;
    }
Exemplo n.º 3
0
	public void SetFocus( GameObject _focusObject, StoreTouchType _touchType = StoreTouchType.STORE_TOUCH_LEFT)
	{
		if( _focusObject != null)
		{
			_focusObject.SetActive( true);

			SimpleSprite sprite = _focusObject.GetComponent<SimpleSprite>();

			if( sprite != null)
				sprite.Unclip();

			if( items != null)
			{
				if( items[(int)_touchType].itemSlotSprite != null)
				{
					items[(int)_touchType].itemFocusObject = _focusObject;
					_focusObject.transform.parent = items[(int)_touchType].itemSlotSprite.transform;
					_focusObject.transform.localPosition = new Vector3( 0.0f, 0.0f, -2.0f);
	
					if( items[(int)_touchType].uiListItemContainer != null)
						items[(int)_touchType].uiListItemContainer.ScanChildren();
				}
			}
		}
	}
Exemplo n.º 4
0
	public void RemoveFocus( Transform _parent, StoreTouchType _touchType = StoreTouchType.STORE_TOUCH_LEFT)
	{
		if( items[(int)_touchType] != null)
		{
			if( items[(int)_touchType].itemFocusObject != null)
			{
				items[(int)_touchType].itemFocusObject.transform.parent = _parent;
				items[(int)_touchType].itemFocusObject.SetActive( false);
				items[(int)_touchType].itemFocusObject = null;

				if( items[(int)_touchType].uiListItemContainer != null)
					items[(int)_touchType].uiListItemContainer.ScanChildren();
			}
		}
	}
Exemplo n.º 5
0
	public StoreItemInfoUI GetStoreItemInfo( StoreTouchType _touchType = StoreTouchType.STORE_TOUCH_LEFT)
	{
		if( items[(int)_touchType] == null)
			return null;
		else
			return items[(int)_touchType].itemUIInfoData;
	}