Citrus 4 luni în urmă
părinte
comite
fbd6d942b6

+ 54 - 17
assets/Script/AutoBuild.ts

@@ -1,23 +1,43 @@
-import { _decorator, Component, instantiate, Node, Prefab, resources, UITransform } from 'cc';
+import { _decorator, Component, instantiate, Node, Prefab, resources, sys, UITransform } from 'cc';
 import { PropBase } from './Prop/Base/PropBase';
 import { ObjectPoolManager } from './Prop/ObjectPoolManager';
+import { EventManager } from './EventManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('AutoBuild')
 export class AutoBuild extends Component {
 
 
+    ISbuild = true
+
+    //多少秒 生成一个
+    Time = 0.25
+
+    // 底板和地刺的生成概率
+    Probability = [0.8, 0.2]
+
+
     protected onLoad(): void {
+
         ObjectPoolManager.getInstance().initializePools().then((ok) => {
             if (ok) {
                 console.log('初始化成功');
+
+                let floorType = [FloorType.diban, FloorType.dicin]
                 this.schedule(() => {
-                    this.BuildOnce(FloorType.diban)
-                }, 0.1)
+                    this.ISbuild && this.BuildOnce(floorType[this.selectByProbability()]);
+                }, this.Time)
             }
         });
     }
 
+
+
+
+    Pause(b: boolean) {
+        this.ISbuild = b
+    }
+
     BuildOnce(Type: FloorType) {
         let Node = ObjectPoolManager.getInstance().getNodeFromPool(Type, this.node)
         if (!Node) {
@@ -25,31 +45,48 @@ export class AutoBuild extends Component {
             return
         }
 
-        // this.InitNode(Node)
+        // 加一分
+        EventManager.instance.et.emit(EventManager.EventType.Add_Score);
+
+
+
     }
 
     ClerarNode() {
 
     }
-    InitNode(node: Node) {
-        this.node.addChild(node);
-        let size = this.node.getComponent(UITransform).contentSize
-
-        let width = (size.width - (node.getComponent(UITransform).contentSize.width * 1.33)) / 2;
-        let height = -size.height / 2;
-        height -= 200;
-        const x = this.getRandomNumber(-width, width);
-        const y = height
-
-        node.setPosition(x, y, 0);
-        node.getComponent(PropBase).UpSpeed = 20
-    }
 
     getRandomNumber(min: number, max: number): number {
         return Math.floor(Math.random() * (max - min + 1)) + min;
     }
 
 
+    public selectByProbability(): number {
+        if (this.Probability.length === 0) {
+            console.error('Probability array is empty');
+            return -1;
+        }
+
+        const totalProbability = this.Probability.reduce((sum, probability) => sum + probability, 0);
+        if (totalProbability !== 1) {
+            console.warn('Probability array does not sum to 1, normalizing this.Probability');
+            this.Probability = this.Probability.map(p => p / totalProbability);
+        }
+
+        const randomValue = Math.random();
+        let cumulativeProbability = 0;
+
+        for (let i = 0; i < this.Probability.length; i++) {
+            cumulativeProbability += this.Probability[i];
+            if (randomValue < cumulativeProbability) {
+                return i;
+            }
+        }
+
+        // 这个返回应该永远不会触发,因为随机值一定会小于等于 1
+        return this.Probability.length - 1;
+    }
+
 }
 
 export enum FloorType {

+ 41 - 0
assets/Script/EventManager.ts

@@ -0,0 +1,41 @@
+import { _decorator, EventTarget } from 'cc';
+const { ccclass, property } = _decorator;
+
+/**
+ * @description 本地存储管理
+ */
+export class EventManager {
+  static EventType = {
+    Add_haert: 'Add_haert',
+    Cut_haert: 'Cut_haert',
+
+    Add_Score: 'Add_Score',
+    Reset_Score: 'Reset_Score',
+    Set_Add_Score_BOOL: 'Set_Add_Score_BOOL',
+
+    Reset_Role: 'Reset_Role',
+
+    Die_Role: 'Die_Role',
+
+ 
+
+    OpenUIPnael: 'OpenUIPnael',
+  }
+
+  private static _instance: EventManager = null;
+  static get instance() {
+    if (this._instance) {
+      return this._instance;
+    }
+    this._instance = new EventManager();
+    return this._instance;
+  }
+  public et: EventTarget = new EventTarget();
+
+
+  ClearAll() {
+    this.et = null
+    this.et = new EventTarget();
+  }
+}
+

+ 9 - 0
assets/Script/EventManager.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "3782159a-15c3-48b3-8b21-11d2a1dc7a39",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 9 - 14
assets/Script/Game.ts

@@ -1,14 +1,9 @@
-import { _decorator, Component, Node } from 'cc';
-const { ccclass, property } = _decorator;
-
-@ccclass('Game')
-export class Game extends Component {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
-    }
-}
-

+import { _decorator, Component, Node } from 'cc';
+const { ccclass, property } = _decorator;
+
+@ccclass('Game')
+export class Game extends Component {
+ 
+}
+
+

+ 1 - 1
assets/Script/Loading.ts

@@ -44,7 +44,7 @@ export class Loading extends Component {
 
 
                 if (DEBUG) {
-                    this.ClickGame()
+                    // this.ClickGame()
                 }
             })
     }

+ 7 - 11
assets/Script/Prop/Base/PropBase.ts

@@ -29,19 +29,15 @@ export class PropBase extends Component {
 
     updateTime: number;
     update(deltaTime: number) {
-        // this.updateTime += deltaTime;
-        // let _time = 1 / 60//60FPS
-        // if (this.updateTime < _time) return;
-        // this.updateTime = this.updateTime - _time;
+        this.updateTime += deltaTime;
+        let _time = 1 / 60//60FPS
+        if (this.updateTime < _time) return;
+        this.updateTime = this.updateTime - _time;
         this.FixUpdate()
     }
     FixUpdate() {
         let height = this.ParentSize.height / 2;
-        height += 100
-
-        console.error(height)
-        console.error(this.node.getPosition().y)
-
+        height += 50
         if (this.node.getPosition().y > height) {
             ObjectPoolManager.getInstance().putNodeToPool(this.node)
         }
@@ -62,12 +58,12 @@ export class PropBase extends Component {
 
         let width = (size.width - (this.node.getComponent(UITransform).contentSize.width * 1.33)) / 2;
         let height = -size.height / 2;
-        height -= 200;
+        height -= 50;
         const x = this.getRandomNumber(-width, width);
         const y = height
 
         this.node.setPosition(x, y, 0);
-        this.node.getComponent(PropBase).UpSpeed = 20
+        this.node.getComponent(PropBase).UpSpeed = 15
     }
 
 

+ 0 - 3
assets/Script/Prop/ObjectPoolManager.ts

@@ -68,15 +68,12 @@ export class ObjectPoolManager extends Component {
         if (!prefab) {
             debugger
         }
-        console.error(this.pools[prefabName].size());
-
         if (this.pools[prefabName].size() == 0) {
 
             let temp = instantiate(prefab[0])
             temp.name = prefabName;
             this.putNodeToPool(temp)
         }
-
         return this.pools[prefabName].get(ParentNode);
     }
 

+ 37 - 14
assets/Script/Prop/Role.ts

@@ -1,14 +1,37 @@
-import { _decorator, Component, Node } from 'cc';
-const { ccclass, property } = _decorator;
-
-@ccclass('Role')
-export class Role extends Component {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
-    }
-}
-

+import { _decorator, CircleCollider2D, Collider, Collider2D, Component, Contact2DType, ERigidBody2DType, ICollisionEvent, IPhysics2DContact, Node, PhysicsSystem2D, RigidBody2D, Vec2, Vec3 } from 'cc';
+import { EventManager } from '../EventManager';
+const { ccclass, property } = _decorator;
+
+@ccclass('Role')
+export class Role extends Component {
+    rigidBody: any;
+
+
+
+    public start() {
+        let collider = this.getComponent(Collider2D);
+        if (collider) {
+            collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
+        }
+    }
+
+    onBeginContact(selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
+        // 只在两个碰撞体开始接触时被调用一次
+
+        switch (otherCollider.node.name) {
+            case 'Top':
+            case 'Bottom':
+            case 'dici':
+                EventManager.instance.et.emit(EventManager.EventType.Cut_haert);
+                break;
+            default:
+                break;
+        }
+
+
+    }
+
+
+}
+
+

+ 1 - 1
assets/Script/Prop/Type/dici.ts

@@ -3,7 +3,7 @@ import { PropBase } from '../Base/PropBase';
 const { ccclass, property } = _decorator;
 
 @ccclass('diban')
-export class diban extends PropBase {
+export class dici extends PropBase {
  
 }
 

+ 127 - 0
assets/Script/RoleControl.ts

@@ -0,0 +1,127 @@
+import { _decorator, CircleCollider2D, Component, log, Node, RigidBody2D, Vec2, Vec3 } from 'cc';
+import { EventManager } from './EventManager';
+import { PropBase } from './Prop/Base/PropBase';
+import { diban } from './Prop/Type/diban';
+const { ccclass, property } = _decorator;
+
+@ccclass('RoleControl')
+export class RoleControl extends Component {
+    @property(Node)
+    Role: Node = null;
+
+    @property(Node)
+    LeftBtn: Node = null;
+
+    @property(Node)
+    RightBtn: Node = null;
+
+
+    private UpSpeed: number = 20;
+    private G: number = 20;
+
+
+    MyDir: number = 0;
+
+    protected onLoad(): void {
+        EventManager.instance.et.on(EventManager.EventType.Reset_Role, this.Reset_Role, this);
+        EventManager.instance.et.on(EventManager.EventType.Die_Role, this.Die_Role, this);
+
+    }
+
+    Die_Role() {
+        this.scheduleOnce(() => {
+            this.Role.active = false
+        }, 0)
+    }
+    Reset_Role() {
+        this.Role.active = true
+        let Nodes = this.getComponentsInChildren(PropBase).filter((item) => {
+            return item.node.position.y < 0
+        })
+
+        let Nodes1 = Nodes.filter((item) => {
+            return item.node.name == 'diban'
+        })
+
+
+        let SortNodes = Nodes1.sort((a, b) => {
+            return a.node.position.y - b.node.position.y
+        })
+
+        let TempNode = SortNodes.pop()
+
+        this.scheduleOnce(() => {
+            this.Role.setPosition(new Vec3(TempNode.node.position.x, TempNode.node.position.y + 45, 0))
+            this.Role.getComponent(RigidBody2D).linearVelocity = new Vec2(0, -this.G); // 速度值可以根据需要调整
+        }, 0)
+
+
+    }
+
+    protected start(): void {
+
+
+        this.Role.getComponent(RigidBody2D).linearVelocity = new Vec2(0, -this.G); // 速度值可以根据需要调整
+
+
+        this.LeftBtn.on(Node.EventType.TOUCH_START, this.LeftStart, this);
+        this.RightBtn.on(Node.EventType.TOUCH_START, this.RightStart, this);
+
+
+        this.LeftBtn.on(Node.EventType.TOUCH_END, this.LeftEnd, this);
+        this.RightBtn.on(Node.EventType.TOUCH_END, this.RightEnd, this);
+    }
+    LeftStart() {
+        this.MyDir = -1
+    }
+    RightStart() {
+        this.MyDir = 1
+    }
+
+    LeftEnd() {
+        if (this.MyDir == 1) {
+            return
+        }
+        this.MyDir = 0
+    }
+
+    RightEnd() {
+        if (this.MyDir == -1) {
+            return
+        }
+        this.MyDir = 0
+
+    }
+
+    updateTime: number;
+    update(deltaTime: number) {
+        this.updateTime += deltaTime;
+        let _time = 1 / 60//60FPS
+        if (this.updateTime < _time) return;
+        this.updateTime = this.updateTime - _time;
+        this.FixUpdate()
+    }
+    FixUpdate() {
+
+
+
+        if (!this.Role.getComponent(RigidBody2D)) {
+            return
+        }
+        switch (this.MyDir) {
+            case 0:
+                this.Role.getComponent(RigidBody2D).linearVelocity = new Vec2(0, -this.G); // 速度值可以根据需要调整
+                break;
+            case -1:
+                this.Role.getComponent(RigidBody2D).linearVelocity = new Vec2(-this.UpSpeed, -this.G); // 速度值可以根据需要调整
+                break;
+            case 1:
+                this.Role.getComponent(RigidBody2D).linearVelocity = new Vec2(this.UpSpeed, -this.G); // 速度值可以根据需要调整
+                break;
+            default:
+                break;
+        }
+    }
+}
+
+

+ 9 - 0
assets/Script/RoleControl.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "266bef25-ebfc-4d78-8b40-450e2bc945b4",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 62 - 0
assets/Script/Top.ts

@@ -0,0 +1,62 @@
+import { _decorator, Component, Label, Node } from 'cc';
+import { EventManager } from './EventManager';
+const { ccclass, property } = _decorator;
+
+@ccclass('Top')
+export class Top extends Component {
+    @property(Label)
+    haertLabel: Label = null;
+
+    @property(Label)
+    ScoreLabel: Label = null;
+
+    protected onLoad(): void {
+        EventManager.instance.et.on(EventManager.EventType.Add_haert, this.Add_haert, this);
+        EventManager.instance.et.on(EventManager.EventType.Cut_haert, this.Cut_haert, this);
+        EventManager.instance.et.on(EventManager.EventType.Add_Score, this.Add_Score, this);
+        EventManager.instance.et.on(EventManager.EventType.Set_Add_Score_BOOL, this.Set_Add_Score_BOOL, this);
+        EventManager.instance.et.on(EventManager.EventType.Reset_Score, this.Reset_Score, this);
+
+    }
+
+    Cut_haert() {
+        if (parseInt(this.haertLabel.string) > 0) {
+            this.haertLabel.string = (parseInt(this.haertLabel.string) - 1) + "";
+
+            EventManager.instance.et.emit(EventManager.EventType.Reset_Role);
+        } else {
+            //死了
+            console.error('死了');
+
+            EventManager.instance.et.emit(EventManager.EventType.Set_Add_Score_BOOL, false);
+
+            EventManager.instance.et.emit(EventManager.EventType.Die_Role);
+            EventManager.instance.et.emit(EventManager.EventType.OpenUIPnael);
+        }
+    }
+
+
+    protected start(): void {
+        EventManager.instance.et.emit(EventManager.EventType.Reset_Score);
+    }
+
+    Add_haert() {
+        this.haertLabel.string = (parseInt(this.haertLabel.string) + 1) + "";
+    }
+
+    Add_Score_Bool = true
+    Add_Score() {
+        if (this.Add_Score_Bool) {
+            this.ScoreLabel.string = (parseInt(this.ScoreLabel.string) + 1) + "";
+        }
+    }
+    Set_Add_Score_BOOL(b: boolean) {
+        this.Add_Score_Bool = b
+    }
+
+    Reset_Score() {
+        this.ScoreLabel.string = '0'
+    }
+}
+
+

+ 9 - 0
assets/Script/Top.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "8919af83-d31b-4ed5-86a1-76d2a6fc78f0",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 9 - 0
assets/Script/UI.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.0",
+  "importer": "directory",
+  "imported": true,
+  "uuid": "8190d223-b263-40eb-ac0b-fc3b4753c3c9",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 89 - 0
assets/Script/UI/UI.ts

@@ -0,0 +1,89 @@
+import { _decorator, Component, director, Label, Node } from 'cc';
+import { EventManager } from '../EventManager';
+const { ccclass, property } = _decorator;
+
+@ccclass('UI')
+export class UI extends Component {
+
+
+    @property(Node)
+    FuhuoNode: Node = null;
+    @property(Node)
+    RestartNode: Node = null;
+    @property(Node)
+    HomeNode: Node = null;
+
+
+    protected onLoad(): void {
+        EventManager.instance.et.on(EventManager.EventType.OpenUIPnael, this.OpenUIPnael, this);
+    }
+
+
+    OpenUIPnael() {
+        this.init()
+    }
+
+    init() {
+        this.node.children.forEach((item: Node) => {
+            item.active = true;
+        })
+        this.FuhuoNode.active = true;
+        this.RestartNode.active = false;
+        this.HomeNode.active = false;
+
+        this.schedule(() => {
+            this.FuhuoNode.getComponentInChildren(Label).string = (parseInt(this.FuhuoNode.getComponentInChildren(Label).string) - 1) + ''
+        }, 1, 3, 0)
+
+        this.scheduleOnce(() => {
+            this.FuhuoNode.active = false;
+            this.RestartNode.active = true;
+            this.HomeNode.active = true;
+        }, 3)
+
+
+
+    }
+
+
+    Restart() {
+        director.loadScene('Game', (err) => {
+            if (err) {
+                console.error(err);
+                return;
+            }
+            console.log('加载场景成功');
+        })
+        this.close()
+    }
+
+
+    Home() {
+        director.loadScene('loading', (err) => {
+            if (err) {
+                console.error(err);
+                return;
+            }
+            console.log('加载场景成功');
+        })
+        this.close()
+    }
+
+
+    FuHuo() {
+        EventManager.instance.et.emit(EventManager.EventType.Add_haert);
+        EventManager.instance.et.emit(EventManager.EventType.Set_Add_Score_BOOL, true);
+        EventManager.instance.et.emit(EventManager.EventType.Reset_Role);
+        this.close()
+    }
+
+    close() {
+
+        this.unscheduleAllCallbacks()
+        this.node.children.forEach((item: Node) => {
+            item.active = false;
+        })
+    }
+}
+
+

+ 9 - 0
assets/Script/UI/UI.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "03aeee56-b42b-4ea6-a33f-ff75f98e96f8",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

Fișier diff suprimat deoarece este prea mare
+ 608 - 215
assets/resources/Game.scene


+ 2 - 2
assets/resources/Prefabs/diban.prefab

@@ -157,7 +157,7 @@
     "bullet": false,
     "awakeOnLoad": true,
     "_group": 2,
-    "_type": 2,
+    "_type": 1,
     "_allowSleep": true,
     "_gravityScale": 0,
     "_linearDamping": 0,
@@ -189,7 +189,7 @@
     },
     "tag": 0,
     "_group": 2,
-    "_density": 1,
+    "_density": 0,
     "_sensor": false,
     "_friction": 0.2,
     "_restitution": 0,

+ 3 - 3
assets/resources/Prefabs/dici.prefab

@@ -157,7 +157,7 @@
     "bullet": false,
     "awakeOnLoad": true,
     "_group": 2,
-    "_type": 2,
+    "_type": 1,
     "_allowSleep": true,
     "_gravityScale": 0,
     "_linearDamping": 0,
@@ -189,9 +189,9 @@
     },
     "tag": 0,
     "_group": 2,
-    "_density": 1,
+    "_density": 0,
     "_sensor": false,
-    "_friction": 0.2,
+    "_friction": 1,
     "_restitution": 0,
     "_offset": {
       "__type__": "cc.Vec2",

+ 9 - 0
assets/resources/image/Fail.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.0",
+  "importer": "directory",
+  "imported": true,
+  "uuid": "b25c6ca0-5463-4a9c-a43e-77dca75ffff6",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

BIN
assets/resources/image/Fail/容器(1).png


+ 134 - 0
assets/resources/image/Fail/容器(1).png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "5dd8755f-df98-4407-bcf8-58a214e80d63",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "5dd8755f-df98-4407-bcf8-58a214e80d63@6c48a",
+      "displayName": "容器(1)",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "5dd8755f-df98-4407-bcf8-58a214e80d63",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "5dd8755f-df98-4407-bcf8-58a214e80d63@f9941",
+      "displayName": "容器(1)",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 235,
+        "height": 76,
+        "rawWidth": 235,
+        "rawHeight": 76,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -117.5,
+            -38,
+            0,
+            117.5,
+            -38,
+            0,
+            -117.5,
+            38,
+            0,
+            117.5,
+            38,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            76,
+            235,
+            76,
+            0,
+            0,
+            235,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -117.5,
+            -38,
+            0
+          ],
+          "maxPos": [
+            117.5,
+            38,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "5dd8755f-df98-4407-bcf8-58a214e80d63@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "5dd8755f-df98-4407-bcf8-58a214e80d63@6c48a"
+  }
+}

BIN
assets/resources/image/Fail/容器.png


+ 134 - 0
assets/resources/image/Fail/容器.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "bea5ea06-9da8-41ef-8da3-555801889e20",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "bea5ea06-9da8-41ef-8da3-555801889e20@6c48a",
+      "displayName": "容器",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "bea5ea06-9da8-41ef-8da3-555801889e20",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "bea5ea06-9da8-41ef-8da3-555801889e20@f9941",
+      "displayName": "容器",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 362,
+        "height": 69,
+        "rawWidth": 362,
+        "rawHeight": 69,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -181,
+            -34.5,
+            0,
+            181,
+            -34.5,
+            0,
+            -181,
+            34.5,
+            0,
+            181,
+            34.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            69,
+            362,
+            69,
+            0,
+            0,
+            362,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -181,
+            -34.5,
+            0
+          ],
+          "maxPos": [
+            181,
+            34.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "bea5ea06-9da8-41ef-8da3-555801889e20@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "bea5ea06-9da8-41ef-8da3-555801889e20@6c48a"
+  }
+}

BIN
assets/resources/image/Fail/容器1.png


+ 134 - 0
assets/resources/image/Fail/容器1.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521@6c48a",
+      "displayName": "容器1",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521@f9941",
+      "displayName": "容器1",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 235,
+        "height": 76,
+        "rawWidth": 235,
+        "rawHeight": 76,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -117.5,
+            -38,
+            0,
+            117.5,
+            -38,
+            0,
+            -117.5,
+            38,
+            0,
+            117.5,
+            38,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            76,
+            235,
+            76,
+            0,
+            0,
+            235,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -117.5,
+            -38,
+            0
+          ],
+          "maxPos": [
+            117.5,
+            38,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "eeb3bace-bbdb-4ae2-97bf-15ea9ffd0521@6c48a"
+  }
+}

BIN
assets/resources/image/Fail/挑战失败.png


+ 134 - 0
assets/resources/image/Fail/挑战失败.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "c4297fc9-7fa8-456c-999e-89848e5cca32",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "c4297fc9-7fa8-456c-999e-89848e5cca32@6c48a",
+      "displayName": "挑战失败",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "c4297fc9-7fa8-456c-999e-89848e5cca32",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "c4297fc9-7fa8-456c-999e-89848e5cca32@f9941",
+      "displayName": "挑战失败",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 216,
+        "height": 53,
+        "rawWidth": 216,
+        "rawHeight": 53,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -108,
+            -26.5,
+            0,
+            108,
+            -26.5,
+            0,
+            -108,
+            26.5,
+            0,
+            108,
+            26.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            53,
+            216,
+            53,
+            0,
+            0,
+            216,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -108,
+            -26.5,
+            0
+          ],
+          "maxPos": [
+            108,
+            26.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "c4297fc9-7fa8-456c-999e-89848e5cca32@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "c4297fc9-7fa8-456c-999e-89848e5cca32@6c48a"
+  }
+}

BIN
assets/resources/image/Fail/花瓣素材_emoji表情2_48157303.png


+ 134 - 0
assets/resources/image/Fail/花瓣素材_emoji表情2_48157303.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "72432159-7db2-4fe7-a2bb-03cbe71840f3",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "72432159-7db2-4fe7-a2bb-03cbe71840f3@6c48a",
+      "displayName": "花瓣素材_emoji表情2_48157303",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "72432159-7db2-4fe7-a2bb-03cbe71840f3",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "72432159-7db2-4fe7-a2bb-03cbe71840f3@f9941",
+      "displayName": "花瓣素材_emoji表情2_48157303",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 2,
+        "trimY": 2,
+        "width": 176,
+        "height": 176,
+        "rawWidth": 180,
+        "rawHeight": 180,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -88,
+            -88,
+            0,
+            88,
+            -88,
+            0,
+            -88,
+            88,
+            0,
+            88,
+            88,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            2,
+            178,
+            178,
+            178,
+            2,
+            2,
+            178,
+            2
+          ],
+          "nuv": [
+            0.011111111111111112,
+            0.011111111111111112,
+            0.9888888888888889,
+            0.011111111111111112,
+            0.011111111111111112,
+            0.9888888888888889,
+            0.9888888888888889,
+            0.9888888888888889
+          ],
+          "minPos": [
+            -88,
+            -88,
+            0
+          ],
+          "maxPos": [
+            88,
+            88,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "72432159-7db2-4fe7-a2bb-03cbe71840f3@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "72432159-7db2-4fe7-a2bb-03cbe71840f3@6c48a"
+  }
+}

+ 2 - 2
settings/v2/packages/engine.json

@@ -56,10 +56,10 @@
         "_option": "physics-2d-box2d"
       },
       "physics-2d-box2d": {
-        "_value": false
+        "_value": "physics-2d-box2d"
       },
       "physics-2d-builtin": {
-        "_value": false
+        "_value": "physics-2d-builtin"
       },
       "intersection-2d": {
         "_value": true

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff