mirror of
https://github.com/Steffo99/octogem.git
synced 2024-11-22 04:54:18 +00:00
26 lines
No EOL
689 B
C#
26 lines
No EOL
689 B
C#
using UnityEngine;
|
|
|
|
public class GemPosition : GenericPosition
|
|
{
|
|
public override MapPosition Position
|
|
{
|
|
get
|
|
{
|
|
return position;
|
|
}
|
|
|
|
set
|
|
{
|
|
position = value;
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |