You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

README.md 2.2KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. coa4u
  2. =====
  3. ## Cocos2d-like Actions for Unity3d
  4. Unity3d is a very good game engine. It's almost perfect for quick prototyping.
  5. After switching from Cocos2D to Unity3d, i'm still missing just one cocos's feature - actions.
  6. It's a great combination of simplicity and flexibility, and i haven't found the suitable replacement for it.
  7. Since actions are quite simple, i implemented them myself.
  8. ### How to use
  9. 1. Place the coa4u folder from Assets/scripts in your Assets/scripts folder.
  10. 2. Then attach the Actor.cs script to the object you want.
  11. 3. See the ActorSampleActions.cs class, if you need examples.
  12. You can also add actions on the fly, by using the AttachAction method of the Actor class.
  13. ### Included actions
  14. All actions are capable to work both in 3D (use Vector3) and 2D (use Vector2) scenes.
  15. Base actions
  16. - [x] Sequence
  17. - [x] Parallel
  18. - [x] Repeat and Loop *implemented in one action*
  19. *Every reversable action has a reverse() method. So, no plans for Reverse action right now.*
  20. Interval actions
  21. - [x] Delay and RandomDelay *implemented in one action*
  22. - [x] MoveTo
  23. - [x] MoveBy
  24. - [x] RotateTo
  25. - [x] RotateBy
  26. - [x] ScaleTo
  27. - [x] ScaleBy
  28. - [x] BezierAbs
  29. - [x] BezierRel
  30. - [x] JumpTo *uses Bezier action to move the object*
  31. - [x] JumpBy *uses Bezier action to move the object*
  32. - [x] Blink
  33. *if you want to manipulate alpha with the following actions, your material should support transparency (i.e. use Transparent shader)*
  34. - [x] TintBy
  35. - [x] TintTo
  36. - [x] FadeOut
  37. - [x] FadeIn
  38. - [x] FadeTo
  39. - [x] FadeBy
  40. Instant actions
  41. - [x] Place *renamed to SetPlace*
  42. - [x] CallFunc *renamed to SendMessage*
  43. - [x] Hide
  44. - [x] Show
  45. - [x] ToggleVisibility
  46. There's no plans for 3DGrid actions. You can use the 3D actions instead.
  47. ### Some additional actions
  48. Base actions
  49. - [x] Random - randomly choises and does one action from the given list.
  50. Instant actions
  51. - [x] SetRotation - instantly rotates the object to the given euler angles.
  52. - [x] SetTint - instantly tints the object to the given color.
  53. - [x] SetDirection - instantly rotates the object to look at the given actor.
  54. - [x] Stop - stops all actions for this object.
  55. ### Future plans
  56. No future plans.
  57. ## License
  58. Just like Cocos2D, this code licensed under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)