private void UpdateHandsSortOrder() { int order = SortLayerManager.GetPlayerSortIndexStart(ESortLayer.Hands, CurrentSortOrder); handsUp.sortingOrder = order - 1; handsRight.sortingOrder = order; handsDown.sortingOrder = order; handsLeft.sortingOrder = order; }
private void UpdateWeaponSortOrder() { int order = SortLayerManager.GetPlayerSortIndexStart(ESortLayer.Weapon, CurrentSortOrder); //todo: merge into 1 sprite weaponUp.sortingOrder = order - 1; weaponRight.sortingOrder = order; weaponDown.sortingOrder = order; weaponLeft.sortingOrder = order; }
private void UpdatePlayerSortOrder() { int order = SortLayerManager.GetPlayerSortIndexStart(ESortLayer.Player, CurrentSortOrder); if (currentDirection == EDirection.Up) { order += 2; } spriteRend.sortingOrder = order; //Debug.Log("UpdatePlayerSortOrder " + order); }