AMCameraSwitcherKey.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. [Serializable]
  5. public class AMCameraSwitcherKey : AMKey
  6. {
  7. public bool setCamera(Camera camera)
  8. {
  9. if (camera != this.camera)
  10. {
  11. this.camera = camera;
  12. return true;
  13. }
  14. return false;
  15. }
  16. public bool setColor(Color color)
  17. {
  18. if (color != this.color)
  19. {
  20. this.color = color;
  21. return true;
  22. }
  23. return false;
  24. }
  25. public bool setType(int type)
  26. {
  27. if (type != this.type)
  28. {
  29. this.type = type;
  30. return true;
  31. }
  32. return false;
  33. }
  34. public bool setStill(bool still)
  35. {
  36. if (still != this.still)
  37. {
  38. this.still = still;
  39. return true;
  40. }
  41. return false;
  42. }
  43. public bool setCameraFadeType(int cameraFadeType)
  44. {
  45. if (cameraFadeType != this.cameraFadeType)
  46. {
  47. this.cameraFadeType = cameraFadeType;
  48. return true;
  49. }
  50. return false;
  51. }
  52. public override AMKey CreateClone()
  53. {
  54. AMCameraSwitcherKey amcameraSwitcherKey = ScriptableObject.CreateInstance<AMCameraSwitcherKey>();
  55. amcameraSwitcherKey.frame = this.frame;
  56. amcameraSwitcherKey.type = this.type;
  57. amcameraSwitcherKey.camera = this.camera;
  58. amcameraSwitcherKey.color = this.color;
  59. amcameraSwitcherKey.cameraFadeType = this.cameraFadeType;
  60. amcameraSwitcherKey.cameraFadeParameters = new List<float>(this.cameraFadeParameters);
  61. amcameraSwitcherKey.irisShape = this.irisShape;
  62. amcameraSwitcherKey.still = this.still;
  63. amcameraSwitcherKey.easeType = this.easeType;
  64. amcameraSwitcherKey.customEase = new List<float>(this.customEase);
  65. return amcameraSwitcherKey;
  66. }
  67. public int type;
  68. public Camera camera;
  69. public Color color;
  70. public int cameraFadeType;
  71. public List<float> cameraFadeParameters = new List<float>();
  72. public Texture2D irisShape;
  73. public bool still;
  74. }