예제 #1
0
    private void GetPlayerPosition()
    {
        var rect = playerImage.GetComponent <RectTransform>();

        var playerPosition = DungeonData.PlayerPosition;
        var position       = DungeonData.ConvertToMapCoord(playerPosition);

        //Debug.Log(string.Format("Player ({2}, {3}) to Map ({0}, {1})", position.x, position.y, playerPosition.x, playerPosition.z));

        position.x = 50.0f + (position.x - 4.0f) * 100.0f;
        position.y = 50.0f + (position.y - 4.0f) * 100.0f;

        rect.anchoredPosition = position;
    }