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

Pages: [1]
1
Support / tk2dcamera anchor
« on: December 19, 2012, 01:26:08 pm »
Is it possible to use tk2dcamera anchor without tk2dcamera ?

I need my buttons to be anchored but also scaled proportionaly to device resolutions.

2
Support / Button toggle
« on: November 27, 2012, 02:52:28 pm »
Is there like an easy way to do this ? Just want to make the button look like its been pressed.

3
Support / Re: Dynamic text buttons
« on: June 30, 2012, 01:11:03 am »
Cool thanks. If anyones intrested the code is something like this:

Just drag all the buttons u need into the buttons array.


   public tk2dButton[] buttons;

   void Awake () {
      for(int n = 0; n < buttons.Length; n++)
         buttons[n].ButtonUpEvent += ButUp;
   }
   
    void ButUp(tk2dButton b)
    {
      Debug.Log("ButUp " + b.gameObject.name);
    }

4
Support / Dynamic text buttons
« on: June 28, 2012, 03:53:58 pm »
Hi,

Im trying to create buttons with dynamic text e.g. multiply level buttons each assign a grade once the level is complete.

Whats the best approach to do this ?

Also is there a way to find out which button is pressed within the messagename function, or do I have to assign each button a new funtion name ?

5
Support / Re: Using Textmesh for HUD
« on: May 09, 2012, 02:30:39 pm »
Ah just realised I can attach the TextMesh / sprites to the camera  :D

6
Support / Using Textmesh for HUD
« on: May 09, 2012, 02:10:29 pm »
Hi

Is there an easy way to use the textmesh / sprites so that is can be used for a HUD ?

7
Thanks that help alot.

To detect if the animation has stopped i just raise another event. Is this a good idea ? Also anyway to get what the animation string is rather than the index ?

                tk2dAnimatedSprite animSprite = trigger.GetComponent<tk2dAnimatedSprite>();
                animSprite.Play("sparkle");
                animSprite.animationCompleteDelegate = SparkleFinish;

    private void SparkleFinish(tk2dAnimatedSprite sprite, int n)
    {
        sprite.renderer.enabled = false;
        Destroy(sprite.gameObject);
    }

8
Support / Getting access to the spriteanimation from a trigger event
« on: March 01, 2012, 04:33:02 pm »
Hi, how would I get the sprite to play a new animation once a trigger event occurs ?

e.g. my character collects stars, i want the stars to sparkle then vanish ( the trigger code is within the charcter )

   public void OnTriggerEnter(Collider trigger)
   {
      switch (trigger.gameObject.name)
      {
          case "pfWall":
         break;

          case "pfStar":
         
             trigger.gameObject......
         
             break
      }
   }

Pages: [1]