1
Fork 0
mirror of https://github.com/Steffo99/octogem.git synced 2024-11-22 21:14:19 +00:00
octogem/Assets/Scripts/Components/Position/GemPosition.cs

26 lines
689 B
C#
Raw Normal View History

2018-09-26 22:38:49 +00:00
using UnityEngine;
public class GemPosition : GenericPosition
{
public override MapPosition Position
{
get
{
return Position;
}
set
{
if (Debug.isDebugBuild)
{
//Check if the tile is in the expected position
Vector3 expectedPosition = new Vector3(Position.x + 0.5f, Position.y + 0.5f);
if (transform.position != expectedPosition)
{
Debug.LogWarningFormat("{0}'s GemPosition is mismatched with its transform position.", gameObject.name);
}
}
Position = value;
}
}
}