This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EmbedBuilderExtensions | |
{ | |
public static EmbedBuilder AddProgressBar( | |
this EmbedBuilder embedBuilder, | |
string title, | |
float value, | |
float min, | |
float max, | |
bool inline = false, | |
string filledEmoji = ":green_square:", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ExtensionMethods | |
{ | |
public static Vector2 CopyWith(this Vector2 vector, float? x = null, float? y = null) | |
{ | |
return new Vector2(x ?? vector.x, y ?? vector.y); | |
} | |
public static Vector3 CopyWith(this Vector3 vector, float? x = null, float? y = null, float? z = null) | |
{ | |
return new Vector3(x ?? vector.x, y ?? vector.y, z ?? vector.z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public enum ToggleType | |
{ | |
Vertical, | |
Horizontal | |
} | |
public class UIPanelToggler: MonoBehaviour | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class GameEventMessageBus | |
{ | |
private static Dictionary<Type, List<Action<object>>> _subscriberDict = new Dictionary<Type, List<Action<object>>>(); | |
public static void Subscribe<T>(Action<T> handler) | |
{ | |
var type = typeof(T); |