Advertisement
teleias

tk2d

Apr 3rd, 2015
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. Firstly:
  2. Make sure Main Camera's Position is 0 0 0
  3. Set Layout's Position to 0 0 100
  4. Lobby to 0 0 0
  5. Each unchecked map to 0 0 -1
  6.  
  7.  
  8. Map:
  9. Part A
  10. Text labels.
  11. You have a text Gameobject already.
  12. You'll be making a bunch of text.
  13. There will be 11 text things, so duplicate your text object 8 times.
  14. TreasureValue_Label
  15. TreasureValue
  16. ActiveHunters_Label
  17. ActiveHunters
  18. Capacity_Label
  19. Capacity
  20. EnrollmentCost_Label
  21. EnrollmentCost
  22. TimeLeft
  23. ClickCost
  24. Enroll_Label
  25. I'll be using code to make the text change.
  26. So all you have to do is make and position the Texts. Make sure the Z position of these is -1 and that they are children of Map. Exception: Make ClickCost and Enroll_Labels's Z equal to -2 instead.
  27. For example, in TreasureValue_Label, you'll set the text to be "Treasure Value", and position it to be in the top centerish area of the map.
  28. In TreasureValue, you'll set the text to be $10.15, and position that. I'll change it with code later.
  29. Do that for all the different parts.
  30.  
  31. Part B
  32. Click Cost Icon!
  33. You'll create a new empty gameObject, as a child to Map. Rename this to ClickCostIcon. Select ClickCostIcon and then go to Component > 2DToolkit > Sprite > tk2dsprite. Set the collection to be 'whatever', then have the sprite as ClickCost. Make sure Z position is -1. Rescale and reposition or whatever as needed. Find the ClickCost text you made before, and have it be a child of ClickCostIcon. Make sure ClickCost's Z and ClickCostIcon's Z are both -1.
  34.  
  35. Part C
  36. Button
  37. Same as click cost icon, make a new empty child of Map, rename it, resize it, reposition it. Now make Enroll_Label a child of this Button. Add a tk2dsprite as you did before (to button). Set the collection/sprite of the tk2dsprite to be whatever>defaultButton2. You're now going to add a lot of stuff:
  38. Component > 2D Toolkit > UI > Core > tk2dUIItem
  39. Component > Physics > Box Collider
  40. Component > 2D Toolkit > UI > tk2dUITweenItem
  41. Find the tk2dUIItem in your Button object, and find the [Fit] button. Press that.
  42. Find the Enroll_Label and set it as a child to Button. Make Enroll_Label's XYZ = 0 0 -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement