public void Spawn(Vector2Int location, Game2048ChessType chessType) { if (chessboardDic.ContainsKey(location) == false) { Debug.LogError("生成位置错误location : " + location.ToString()); return; } if (chessboardDic[location] != null) { Debug.LogError("生成位置错误 该位置有棋子location : " + location.ToString()); return; } Debug.Log("生成位置:" + location.ToString()); Debug.Log("生成值:" + ((int)chessType).ToString()); Game2048Chess chess = pool.Get <Game2048Chess>(); chess.Init(Game2048ChessType.Number_2); chessboardDic[location] = chess; RefreshPosition(); Debug.Log("棋盘状态"); Debug.Log(chessboardDic.GetString()); }
public void Init(Game2048ChessType value) { this.value = value; text.text = ((int)value).ToString(); iTween.ScaleFrom(gameObject, new Vector3(0.2f, 0.2f, 1f), 0.4f); }
public void Movie(Game2048ChessType value) { this.value = value; }
public Game2048ChessData() { value = Game2048ChessType.Number_2; }
public void Merge() { isMerge = true; value = (Game2048ChessType)((int)value * 2); }
public Game2048ChessData(int value) { this.value = (Game2048ChessType)value; }