您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

38 行
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. }