/// <inheritdoc /> public bool Equals([AllowNull] Tiling other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Packing == other.Packing || Packing != null && Packing.Equals(other.Packing) ) && ( SquarifyRatio == other.SquarifyRatio || SquarifyRatio != null && SquarifyRatio.Equals(other.SquarifyRatio) ) && ( Flip == other.Flip || Flip != null && Flip.Equals(other.Flip) ) && ( Pad == other.Pad || Pad != null && Pad.Equals(other.Pad) )); }
public void AddCheckFlipName(Flip flip) { if (string.IsNullOrWhiteSpace(flip.FlipName)) { Debug.LogError("翻牌名称为空,请检查翻牌设置"); return; } if (LastFlip == null) { LastFlip = flip; } else { if (LastFlip.Equals(flip)) { return; } } if (string.IsNullOrWhiteSpace(NowFlipName)) { NowFlipName = flip.FlipName; return; } if (NowFlipName == flip.FlipName) { FinishFlip(flip.FlipName); } else { NowFlipName = string.Empty; LastFlip = null; } }