Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - unfilet

Pages: [1]
1
Support / Re: Some features
« on: December 10, 2013, 05:31:00 pm »
The bottom line is that all objects that use texture, support for this protocol. And for textmesh think there will be enough opacity.
You used a cocos2d? Their action system helps to solve a lot of problems. And to somehow use them as needed basis for such protocols.

2
Support / Re: Some features
« on: December 10, 2013, 02:51:27 pm »
Class tk2dTextMesh and tk2dBaseSprite have common property Color.
I tried write action for fade in/out, but could not make it universal.

3
Support / Some features (texture protocol)
« on: December 10, 2013, 02:25:31 pm »
I propose to create an interface for objects using Mesh.

public interface IRGBAProtocol
{
   void setColor(Color color);
    Color getColor();
    float getOpacity();
   void setOpacity(float opacity);
}

4
Support / Re: Anchor Point
« on: November 23, 2013, 04:53:53 pm »
Code: [Select]
        public static float NodeWidth(tk2dBaseSprite sprite)
        {
            return sprite.GetUntrimmedBounds().size.x;
        }

        public static float NodeHeight(tk2dBaseSprite sprite)
        {
            return sprite.GetUntrimmedBounds().size.y;
        }

        public static float NodeX(tk2dBaseSprite sprite)
        {
            return NodeLocalX(sprite) + sprite.GetUntrimmedBounds().min.x;
        }

        public static float NodeY(tk2dBaseSprite sprite)
        {
            return NodeLocalY(sprite) + sprite.GetUntrimmedBounds().min.y;
        }

        public static float NodeRightX(tk2dBaseSprite sprite)
        {
            return NodeLocalX(sprite) + sprite.GetUntrimmedBounds().max.x;;
        }

        public static float NodeUpperY(tk2dBaseSprite sprite)
        {
            return  NodeLocalY(sprite) + sprite.GetUntrimmedBounds().max.y;;
        }

        public static float NodeLocalX(tk2dBaseSprite sprite)
        {
            return sprite.transform.localPosition.x;
        }

        public static float NodeLocalY(tk2dBaseSprite sprite)
        {
            return sprite.transform.localPosition.y;
        }

        public static Vector2 NodeAnchorPoint(tk2dSprite sprite)
        {
            Bounds bn = sprite.GetUntrimmedBounds();
            return new Vector2(Mathf.Abs(bn.min.x / bn.size.x), Mathf.Abs(bn.min.y / bn.size.y));
        }

5
Support / Anchor Point
« on: November 22, 2013, 01:23:04 pm »
How get a anchorPoint of sprite? It's possible?
it is very necessary for get position of corners sprite.

6
Support / Add some features
« on: November 21, 2013, 03:26:23 pm »
Please add to tk2dUIScrollableArea some events

Code: [Select]
public event System.Action<tk2dUIScrollableArea> OnScrollBegan;
public event System.Action<tk2dUIScrollableArea> OnScrollEnd;

private bool IsSwipeScrollingInProgress
    {
        get { return isSwipeScrollingInProgress; }
        set
        {
            isSwipeScrollingInProgress = value;

            if (isSwipeScrollingInProgress)
            {
                if (OnScrollBegan != null)
                    OnScrollBegan(this);
            }
            else
            {
                if (OnScrollEnd != null)
                    OnScrollEnd(this);
            }

        }
    }

Pages: [1]