public ChessBoard(TextureManager textureManager, MoveChessManager moveChessManager) { _moveChessManager = moveChessManager; //_moveChessTexture = textureManager.Get("moveChess"); _moveChess_R_CAR_Texture = textureManager.Get("moveChessR_CAR"); moveChessR_CAR1 = new MoveChess(_moveChess_R_CAR_Texture); moveChessR_CAR2 = new MoveChess(_moveChess_R_CAR_Texture); _moveChess_R_HORSE_Texture = textureManager.Get("moveChessR_HORSE"); moveChessR_HORSE1 = new MoveChess(_moveChess_R_HORSE_Texture); moveChessR_HORSE2 = new MoveChess(_moveChess_R_HORSE_Texture); _moveChess_R_CANON_Texture = textureManager.Get("moveChessR_CANON"); moveChessR_CANON1 = new MoveChess(_moveChess_R_CANON_Texture); moveChessR_CANON2 = new MoveChess(_moveChess_R_CANON_Texture); _moveChess_R_ELEPHANT_Texture = textureManager.Get("moveChessR_ELEPHANT"); moveChessR_ELEPHANT1 = new MoveChess(_moveChess_R_ELEPHANT_Texture); moveChessR_ELEPHANT2 = new MoveChess(_moveChess_R_ELEPHANT_Texture); _moveChess_R_BISHOP_Texture = textureManager.Get("moveChessR_BISHOP"); moveChessR_BISHOP1 = new MoveChess(_moveChess_R_BISHOP_Texture); moveChessR_BISHOP2 = new MoveChess(_moveChess_R_BISHOP_Texture); _moveChess_R_KING_Texture = textureManager.Get("moveChessR_KING"); moveChessR_KING = new MoveChess(_moveChess_R_KING_Texture); _moveChess_R_PAWN_Texture = textureManager.Get("moveChessR_PAWN"); moveChessR_PAWN1 = new MoveChess(_moveChess_R_PAWN_Texture); moveChessR_PAWN2 = new MoveChess(_moveChess_R_PAWN_Texture); moveChessR_PAWN3 = new MoveChess(_moveChess_R_PAWN_Texture); moveChessR_PAWN4 = new MoveChess(_moveChess_R_PAWN_Texture); moveChessR_PAWN5 = new MoveChess(_moveChess_R_PAWN_Texture); _moveChess_B_CAR_Texture = textureManager.Get("moveChessB_CAR"); moveChessB_CAR1 = new MoveChess(_moveChess_B_CAR_Texture); moveChessB_CAR2 = new MoveChess(_moveChess_B_CAR_Texture); _moveChess_B_HORSE_Texture = textureManager.Get("moveChessB_HORSE"); moveChessB_HORSE1 = new MoveChess(_moveChess_B_HORSE_Texture); moveChessB_HORSE2 = new MoveChess(_moveChess_B_HORSE_Texture); _moveChess_B_CANON_Texture = textureManager.Get("moveChessB_CANON"); moveChessB_CANON1 = new MoveChess(_moveChess_B_CANON_Texture); moveChessB_CANON2 = new MoveChess(_moveChess_B_CANON_Texture); _moveChess_B_ELEPHANT_Texture = textureManager.Get("moveChessB_ELEPHANT"); moveChessB_ELEPHANT1 = new MoveChess(_moveChess_B_ELEPHANT_Texture); moveChessB_ELEPHANT2 = new MoveChess(_moveChess_B_ELEPHANT_Texture); _moveChess_B_BISHOP_Texture = textureManager.Get("moveChessB_BISHOP"); moveChessB_BISHOP1 = new MoveChess(_moveChess_B_BISHOP_Texture); moveChessB_BISHOP2 = new MoveChess(_moveChess_B_BISHOP_Texture); _moveChess_B_KING_Texture = textureManager.Get("moveChessB_KING"); moveChessB_KING = new MoveChess(_moveChess_B_KING_Texture); _moveChess_B_PAWN_Texture = textureManager.Get("moveChessB_PAWN"); moveChessB_PAWN1 = new MoveChess(_moveChess_B_PAWN_Texture); moveChessB_PAWN2 = new MoveChess(_moveChess_B_PAWN_Texture); moveChessB_PAWN3 = new MoveChess(_moveChess_B_PAWN_Texture); moveChessB_PAWN3 = new MoveChess(_moveChess_B_PAWN_Texture); moveChessB_PAWN4 = new MoveChess(_moveChess_B_PAWN_Texture); moveChessB_PAWN5 = new MoveChess(_moveChess_B_PAWN_Texture); _sprite.Texture = textureManager.Get("chessboard"); _sprite.SetMatrixScale(1, 1); //飞船图标太大,缩小它 }
public void Fire() { if (_fireRecoveryTime > 0) { return; } else { _fireRecoveryTime = FireRecovery; } MoveChess moveChess = new MoveChess(_moveChessTexture); //bullet.SetColor(new Color(0, 1, 0, 1)); moveChess.SetPosition(_sprite.GetPosition() + _gunOffset); //_moveChessManager.Shoot(moveChess); }
//public void Shoot(MoveChess moveChess) //{ // _moveChesses.Add(moveChess); //} public void InitializeChessman(MoveChess moveChess) { _moveChesses.Add(moveChess); }