Car.ts.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. "sourceFile": "assets/scripts/Game/Car.ts",
  3. "activeCommit": 0,
  4. "commits": [
  5. {
  6. "activePatchIndex": 6,
  7. "patches": [
  8. {
  9. "date": 1694593496402,
  10. "content": "Index: \n===================================================================\n--- \n+++ \n"
  11. },
  12. {
  13. "date": 1694593523132,
  14. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -9,9 +9,13 @@\n @property(Node)\r\n lun2: Node = null;\r\n \r\n onLoad() {\r\n+ this.node.on(\"init\", this.init, this);\r\n+ }\r\n \r\n+ init() {\r\n+ \r\n }\r\n }\r\n \r\n \r\n"
  15. },
  16. {
  17. "date": 1694593700664,
  18. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import { _decorator, Component, Node } from 'cc';\r\n+import { _decorator, Component, Node, Tween, tween } from 'cc';\r\n const { ccclass, property } = _decorator;\r\n \r\n @ccclass('Car')\r\n export class Car extends Component {\r\n@@ -13,9 +13,14 @@\n this.node.on(\"init\", this.init, this);\r\n }\r\n \r\n init() {\r\n- \r\n+ Tween.stopAllByTarget(this.lun1);\r\n+ Tween.stopAllByTarget(this.lun2);\r\n+ this.lun1.angle = 0;\r\n+ this.lun2.angle = 0;\r\n+ tween(this.lun1).by(1, { angle: 360 }).start();\r\n+ tween(this.lun2).by(1, { angle: 360 }).start();\r\n }\r\n }\r\n \r\n \r\n"
  19. },
  20. {
  21. "date": 1694594028031,
  22. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,5 +1,5 @@\n-import { _decorator, Component, Node, Tween, tween } from 'cc';\r\n+import { _decorator, Component, Node, Tween, tween, AudioSource } from 'cc';\r\n const { ccclass, property } = _decorator;\r\n \r\n @ccclass('Car')\r\n export class Car extends Component {\r\n@@ -8,8 +8,11 @@\n \r\n @property(Node)\r\n lun2: Node = null;\r\n \r\n+ @property(AudioSource)\r\n+ audio: AudioSource = null;\r\n+\r\n onLoad() {\r\n this.node.on(\"init\", this.init, this);\r\n }\r\n \r\n"
  23. },
  24. {
  25. "date": 1694594072956,
  26. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -22,8 +22,12 @@\n this.lun1.angle = 0;\r\n this.lun2.angle = 0;\r\n tween(this.lun1).by(1, { angle: 360 }).start();\r\n tween(this.lun2).by(1, { angle: 360 }).start();\r\n+ this.audio.play();\r\n+ setTimeout(() => {\r\n+ this.audio.pause();\r\n+ }, 1 * 1000);\r\n }\r\n }\r\n \r\n \r\n"
  27. },
  28. {
  29. "date": 1694594217797,
  30. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -25,9 +25,9 @@\n tween(this.lun2).by(1, { angle: 360 }).start();\r\n this.audio.play();\r\n setTimeout(() => {\r\n this.audio.pause();\r\n- }, 1 * 1000);\r\n+ }, 1.5 * 1000);\r\n }\r\n }\r\n \r\n \r\n"
  31. },
  32. {
  33. "date": 1694594232352,
  34. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -25,9 +25,9 @@\n tween(this.lun2).by(1, { angle: 360 }).start();\r\n this.audio.play();\r\n setTimeout(() => {\r\n this.audio.pause();\r\n- }, 1.5 * 1000);\r\n+ }, 1 * 1000);\r\n }\r\n }\r\n \r\n \r\n"
  35. }
  36. ],
  37. "date": 1694593496402,
  38. "name": "Commit-0",
  39. "content": "import { _decorator, Component, Node } from 'cc';\r\nconst { ccclass, property } = _decorator;\r\n\r\n@ccclass('Car')\r\nexport class Car extends Component {\r\n @property(Node)\r\n lun1: Node = null;\r\n\r\n @property(Node)\r\n lun2: Node = null;\r\n\r\n onLoad() {\r\n\r\n }\r\n}\r\n\r\n\r\n"
  40. }
  41. ]
  42. }