1234567891011121314151617181920212223242526272829303132333435363738 |
- {
- "sourceFile": "assets/scripts/Game/PlayerItem.ts",
- "activeCommit": 0,
- "commits": [
- {
- "activePatchIndex": 5,
- "patches": [
- {
- "date": 1692768009881,
- "content": "Index: \n===================================================================\n--- \n+++ \n"
- },
- {
- "date": 1692768057146,
- "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"
- },
- {
- "date": 1692773994956,
- "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"
- },
- {
- "date": 1692776865982,
- "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"
- },
- {
- "date": 1692784151819,
- "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"
- },
- {
- "date": 1692784177693,
- "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"
- }
- ],
- "date": 1692768009881,
- "name": "Commit-0",
- "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"
- }
- ]
- }
|