This file contains hidden or 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.Reflection; | |
using UnityEngine; | |
using UnityEngine.Events; | |
#if UNITY_EDITOR | |
using UnityEditor.Events; | |
#endif | |
[Serializable] |
This file contains hidden or 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
namespace Match3 { | |
public class GridObject<T> { | |
GridSystem2D<GridObject<T>> grid; | |
int x; | |
int y; | |
T gem; | |
public GridObject(GridSystem2D<GridObject<T>> grid, int x, int y) { | |
this.grid = grid; | |
this.x = x; |
This file contains hidden or 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 UnityEngine; | |
using TMPro; | |
/// <summary> | |
/// A generic 2D grid implementation that can be used in both 2D and 3D. | |
/// The grid stores values of a specified type and provides methods for accessing and modifying | |
/// these values based on grid coordinates or world coordinates. The grid can be displayed | |
/// either vertically (X-Y plane) or horizontally (X-Z plane) using a CoordinateConverter. | |
/// </summary> |
This file contains hidden or 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.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Toggles the Inspector lock state and the Constrain Proportions lock state. | |
/// </summary> | |
public static class LockInspector { | |
static readonly MethodInfo flipLocked; | |
static readonly PropertyInfo constrainProportions; |
NewerOlder