Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

38 lines
1.4KB

  1. using UnityEngine;
  2. using System.Collections;
  3. public class SampleActions : MonoBehaviour
  4. {
  5. public void Start()
  6. {
  7. Action seq = new ActionRepeat (new ActionSequence(new Action[]
  8. {
  9. new ActionParallel(new Action[] {
  10. new ActionMoveBy(new Vector3(10, 0, 0), 1),
  11. new ActionMoveBy(new Vector3(0, 10, 0), 1),
  12. new ActionRotateBy(new Vector3(90, 0, 0), 1),
  13. new ActionTintBy(new Vector4(-50, 50, -150, 0), 1)
  14. }),
  15. new ActionScaleBy(new Vector3(2, 2, 1), 1),
  16. new ActionScaleBy(new Vector3(0.5F, 0.5F, 2), 1),
  17. new ActionFadeBy(-1F, 2),
  18. new ActionFadeBy(1F, 2),
  19. new ActionDelay(1),
  20. new ActionRepeat(new ActionSequence(new Action[] {
  21. new ActionHide(),
  22. new ActionDelay(0F, 0.2F),
  23. new ActionShow(),
  24. new ActionDelay(0F, 0.2F),
  25. }), 5),
  26. new ActionDelay(1),
  27. new ActionMoveBy(new Vector3(-10, 0, 0), 1),
  28. new ActionDelay(0.5F),
  29. new ActionMoveTo(new Vector3(0, 0, 10), 1),
  30. new ActionScaleTo(new Vector3(2, 2, 2), 1),
  31. new ActionRotateTo(new Vector3(0, 0, 0), 1),
  32. new ActionTintTo(new Vector4(67, 105, 181, 255),3)
  33. }), 5);
  34. gameObject.SendMessage("AttachAction", seq);
  35. }
  36. }