Skip to content

Commit

Permalink
Enhance deck editor layout
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Nov 26, 2017
1 parent 7df8ae6 commit 9745c2f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
30 changes: 15 additions & 15 deletions Assets/Scenes/DeckEditor.unity
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ Prefab:
- target: {fileID: 224252938770132402, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.x
value: -81.55502
value: -59.06015
objectReference: {fileID: 0}
- target: {fileID: 224673017872509486, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
Expand All @@ -508,17 +508,17 @@ Prefab:
- target: {fileID: 224673017872509486, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
value: -76.19174
objectReference: {fileID: 0}
- target: {fileID: 224673017872509486, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.x
value: 522
value: 502.55273
objectReference: {fileID: 0}
- target: {fileID: 224673017872509486, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
value: 152.38348
objectReference: {fileID: 0}
- target: {fileID: 224174961411463182, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
Expand All @@ -533,22 +533,22 @@ Prefab:
- target: {fileID: 224174961411463182, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 522
value: 502.55273
objectReference: {fileID: 0}
- target: {fileID: 224174961411463182, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
value: -76.19174
objectReference: {fileID: 0}
- target: {fileID: 224174961411463182, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.x
value: 522
value: 502.55273
objectReference: {fileID: 0}
- target: {fileID: 224174961411463182, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
value: 152.38348
objectReference: {fileID: 0}
- target: {fileID: 224677791729663838, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
Expand All @@ -563,32 +563,32 @@ Prefab:
- target: {fileID: 224677791729663838, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 1044
value: 1005.10547
objectReference: {fileID: 0}
- target: {fileID: 224677791729663838, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
value: -76.19174
objectReference: {fileID: 0}
- target: {fileID: 224677791729663838, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.x
value: 492
value: 472.55273
objectReference: {fileID: 0}
- target: {fileID: 224677791729663838, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
value: 152.38348
objectReference: {fileID: 0}
- target: {fileID: 224143448842205196, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
value: -262.18887
objectReference: {fileID: 0}
- target: {fileID: 224560339167716316, guid: 09ee4d14818c1ba47b96c322e8a36f1d,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
value: -152.38348
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 09ee4d14818c1ba47b96c322e8a36f1d, type: 2}
Expand Down Expand Up @@ -1034,7 +1034,7 @@ RectTransform:
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -750, y: 367.5}
m_SizeDelta: {x: 200, y: 100}
m_SizeDelta: {x: 150, y: 100}
m_Pivot: {x: 1, y: 0}
--- !u!114 &211486272
MonoBehaviour:
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/CardGameCore/CardGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ public IEnumerator GetAndSetImageSprite(Card card)
else
newSprite = CardGameManager.Current.CardBackImageSprite;

foreach (CardModel cardModel in CardModels[card.Id])
cardModel.GetComponent<Image>().sprite = newSprite;
if (CardModels.ContainsKey(card.Id))
foreach (CardModel cardModel in CardModels[card.Id])
cardModel.GetComponent<Image>().sprite = newSprite;
Cards [card.Id].IsLoadingImage = false;
}

Expand Down
Binary file modified Assets/Scripts/DeckEditor/DeckEditorLayout.cs
Binary file not shown.

0 comments on commit 9745c2f

Please sign in to comment.