拼图测试场景
This commit is contained in:
22
Assets/Gameplay/Scripts/Level02/PuzzlePiece.cs
Normal file
22
Assets/Gameplay/Scripts/Level02/PuzzlePiece.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
// PuzzlePiece.cs
|
||||
using UnityEngine;
|
||||
|
||||
public class PuzzlePiece : MonoBehaviour
|
||||
{
|
||||
[HideInInspector] public int correctRow; // 正确位置的行
|
||||
[HideInInspector] public int correctCol; // 正确位置的列
|
||||
[HideInInspector] public int currentRow; // 当前位置的行
|
||||
[HideInInspector] public int currentCol; // 当前位置的列
|
||||
[HideInInspector] public bool isEmpty; // 是否是空白块
|
||||
|
||||
private PuzzleManager puzzleManager;
|
||||
|
||||
public void Initialize(PuzzleManager manager, int row, int col)
|
||||
{
|
||||
puzzleManager = manager;
|
||||
correctRow = row;
|
||||
correctCol = col;
|
||||
currentRow = row;
|
||||
currentCol = col;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user