PlayerItem.ts.json 7.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. "sourceFile": "assets/scripts/Game/PlayerItem.ts",
  3. "activeCommit": 0,
  4. "commits": [
  5. {
  6. "activePatchIndex": 5,
  7. "patches": [
  8. {
  9. "date": 1692768009881,
  10. "content": "Index: \n===================================================================\n--- \n+++ \n"
  11. },
  12. {
  13. "date": 1692768057146,
  14. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,25 @@\n+import { _decorator, Component, Node, SpriteFrame } from 'cc';\r\n+const { ccclass, property } = _decorator;\r\n+\r\n+@ccclass('PlayerItem')\r\n+export class PlayerItem extends Component {\r\n+\r\n+ @property(SpriteFrame)\r\n+ policeIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ theMassesIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ thiefIconList: SpriteFrame[] = [];\r\n+\r\n+ start() {\r\n+\r\n+ }\r\n+\r\n+ update(deltaTime: number) {\r\n+ \r\n+ }\r\n+}\r\n+\r\n+\r\n"
  15. },
  16. {
  17. "date": 1692773994956,
  18. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,29 @@\n+import { _decorator, Component, Node, SpriteFrame } from 'cc';\r\n+const { ccclass, property } = _decorator;\r\n+\r\n+@ccclass('PlayerItem')\r\n+export class PlayerItem extends Component {\r\n+\r\n+ @property(SpriteFrame)\r\n+ policeIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ theMassesIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ thiefIconList: SpriteFrame[] = [];\r\n+\r\n+ onLoad() {\r\n+ \r\n+ }\r\n+\r\n+ start() {\r\n+\r\n+ }\r\n+\r\n+ update(deltaTime: number) {\r\n+ \r\n+ }\r\n+}\r\n+\r\n+\r\n"
  19. },
  20. {
  21. "date": 1692776865982,
  22. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,44 @@\n+import { _decorator, Component, Node, SpriteFrame, Sprite } from 'cc';\r\n+import { GameConfig } from './GameConfig';\r\n+const { ccclass, property } = _decorator;\r\n+\r\n+@ccclass('PlayerItem')\r\n+export class PlayerItem extends Component {\r\n+\r\n+ @property(SpriteFrame)\r\n+ policeIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ theMassesIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ thiefIconList: SpriteFrame[] = [];\r\n+\r\n+ onLoad() {\r\n+ this.node.on(\"init\", this.init, this);\r\n+ }\r\n+\r\n+ start() {\r\n+\r\n+ }\r\n+\r\n+ init(type) {\r\n+ switch(type) {\r\n+ case GameConfig.PlayerType.Police:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.policeIconList[0];\r\n+ break;\r\n+ case GameConfig.PlayerType.Thief:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.thiefIconList[0];\r\n+ break;\r\n+ case GameConfig.PlayerType.TheMasses:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.theMassesIconList[Math.floor(Math.random() * 5)];\r\n+ break;\r\n+ }\r\n+ }\r\n+\r\n+ update(deltaTime: number) {\r\n+ \r\n+ }\r\n+}\r\n+\r\n+\r\n"
  23. },
  24. {
  25. "date": 1692784151819,
  26. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,44 @@\n+import { _decorator, Component, Node, SpriteFrame, Sprite } from 'cc';\r\n+import { GameConfig } from './GameConfig';\r\n+const { ccclass, property } = _decorator;\r\n+\r\n+@ccclass('PlayerItem')\r\n+export class PlayerItem extends Component {\r\n+\r\n+ @property(SpriteFrame)\r\n+ policeIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ theMassesIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ thiefIconList: SpriteFrame[] = [];\r\n+\r\n+ onLoad() {\r\n+ this.node.on(\"init\", this.init, this);\r\n+ }\r\n+\r\n+ start() {\r\n+\r\n+ }\r\n+\r\n+ init(type, policeID) {\r\n+ switch(type) {\r\n+ case GameConfig.PlayerType.Police:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.policeIconList[0];\r\n+ break;\r\n+ case GameConfig.PlayerType.Thief:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.thiefIconList[0];\r\n+ break;\r\n+ case GameConfig.PlayerType.TheMasses:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.theMassesIconList[Math.floor(Math.random() * 5)];\r\n+ break;\r\n+ }\r\n+ }\r\n+\r\n+ update(deltaTime: number) {\r\n+ \r\n+ }\r\n+}\r\n+\r\n+\r\n"
  27. },
  28. {
  29. "date": 1692784177693,
  30. "content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,44 @@\n+import { _decorator, Component, Node, SpriteFrame, Sprite } from 'cc';\r\n+import { GameConfig } from './GameConfig';\r\n+const { ccclass, property } = _decorator;\r\n+\r\n+@ccclass('PlayerItem')\r\n+export class PlayerItem extends Component {\r\n+\r\n+ @property(SpriteFrame)\r\n+ policeIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ theMassesIconList: SpriteFrame[] = [];\r\n+\r\n+ @property(SpriteFrame)\r\n+ thiefIconList: SpriteFrame[] = [];\r\n+\r\n+ onLoad() {\r\n+ this.node.on(\"init\", this.init, this);\r\n+ }\r\n+\r\n+ start() {\r\n+\r\n+ }\r\n+\r\n+ init(type, policeID) {\r\n+ switch(type) {\r\n+ case GameConfig.PlayerType.Police:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.policeIconList[policeID == 5 ? 0 : 1];\r\n+ break;\r\n+ case GameConfig.PlayerType.Thief:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.thiefIconList[0];\r\n+ break;\r\n+ case GameConfig.PlayerType.TheMasses:\r\n+ this.node.getComponent(Sprite).spriteFrame = this.theMassesIconList[Math.floor(Math.random() * 5)];\r\n+ break;\r\n+ }\r\n+ }\r\n+\r\n+ update(deltaTime: number) {\r\n+ \r\n+ }\r\n+}\r\n+\r\n+\r\n"
  31. }
  32. ],
  33. "date": 1692768009881,
  34. "name": "Commit-0",
  35. "content": "import { _decorator, Component, Node, SpriteFrame } from 'cc';\r\nconst { ccclass, property } = _decorator;\r\n\r\n@ccclass('PlayerItem')\r\nexport class PlayerItem extends Component {\r\n\r\n @property(SpriteFrame)\r\n policeIconList: SpriteFrame[] = null;\r\n\r\n @property(SpriteFrame)\r\n theMassesIconList: SpriteFrame[] = null;\r\n\r\n @property(SpriteFrame)\r\n thiefIconList: SpriteFrame[] = null;\r\n\r\n start() {\r\n\r\n }\r\n\r\n update(deltaTime: number) {\r\n \r\n }\r\n}\r\n\r\n\r\n"
  36. }
  37. ]
  38. }