diff --git a/assets/resources/scenes/puzzle.scene b/assets/resources/scenes/puzzle.scene index 7fd92b0..cf2e74a 100644 --- a/assets/resources/scenes/puzzle.scene +++ b/assets/resources/scenes/puzzle.scene @@ -593,6 +593,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "deKgzPusdEg5ZS8uG08ftv" }, { @@ -694,6 +698,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "6aY15ClFBEaZPjUXwBXEQB" }, { @@ -795,6 +803,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "bbmQIYT7ZDV5uljzyjM4ge" }, { @@ -896,6 +908,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "a8ZTc35k1KkZtT4jc5ojTE" }, { @@ -997,6 +1013,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "1edDfLe8BDHrx2CuneIswT" }, { @@ -1098,6 +1118,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "7e+dxqLS1JYI3a6LLNItuN" }, { @@ -1199,6 +1223,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "08SH83B91ByJjVY2LpReq5" }, { @@ -1300,6 +1328,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "d0uZhsDg9BkrOwEMUIVHg2" }, { @@ -1401,6 +1433,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "e9Rc2sdVpBQpteoOiQVcPy" }, { @@ -1502,6 +1538,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 1, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "96lzd198VOF5gStQrFsYRZ" }, { @@ -1701,6 +1741,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "fd+IJv28VDvYth30IukznL" }, { @@ -1802,6 +1846,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "36au22b55Pz4oqggFIBwkh" }, { @@ -1903,6 +1951,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "1d9UuMzvVNTKaKzJaUhklR" }, { @@ -2004,6 +2056,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "f7NUZxvopAyrcsASlkq+hl" }, { @@ -2105,6 +2161,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "cdYznzcO5DX6fYEd8SBX7w" }, { @@ -2206,6 +2266,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "b3uSWrAldN3apFhMGGAgNf" }, { @@ -2307,6 +2371,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "44BR96pF9Ee7LjQK23x/mt" }, { @@ -2408,6 +2476,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "b85Q3A4aFOT4LugCNz/ala" }, { @@ -2509,6 +2581,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "743sSFcC5Lwai2W0sL2IPM" }, { @@ -2610,6 +2686,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 2, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "b89wQPifJGNLEvAfApMetQ" }, { @@ -2809,6 +2889,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "a76AknJA9CL56Qudnp6AAS" }, { @@ -2910,6 +2994,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "48+XqrBr1L3Ix+NJpFQn22" }, { @@ -3011,6 +3099,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "f6B52EmdVLhp0CfIgwHAz6" }, { @@ -3112,6 +3204,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "b1+U0g5d9FkJVnZ4HGXx3q" }, { @@ -3213,6 +3309,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "29GsZ3IuZGJY0WSgfkmY4C" }, { @@ -3314,6 +3414,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "38lMoTlLlFYa4RUhBMhsgs" }, { @@ -3415,6 +3519,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "78WaD2SFNMCKkxxW4bhBu4" }, { @@ -3516,6 +3624,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "ad9BqIh2VPBbcHhew76h5P" }, { @@ -3617,6 +3729,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "b5gZ7lZddHUKNNaIKkE04t" }, { @@ -3718,6 +3834,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 3, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "46m2NXVkFFKLKbJPwAmtKJ" }, { @@ -3917,6 +4037,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "42MmwyjHJIs4vsa/sCv3B1" }, { @@ -4018,6 +4142,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "01QmwxcPZOxL7i0iNtBJue" }, { @@ -4119,6 +4247,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "5bsCZX+MVH3KpEArVytcQ4" }, { @@ -4220,6 +4352,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "62cgsGOGxNzIlpkL44kdBk" }, { @@ -4321,6 +4457,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "d7rWMhBKJMtp2ZT7loWk5y" }, { @@ -4422,6 +4562,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "3bcr4gd61JqIyWXIARS7+b" }, { @@ -4523,6 +4667,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "754/WOVW1P45YO++WnLnkH" }, { @@ -4624,6 +4772,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "21OhT+BP1EJpiE2dmLWNxF" }, { @@ -4725,6 +4877,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "9dixEmZ9ZGXqCqOJI0XlTC" }, { @@ -4826,6 +4982,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 4, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "38+1Yn4l1GNKHy4Y66T/5L" }, { @@ -5025,6 +5185,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "efe2GuPtFHEYKmrzsZIu27" }, { @@ -5126,6 +5290,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "12FV4tk7pDkbq+92mkb1cX" }, { @@ -5227,6 +5395,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "3bopN0ZZ1DmJh7TRoywMPd" }, { @@ -5328,6 +5500,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "a4vp+AyYtNl5QGmz2xcd5a" }, { @@ -5429,6 +5605,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "b3qzD5ti5AMbwVe464iBl8" }, { @@ -5530,6 +5710,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "80QqzVum9BGp+dvsat91RR" }, { @@ -5631,6 +5815,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "01CKvnRrdJ6plEe5NzdCr8" }, { @@ -5732,6 +5920,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "5aBX6DUoFIn6w8Lay29YZ0" }, { @@ -5833,6 +6025,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "62hBI8p3tDa7ohH7lunB+d" }, { @@ -5934,6 +6130,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 5, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "acI8behNVHmI4lY/vdj3PV" }, { @@ -6133,6 +6333,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "53+Vywv9lMApcfWS4f6s/w" }, { @@ -6234,6 +6438,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 2, + "_rowMax": 6, + "_columnMax": 10, "_id": "67ewnQIntMKIW9i10L9DHZ" }, { @@ -6335,6 +6543,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 3, + "_rowMax": 6, + "_columnMax": 10, "_id": "b1C+B19cpHv7Qa/8goltiE" }, { @@ -6436,6 +6648,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 1, + "_rowMax": 6, + "_columnMax": 10, "_id": "81OQ7Fb2xB1ql6mI5Tmb5h" }, { @@ -6537,6 +6753,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 5, + "_rowMax": 6, + "_columnMax": 10, "_id": "42g9Ju3MNN3ZG2o0p4Blf6" }, { @@ -6638,6 +6858,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 6, + "_rowMax": 6, + "_columnMax": 10, "_id": "c7VrmRaehLVbDeACepi3Kv" }, { @@ -6739,6 +6963,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 7, + "_rowMax": 6, + "_columnMax": 10, "_id": "5fBxLH39VARaON2dMkTGVF" }, { @@ -6840,6 +7068,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 8, + "_rowMax": 6, + "_columnMax": 10, "_id": "aaTz0KqTBK1KVlMYy71H4g" }, { @@ -6941,6 +7173,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 9, + "_rowMax": 6, + "_columnMax": 10, "_id": "01cYlaHz1PeanJTuPrjMTT" }, { @@ -7042,6 +7278,10 @@ "__uuid__": "10336bef-42f1-4bfd-a795-1f29554ccdd8@f9941", "__expectedType__": "cc.SpriteFrame" }, + "_row": 6, + "_column": 10, + "_rowMax": 6, + "_columnMax": 10, "_id": "2bTnAwLABLl60Bl3oOgky0" }, { diff --git a/assets/scripts/puzzle/PuzzleSprite.ts b/assets/scripts/puzzle/PuzzleSprite.ts index 0e9710c..fc065bb 100644 --- a/assets/scripts/puzzle/PuzzleSprite.ts +++ b/assets/scripts/puzzle/PuzzleSprite.ts @@ -58,6 +58,7 @@ export class PuzzleSprite extends UIRenderer { } } + @property private _row =1 @property({type:CCInteger, step:1, min:1}) public get row(){return this._row} @@ -65,6 +66,7 @@ export class PuzzleSprite extends UIRenderer { this._updateUVs() } + @property private _column = 1 @property({type:CCInteger, step:1, min:1}) public get column(){return this._column} @@ -72,6 +74,7 @@ export class PuzzleSprite extends UIRenderer { this._updateUVs() } + @property private _rowMax = 4 @property({type:CCInteger, step:1, min:1}) public get rowMax(){return this._rowMax} @@ -79,6 +82,7 @@ export class PuzzleSprite extends UIRenderer { this._updateUVs() } + @property private _columnMax = 4 @property({type:CCInteger, step:1, min:1}) public get columnMax(){return this._columnMax} @@ -103,7 +107,6 @@ export class PuzzleSprite extends UIRenderer { } public onEnable () { - console.log("onEnable") super.onEnable(); // Force update uv, material define, active material, etc