Ejemplo n.º 1
0
 public override string SaveExtraText()
 {
     return(Helper.SaveDictionaryToString(new Dictionary <string, string>()
     {
         { "ShowLabels", ShowLabels.ToString() }
     }));
 }
Ejemplo n.º 2
0
        public override void Update(GameTime gameTime)
        {
            if (!GameState.IsPaused)
            {
                if (GameState.IsEnd)
                {
                    ShowLabels.ShowEndGame();
                    FirstSprite.HandleSpriteMovement(gameTime);
                    SecondSprite.HandleSpriteMovement(gameTime);
                    if (!GameState.IsEnd)
                    {
                        FirstSprite.Stop();
                        SecondSprite.Stop();
                    }
                }
                else
                {
                    ShowLabels.ShowWinner();
                    ShowLabels.ShowRound();
                    firstState  = FirstSprite.HandleSpriteMovement(gameTime);
                    secondState = SecondSprite.HandleSpriteMovement(gameTime);

                    if (firstState == PlayerState.Move || secondState == PlayerState.Move)
                    {
                        CollideDetector.RepairMoveCollision(FirstSprite, SecondSprite, width);
                    }
                    CollideDetector.HitCollision(FirstSprite, SecondSprite, gameTime);
                    FirstHealthBar.Update(FirstSprite.Information.Health);
                    SecondHealthBar.Update(SecondSprite.Information.Health);
                    WinnerDetector.DetectWinner(gameTime, FirstSprite, SecondSprite);
                }
                base.Update(gameTime);
            }
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Start != null)
         {
             hashCode = hashCode * 59 + Start.GetHashCode();
         }
         if (End != null)
         {
             hashCode = hashCode * 59 + End.GetHashCode();
         }
         if (Size != null)
         {
             hashCode = hashCode * 59 + Size.GetHashCode();
         }
         if (Coloring != null)
         {
             hashCode = hashCode * 59 + Coloring.GetHashCode();
         }
         if (ShowLines != null)
         {
             hashCode = hashCode * 59 + ShowLines.GetHashCode();
         }
         if (ShowLabels != null)
         {
             hashCode = hashCode * 59 + ShowLabels.GetHashCode();
         }
         if (LabelFont != null)
         {
             hashCode = hashCode * 59 + LabelFont.GetHashCode();
         }
         if (LabelFormat != null)
         {
             hashCode = hashCode * 59 + LabelFormat.GetHashCode();
         }
         if (Operation != null)
         {
             hashCode = hashCode * 59 + Operation.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override string SaveExtraText()
        {
            return(Helper.SaveDictionaryToString(new Dictionary <string, string>()
            {
                { nameof(ShowLabels), ShowLabels.ToString() },

                { nameof(IncludeNonExtractableCatalogues), IncludeNonExtractableCatalogues.ToString() },
                { nameof(IncludeDeprecatedCatalogues), IncludeDeprecatedCatalogues.ToString() },
                { nameof(IncludeInternalCatalogues), IncludeInternalCatalogues.ToString() },
                { nameof(IncludeColdStorageCatalogues), IncludeColdStorageCatalogues.ToString() },
                { nameof(IncludeProjectSpecificCatalogues), IncludeProjectSpecificCatalogues.ToString() },

                { nameof(IncludeNonExtractableCatalogueItems), IncludeNonExtractableCatalogueItems.ToString() },
                { nameof(IncludeInternalCatalogueItems), IncludeInternalCatalogueItems.ToString() },
                { nameof(IncludeDeprecatedCatalogueItems), IncludeDeprecatedCatalogueItems.ToString() },
            }));
        }
Ejemplo n.º 5
0
        public bool Equals([AllowNull] Contours other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Start == other.Start && Start != null && other.Start != null && Start.Equals(other.Start)) &&
                   (End == other.End && End != null && other.End != null && End.Equals(other.End)) &&
                   (Size == other.Size && Size != null && other.Size != null && Size.Equals(other.Size)) &&
                   (Coloring == other.Coloring && Coloring != null && other.Coloring != null && Coloring.Equals(other.Coloring)) &&
                   (ShowLines == other.ShowLines && ShowLines != null && other.ShowLines != null && ShowLines.Equals(other.ShowLines)) &&
                   (ShowLabels == other.ShowLabels && ShowLabels != null && other.ShowLabels != null && ShowLabels.Equals(other.ShowLabels)) &&
                   (LabelFont == other.LabelFont && LabelFont != null && other.LabelFont != null && LabelFont.Equals(other.LabelFont)) &&
                   (LabelFormat == other.LabelFormat && LabelFormat != null && other.LabelFormat != null && LabelFormat.Equals(other.LabelFormat)) &&
                   (Operation == other.Operation && Operation != null && other.Operation != null && Operation.Equals(other.Operation)) &&
                   (Value == other.Value && Value != null && other.Value != null && Value.Equals(other.Value)));
        }