mirror of
https://gitee.com/ruanwujing/green-pack-cocos
synced 2025-10-09 08:36:33 +00:00
修改拼图相关参数为property,使其序列化
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user