From 444b5c6afb8e14620ea3bf4a96a60068999968f2 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 22 Nov 2021 19:25:18 +0100 Subject: [PATCH] copy base documentation for a lot of docfx unresolvable sources --- MLEM.Data/Content/RawContentManager.cs | 15 ++++++++--- MLEM.Data/DynamicEnum.cs | 3 ++- MLEM.Data/Json/Direction2Converter.cs | 17 ++++++++++--- MLEM.Data/Json/DynamicEnumConverter.cs | 17 ++++++++++--- MLEM.Data/Json/PointConverter.cs | 17 ++++++++++--- MLEM.Data/Json/RectangleConverter.cs | 17 ++++++++++--- MLEM.Data/Json/RectangleFConverter.cs | 17 ++++++++++--- MLEM.Data/Json/StaticJsonConverter.cs | 13 ++++++++-- MLEM.Data/Json/Vector2Converter.cs | 17 ++++++++++--- MLEM.Data/RuntimeTexturePacker.cs | 2 +- MLEM.Extended/Extensions/NumberExtensions.cs | 11 +++++++- .../Extensions/SpriteBatchExtensions.cs | 25 ++++++++++++++++--- MLEM.Extended/Tiled/LayerPosition.cs | 7 ++++-- MLEM/Extensions/SpriteBatchExtensions.cs | 24 +++++++++++++++--- MLEM/Extensions/TextureExtensions.cs | 2 +- MLEM/Input/GenericInput.cs | 10 +++++--- MLEM/Input/Keybind.cs | 5 +++- MLEM/Misc/Padding.cs | 7 ++++-- MLEM/Misc/RectangleF.cs | 9 ++++--- MLEM/Misc/SoundEffectInstanceHandler.cs | 4 +-- MLEM/Misc/StaticSpriteBatch.cs | 2 +- MLEM/Pathfinding/AStar.cs | 7 ++++-- MLEM/Sound/SoundEffectInstanceHandler.cs | 5 +++- 23 files changed, 203 insertions(+), 50 deletions(-) diff --git a/MLEM.Data/Content/RawContentManager.cs b/MLEM.Data/Content/RawContentManager.cs index 9c15956..6ccd28b 100644 --- a/MLEM.Data/Content/RawContentManager.cs +++ b/MLEM.Data/Content/RawContentManager.cs @@ -44,7 +44,12 @@ namespace MLEM.Data.Content { return this.Read(assetName, default); } - /// + /// + /// Reloads the asset of the given type, with the given original name. + /// + /// The original name of the asset. + /// The current asset instance. + /// The asset's type. protected override void ReloadAsset(string originalAssetName, T currentAsset) { this.Read(originalAssetName, currentAsset); } @@ -78,7 +83,9 @@ namespace MLEM.Data.Content { throw new ContentLoadException($"Asset {assetName} not found. Tried files {string.Join(", ", triedFiles)}"); } - /// + /// + /// Unloads this content manager, disposing all of the assets that it loaded. + /// public override void Unload() { foreach (var d in this.disposableAssets) d.Dispose(); @@ -86,7 +93,9 @@ namespace MLEM.Data.Content { base.Unload(); } - /// + /// + /// Initializes the component. Used to load non-graphical resources. + /// public void Initialize() { } diff --git a/MLEM.Data/DynamicEnum.cs b/MLEM.Data/DynamicEnum.cs index f8ad38f..e332881 100644 --- a/MLEM.Data/DynamicEnum.cs +++ b/MLEM.Data/DynamicEnum.cs @@ -82,7 +82,8 @@ namespace MLEM.Data { return ret; } - /// + /// Returns a string that represents the current object. + /// A string that represents the current object. public override string ToString() { if (this.name == null) { var included = new List(); diff --git a/MLEM.Data/Json/Direction2Converter.cs b/MLEM.Data/Json/Direction2Converter.cs index 1fbc8b9..b4faf6c 100644 --- a/MLEM.Data/Json/Direction2Converter.cs +++ b/MLEM.Data/Json/Direction2Converter.cs @@ -3,15 +3,26 @@ using MLEM.Misc; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class Direction2Converter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, Direction2 value, JsonSerializer serializer) { writer.WriteValue(value.ToString()); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override Direction2 ReadJson(JsonReader reader, Type objectType, Direction2 existingValue, bool hasExistingValue, JsonSerializer serializer) { Enum.TryParse(reader.Value.ToString(), out var dir); return dir; diff --git a/MLEM.Data/Json/DynamicEnumConverter.cs b/MLEM.Data/Json/DynamicEnumConverter.cs index 01f2d21..8da3c81 100644 --- a/MLEM.Data/Json/DynamicEnumConverter.cs +++ b/MLEM.Data/Json/DynamicEnumConverter.cs @@ -2,15 +2,26 @@ using System; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class DynamicEnumConverter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, DynamicEnum value, JsonSerializer serializer) { writer.WriteValue(value.ToString()); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override DynamicEnum ReadJson(JsonReader reader, Type objectType, DynamicEnum existingValue, bool hasExistingValue, JsonSerializer serializer) { return DynamicEnum.Parse(objectType, reader.Value.ToString()); } diff --git a/MLEM.Data/Json/PointConverter.cs b/MLEM.Data/Json/PointConverter.cs index d049793..69970dc 100644 --- a/MLEM.Data/Json/PointConverter.cs +++ b/MLEM.Data/Json/PointConverter.cs @@ -4,15 +4,26 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class PointConverter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, Point value, JsonSerializer serializer) { writer.WriteValue(value.X.ToString(CultureInfo.InvariantCulture) + " " + value.Y.ToString(CultureInfo.InvariantCulture)); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override Point ReadJson(JsonReader reader, Type objectType, Point existingValue, bool hasExistingValue, JsonSerializer serializer) { var value = reader.Value.ToString().Split(' '); return new Point(int.Parse(value[0], CultureInfo.InvariantCulture), int.Parse(value[1], CultureInfo.InvariantCulture)); diff --git a/MLEM.Data/Json/RectangleConverter.cs b/MLEM.Data/Json/RectangleConverter.cs index 41a6b2d..da3dddd 100644 --- a/MLEM.Data/Json/RectangleConverter.cs +++ b/MLEM.Data/Json/RectangleConverter.cs @@ -4,17 +4,28 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class RectangleConverter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, Rectangle value, JsonSerializer serializer) { writer.WriteValue( value.X.ToString(CultureInfo.InvariantCulture) + " " + value.Y.ToString(CultureInfo.InvariantCulture) + " " + value.Width.ToString(CultureInfo.InvariantCulture) + " " + value.Height.ToString(CultureInfo.InvariantCulture)); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override Rectangle ReadJson(JsonReader reader, Type objectType, Rectangle existingValue, bool hasExistingValue, JsonSerializer serializer) { var value = reader.Value.ToString().Split(' '); return new Rectangle( diff --git a/MLEM.Data/Json/RectangleFConverter.cs b/MLEM.Data/Json/RectangleFConverter.cs index dcf1116..9002482 100644 --- a/MLEM.Data/Json/RectangleFConverter.cs +++ b/MLEM.Data/Json/RectangleFConverter.cs @@ -4,17 +4,28 @@ using MLEM.Misc; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class RectangleFConverter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, RectangleF value, JsonSerializer serializer) { writer.WriteValue( value.X.ToString(CultureInfo.InvariantCulture) + " " + value.Y.ToString(CultureInfo.InvariantCulture) + " " + value.Width.ToString(CultureInfo.InvariantCulture) + " " + value.Height.ToString(CultureInfo.InvariantCulture)); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override RectangleF ReadJson(JsonReader reader, Type objectType, RectangleF existingValue, bool hasExistingValue, JsonSerializer serializer) { var value = reader.Value.ToString().Split(' '); return new RectangleF( diff --git a/MLEM.Data/Json/StaticJsonConverter.cs b/MLEM.Data/Json/StaticJsonConverter.cs index 2829d3e..2c7ba5c 100644 --- a/MLEM.Data/Json/StaticJsonConverter.cs +++ b/MLEM.Data/Json/StaticJsonConverter.cs @@ -33,14 +33,23 @@ namespace MLEM.Data.Json { this(GetEntries(type, memberName)) { } - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, T value, JsonSerializer serializer) { if (!this.inverse.TryGetValue(value, out var key)) throw new InvalidOperationException($"Cannot write {value} that is not a registered entry"); writer.WriteValue(key); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override T ReadJson(JsonReader reader, Type objectType, T existingValue, bool hasExistingValue, JsonSerializer serializer) { var val = reader.Value?.ToString(); if (val == null) diff --git a/MLEM.Data/Json/Vector2Converter.cs b/MLEM.Data/Json/Vector2Converter.cs index 1f5f00d..3dea869 100644 --- a/MLEM.Data/Json/Vector2Converter.cs +++ b/MLEM.Data/Json/Vector2Converter.cs @@ -4,15 +4,26 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json; namespace MLEM.Data.Json { - /// + /// + /// Converts a to and from JSON + /// public class Vector2Converter : JsonConverter { - /// + /// Writes the JSON representation of the object. + /// The to write to. + /// The value. + /// The calling serializer. public override void WriteJson(JsonWriter writer, Vector2 value, JsonSerializer serializer) { writer.WriteValue(value.X.ToString(CultureInfo.InvariantCulture) + " " + value.Y.ToString(CultureInfo.InvariantCulture)); } - /// + /// Reads the JSON representation of the object. + /// The to read from. + /// Type of the object. + /// The existing value of object being read. If there is no existing value then null will be used. + /// The existing value has a value. + /// The calling serializer. + /// The object value. public override Vector2 ReadJson(JsonReader reader, Type objectType, Vector2 existingValue, bool hasExistingValue, JsonSerializer serializer) { var value = reader.Value.ToString().Split(' '); return new Vector2(float.Parse(value[0], CultureInfo.InvariantCulture), float.Parse(value[1], CultureInfo.InvariantCulture)); diff --git a/MLEM.Data/RuntimeTexturePacker.cs b/MLEM.Data/RuntimeTexturePacker.cs index 440b628..a8fc79c 100644 --- a/MLEM.Data/RuntimeTexturePacker.cs +++ b/MLEM.Data/RuntimeTexturePacker.cs @@ -148,7 +148,7 @@ namespace MLEM.Data { this.LastPackTime = TimeSpan.Zero; } - /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. public void Dispose() { this.Reset(); } diff --git a/MLEM.Extended/Extensions/NumberExtensions.cs b/MLEM.Extended/Extensions/NumberExtensions.cs index b85f9a4..2ffa07a 100644 --- a/MLEM.Extended/Extensions/NumberExtensions.cs +++ b/MLEM.Extended/Extensions/NumberExtensions.cs @@ -26,7 +26,16 @@ namespace MLEM.Extended.Extensions { return new Misc.RectangleF(rect.X, rect.Y, rect.Width, rect.Height); } - /// + /// + /// Calculates the amount that the rectangle is penetrating the rectangle by. + /// If a penetration on both axes is occuring, the one with the lower value is returned. + /// This is useful for collision detection, as it can be used to push colliding objects out of each other. + /// + /// The rectangle to do the penetration + /// The rectangle that should be penetrated + /// The direction that the penetration occured in + /// The amount that the penetration occured by, in the direction of + /// Whether or not a penetration occured public static bool Penetrate(this RectangleF rect, RectangleF other, out Vector2 normal, out float penetration) { return rect.ToMlem().Penetrate(other.ToMlem(), out normal, out penetration); } diff --git a/MLEM.Extended/Extensions/SpriteBatchExtensions.cs b/MLEM.Extended/Extensions/SpriteBatchExtensions.cs index 4b9cbc6..c10cea9 100644 --- a/MLEM.Extended/Extensions/SpriteBatchExtensions.cs +++ b/MLEM.Extended/Extensions/SpriteBatchExtensions.cs @@ -9,17 +9,35 @@ namespace MLEM.Extended.Extensions { /// public static class SpriteBatchExtensions { - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// An optional region on the texture which will be rendered. If null - draws full texture. + /// A color mask. + /// A rotation of this sprite. + /// Center of the rotation. 0,0 by default. + /// Modificators for drawing. Can be combined. + /// A depth of the layer of this sprite. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth) { batch.Draw(texture, destinationRectangle.ToMlem(), sourceRectangle, color, rotation, origin, effects, layerDepth); } - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// An optional region on the texture which will be rendered. If null - draws full texture. + /// A color mask. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Rectangle? sourceRectangle, Color color) { batch.Draw(texture, destinationRectangle, sourceRectangle, color, 0, Vector2.Zero, SpriteEffects.None, 0); } - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// A color mask. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Color color) { batch.Draw(texture, destinationRectangle, null, color); } @@ -38,6 +56,7 @@ namespace MLEM.Extended.Extensions { for (var x = 0; x < tileCount.X; x++) batch.DrawRectangle(start + new Vector2(x, y) * tileSize, tileSize, gridColor, gridThickness / 2); } + var size = tileSize * tileCount.ToVector2() + new Vector2(gridThickness); batch.DrawRectangle(start - new Vector2(gridThickness / 2), size, gridColor, gridThickness / 2); } diff --git a/MLEM.Extended/Tiled/LayerPosition.cs b/MLEM.Extended/Tiled/LayerPosition.cs index c25c1b7..1133d0b 100644 --- a/MLEM.Extended/Tiled/LayerPosition.cs +++ b/MLEM.Extended/Tiled/LayerPosition.cs @@ -51,12 +51,15 @@ namespace MLEM.Extended.Tiled { return this.Layer == other.Layer && this.X == other.X && this.Y == other.Y; } - /// + /// Indicates whether this instance and a specified object are equal. + /// The object to compare with the current instance. + /// true if obj and this instance are the same type and represent the same value; otherwise, false. public override bool Equals(object obj) { return obj is LayerPosition other && this.Equals(other); } - /// + /// Returns the hash code for this instance. + /// A 32-bit signed integer that is the hash code for this instance. public override int GetHashCode() { var hashCode = this.Layer.GetHashCode(); hashCode = (hashCode * 397) ^ this.X; diff --git a/MLEM/Extensions/SpriteBatchExtensions.cs b/MLEM/Extensions/SpriteBatchExtensions.cs index aa9223e..0769397 100644 --- a/MLEM/Extensions/SpriteBatchExtensions.cs +++ b/MLEM/Extensions/SpriteBatchExtensions.cs @@ -110,19 +110,37 @@ namespace MLEM.Extensions { return tex; } - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// An optional region on the texture which will be rendered. If null - draws full texture. + /// A color mask. + /// A rotation of this sprite. + /// Center of the rotation. 0,0 by default. + /// Modificators for drawing. Can be combined. + /// A depth of the layer of this sprite. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth) { var source = sourceRectangle ?? new Rectangle(0, 0, texture.Width, texture.Height); var scale = new Vector2(1F / source.Width, 1F / source.Height) * destinationRectangle.Size; batch.Draw(texture, destinationRectangle.Location, sourceRectangle, color, rotation, origin, scale, effects, layerDepth); } - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// An optional region on the texture which will be rendered. If null - draws full texture. + /// A color mask. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Rectangle? sourceRectangle, Color color) { batch.Draw(texture, destinationRectangle, sourceRectangle, color, 0, Vector2.Zero, SpriteEffects.None, 0); } - /// + /// Submit a sprite for drawing in the current batch. + /// The sprite batch to draw with. + /// A texture. + /// The drawing bounds on screen. + /// A color mask. public static void Draw(this SpriteBatch batch, Texture2D texture, RectangleF destinationRectangle, Color color) { batch.Draw(texture, destinationRectangle, null, color); } diff --git a/MLEM/Extensions/TextureExtensions.cs b/MLEM/Extensions/TextureExtensions.cs index 541f667..016c3ef 100644 --- a/MLEM/Extensions/TextureExtensions.cs +++ b/MLEM/Extensions/TextureExtensions.cs @@ -104,7 +104,7 @@ namespace MLEM.Extensions { return x >= 0 && y >= 0 && x < this.texture.Width && y < this.texture.Height; } - /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. public void Dispose() { this.Store(); } diff --git a/MLEM/Input/GenericInput.cs b/MLEM/Input/GenericInput.cs index f53da33..3d3584e 100644 --- a/MLEM/Input/GenericInput.cs +++ b/MLEM/Input/GenericInput.cs @@ -25,7 +25,8 @@ namespace MLEM.Input { this.value = value; } - /// + /// Returns this generic input, converted to a string. + /// This generic input, converted to a string. public override string ToString() { switch (this.Type) { case InputType.Mouse: @@ -39,12 +40,15 @@ namespace MLEM.Input { } } - /// + /// Indicates whether this instance and a specified object are equal. + /// The object to compare with the current instance. + /// if and this instance are the same type and represent the same value; otherwise, . public override bool Equals(object obj) { return obj is GenericInput o && this.Type == o.Type && this.value == o.value; } - /// + /// Returns the hash code for this instance. + /// A 32-bit signed integer that is the hash code for this instance. public override int GetHashCode() { return ((int) this.Type * 397) ^ this.value; } diff --git a/MLEM/Input/Keybind.cs b/MLEM/Input/Keybind.cs index d1a61e9..a18f50c 100644 --- a/MLEM/Input/Keybind.cs +++ b/MLEM/Input/Keybind.cs @@ -147,7 +147,10 @@ namespace MLEM.Input { return string.Join(joiner, this.combinations.Select(c => c.ToString(combinationJoiner, inputName))); } - /// + /// + /// Converts this keybind into a string, separating every included by a comma + /// + /// This keybind as a string public override string ToString() { return this.ToString(", "); } diff --git a/MLEM/Misc/Padding.cs b/MLEM/Misc/Padding.cs index 3d8a09c..e8185e0 100644 --- a/MLEM/Misc/Padding.cs +++ b/MLEM/Misc/Padding.cs @@ -129,12 +129,15 @@ namespace MLEM.Misc { return this.Left.Equals(other.Left) && this.Right.Equals(other.Right) && this.Top.Equals(other.Top) && this.Bottom.Equals(other.Bottom); } - /// + /// Indicates whether this instance and a specified object are equal. + /// The object to compare with the current instance. + /// if and this instance are the same type and represent the same value; otherwise, . public override bool Equals(object obj) { return obj is Padding other && this.Equals(other); } - /// + /// Returns the hash code for this instance. + /// A 32-bit signed integer that is the hash code for this instance. public override int GetHashCode() { var hashCode = this.Left.GetHashCode(); hashCode = (hashCode * 397) ^ this.Right.GetHashCode(); diff --git a/MLEM/Misc/RectangleF.cs b/MLEM/Misc/RectangleF.cs index 5a34ffe..6459b9d 100644 --- a/MLEM/Misc/RectangleF.cs +++ b/MLEM/Misc/RectangleF.cs @@ -163,17 +163,20 @@ namespace MLEM.Misc { return this.X <= value.X && value.X + value.Width <= this.X + this.Width && this.Y <= value.Y && value.Y + value.Height <= this.Y + this.Height; } - /// + /// Indicates whether this instance and a specified object are equal. + /// The object to compare with the current instance. + /// if and this instance are the same type and represent the same value; otherwise, . public override bool Equals(object obj) { return obj is RectangleF f && this == f; } - /// + /// public bool Equals(RectangleF other) { return this == other; } - /// + /// Returns the hash code for this instance. + /// A 32-bit signed integer that is the hash code for this instance. public override int GetHashCode() { return (((17 * 23 + this.X.GetHashCode()) * 23 + this.Y.GetHashCode()) * 23 + this.Width.GetHashCode()) * 23 + this.Height.GetHashCode(); } diff --git a/MLEM/Misc/SoundEffectInstanceHandler.cs b/MLEM/Misc/SoundEffectInstanceHandler.cs index 2c48a4c..3a094b1 100644 --- a/MLEM/Misc/SoundEffectInstanceHandler.cs +++ b/MLEM/Misc/SoundEffectInstanceHandler.cs @@ -2,11 +2,11 @@ using System; using Microsoft.Xna.Framework; namespace MLEM.Misc { - /// + /// [Obsolete("This class has been moved to MLEM.Sound.SoundEffectInstanceHandler in 5.1.0")] public class SoundEffectInstanceHandler : Sound.SoundEffectInstanceHandler { - /// + /// public SoundEffectInstanceHandler(Game game) : base(game) { } diff --git a/MLEM/Misc/StaticSpriteBatch.cs b/MLEM/Misc/StaticSpriteBatch.cs index 0f12ccf..0e9392d 100644 --- a/MLEM/Misc/StaticSpriteBatch.cs +++ b/MLEM/Misc/StaticSpriteBatch.cs @@ -356,7 +356,7 @@ namespace MLEM.Misc { this.batchChanged = true; } - /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. public void Dispose() { this.spriteEffect.Dispose(); this.indices?.Dispose(); diff --git a/MLEM/Pathfinding/AStar.cs b/MLEM/Pathfinding/AStar.cs index 6f1746d..d435672 100644 --- a/MLEM/Pathfinding/AStar.cs +++ b/MLEM/Pathfinding/AStar.cs @@ -214,14 +214,17 @@ namespace MLEM.Pathfinding { this.F = this.G + distance * defaultCost; } - /// + /// Indicates whether this instance and a specified object are equal. + /// The object to compare with the current instance. + /// if and this instance are the same type and represent the same value; otherwise, . public override bool Equals(object obj) { if (obj == this) return true; return obj is PathPoint point && point.Pos.Equals(this.Pos); } - /// + /// Returns the hash code for this instance. + /// A 32-bit signed integer that is the hash code for this instance. public override int GetHashCode() { return this.Pos.GetHashCode(); } diff --git a/MLEM/Sound/SoundEffectInstanceHandler.cs b/MLEM/Sound/SoundEffectInstanceHandler.cs index 2e77d58..790f481 100644 --- a/MLEM/Sound/SoundEffectInstanceHandler.cs +++ b/MLEM/Sound/SoundEffectInstanceHandler.cs @@ -109,11 +109,14 @@ namespace MLEM.Sound { return this.Add(effect.CreateInstance(), onStopped, emitter); } - /// + /// Returns an enumerator that iterates through the collection. + /// An enumerator that can be used to iterate through the collection. public IEnumerator GetEnumerator() { return this.playingSounds.GetEnumerator(); } + /// Returns an enumerator that iterates through a collection. + /// An object that can be used to iterate through the collection. IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); }