private void SpawnSkill(ChessData chessData, int count) { ChessTypeEnum chessTypeEnum = ChessTypeEnum.None; if (count >= 7) { //同色消除 chessTypeEnum = ChessTypeEnum.Color; } else if (count >= 5) { chessData.ChessColorTypeEnum = ChessColorTypeEnum.None; //行消除或列消除 if (Random.Range(0, 2) == 0) { chessTypeEnum = ChessTypeEnum.Column; } else { chessTypeEnum = ChessTypeEnum.Line; } } else if (count >= 3) { chessData.ChessColorTypeEnum = ChessColorTypeEnum.None; chessTypeEnum = ChessTypeEnum.Nine; //三宫格消除 } chessData.ChessTypeEnum = chessTypeEnum; Chess chess = SpawnSkillChess(chessData); chess.transform.position = new Vector3(chessData.XPos + GameConfig.Xlen, chessData.YPos + GameConfig.Ylen, 0); }
public Sprite GetChessSpriteAtChessType(ChessTypeEnum chessTypeEnum) { return(chessTypeSpriteList[(int)chessTypeEnum]); }