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 - Rukasu

Pages: [1]
1
Support / Re: How can i create HUD movement buttons?
« on: July 22, 2013, 11:38:05 pm »
I started a new project, and imported the 2D Toolkit.
I let default tk2dcamera settings (Orthographic, 20 Pixels Per Meter).
Then i tested and it worked!
I think i will try using these settings, if i had more questions i will post them here.
The only thing is that my sprites are too tiny (1:1) in my Viewport, is there a problem increase the value of Pixels Per Meter?
Thanks for the help.

2
Support / Re: tk2dUIItem with tk2dCamera
« on: July 22, 2013, 10:50:56 pm »
How did you solved?

3
Support / Re: How can i create HUD movement buttons?
« on: July 22, 2013, 10:39:42 pm »
1. I get nothing, i'm using mouse to test, is that ok? I have tested in my Android Device but it won't work either.
2. RaycastLayerMask was set to Everything, but i set to just the layer that my buttons are (Layer HUD) but still don't work.
Raycast Hit Triggers is turned on.
3. The BasicButton don't work too.
4. I tried changing Z from 0 to 2 and -2, no feedback of the button.

4
Support / Re: How can i create HUD movement buttons?
« on: July 22, 2013, 09:05:15 pm »
Hello again.
I still can't get it to work.
I have added a UiManager, and i have dragged my tk2dcamera in the "Camera Slot" in the inspector window. My camera is tagged as "Main Camera".
I dragged the "BasicButton" from "ControlPrefabs" to my hierarchy (i call it RightButton), i have changed the sprite, resized the sprite and after that i clicked in the "Fit" button, so that the BoxCollider fits in the new sprite.
I have a GameObject, it is a "Sprite With Animator" (AnimatedSprite) and in this object i have attached a C# script.
This is my script:
Code: [Select]
public class GeorgeController : MonoBehaviour
{   
    private tk2dSpriteAnimator animation;   
    private string lastAnimation = "";   
       
    void Start()
    {
        this.animation = GetComponent<tk2dSpriteAnimator>();
        lastAnimation = animation.CurrentClip.name;       
    }
   
    void Update()
    {

    }

    void MoveRight()
    {       
        lastAnimation = animation.CurrentClip.name;
        animation.Play("WalkRight");
    }
}
Then in my "Right Button" object i dragged my GameObject (AnimatedSprite) in the Send Message > Target.
Then, in the OnDown event  i have selected the "MoveRight" function from the DropDownList (i'm using 2D Toolkit 2.1 beta 3).
But this still doesn't work, i don't know what i am missing.

5
Support / Re: How can i create HUD movement buttons?
« on: July 20, 2013, 06:55:10 am »
Hey, i am creating an tk2dUiItem and puting inside of an Empty Game Object (just to keep things organized), then i added a sprite to this tk2dUiItem, but i am a little lost here.
What do i have to do now?
Where do i have to add a new script?
I'm reading this page http://www.unikronsoftware.com/2dtoolkit/docs/2.00/ui/system.html but it doesn't tell me how or where do i have to create the scripts...
Is there a more complete example, i mean, step by step?
And do i need create a tk2dUiManager object in order to tk2dUiItem work?

6
Support / Re: How can i create HUD movement buttons?
« on: July 20, 2013, 02:11:41 am »
Thanks for the reply  ;D
Just one more question, i have downloaded 2D Toolkit from Asset Store, am i using the latest version available (2.1 beta) ?

7
Support / How can i create HUD movement buttons?
« on: July 19, 2013, 02:55:39 am »
Hey guys, i am really new to Unity and 2D Toolkit as well.
I have read "all" the 2.1/2.0 documentation.
I'm making a 2D Platformer game for mobile devices, and i already have all the animations of my Character working.
I'm using tk2dcamera and a resolution of 800x480 (landscape).
I'm about to start the movement of my character, but i'm a little lost in this part... How can i add movement buttons (an arrow and a button to jump, for example) to my game?
Is this just a sprite like any other sprite in the scene? If so, how can i detect that i pressed the button to jump?
Or should i use 2D Tookit UI to create these buttons and use the Events to track what button do i pressed?
And sorry about my english, it's not my native language.
Thanks.

Pages: [1]