New card UI, new visual config, new card definitions, new working editor window for authoring!
This commit is contained in:
@@ -14,79 +14,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
|
||||
m_GroupName: BlokkemonCards
|
||||
m_GUID: 0d5d36d6da388314b92b9c6967d23f39
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 1fe09914d65c6d2429e917359ed54122
|
||||
m_Address: Assets/Data/Cards/Card_HR PimpSten (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 20ad613524eea614aacfc7d87629dfdc
|
||||
m_Address: Assets/Data/Cards/Card_Brosten (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2c9a605210e7f1b48bc66baef17f18cf
|
||||
m_Address: Assets/Data/Cards/Card_Brosten (Copy) (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3e507a1198083f747bf8f14f1dfc9daa
|
||||
m_Address: Assets/Data/Cards/Card_Mormor Marmor (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3f4654d849af5ef4d81e0bccacfe03e8
|
||||
m_Address: Assets/Data/Cards/Card_Mormor Marmor (Copy) (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 42b258acaccec1c4c8a271b34f5c0ba9
|
||||
m_Address: Assets/Data/Cards/Card_HR PimpSten (Copy) (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4b9c8b6ca63744a44acfe49ebe337619
|
||||
m_Address: Assets/Data/Cards/Card_New Card 2.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 91031de62f795884e8e2ccbaebeebf9b
|
||||
m_Address: Assets/Data/Cards/Card_New Card.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 935dc5e5a05e0d443b263cceb57df300
|
||||
m_Address: Assets/Data/Cards/Card_New Card 4.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b7c519c4abc0edf4897168c699d9f250
|
||||
m_Address: Assets/Data/Cards/Card_HRKvarts (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ba36d0f7b72437d46aef231a1ed79110
|
||||
m_Address: Assets/Data/Cards/Card_New Card 3.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: e1af518c607db864498329308e3dcc76
|
||||
m_Address: Assets/Data/Cards/Card_HRKvarts (Copy) (Copy).asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- BlokkemonCard
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_SerializeEntries: []
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 11da9bb90d9dd5848b4f7629415a6937, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
@@ -12,26 +12,35 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a82f88f485b4410e9eb7c383b44557cf, type: 3}
|
||||
m_Name: CardVisualConfig
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardVisualConfig
|
||||
rarityColors:
|
||||
rarityVisuals:
|
||||
- rarity: 0
|
||||
color: {r: 0.9528302, g: 0.5321085, b: 0.30113026, a: 1}
|
||||
frame: {fileID: 2785675867010258551, guid: 58e298cfaf730814a8316c0596cbf0a0, type: 3}
|
||||
overlay: {fileID: 0}
|
||||
- rarity: 1
|
||||
frame: {fileID: 3608157947740397923, guid: 51617678a03e65c40a1306cdeb33d30c, type: 3}
|
||||
overlay: {fileID: 6144362121687729781, guid: b72b269b732c69a4ebd3fa1564e338ba, type: 3}
|
||||
- rarity: 2
|
||||
color: {r: 0.735849, g: 0.735849, b: 0.735849, a: 1}
|
||||
- rarity: 4
|
||||
color: {r: 1, g: 0.85694367, b: 0.0039215684, a: 1}
|
||||
frame: {fileID: -1693298060938455423, guid: 98e781256598a844c955f322a651807e, type: 3}
|
||||
overlay: {fileID: -3770539431085108897, guid: 5896d629ac597cd49b8f03037f0dbcb2, type: 3}
|
||||
zoneVisuals:
|
||||
- zone: 0
|
||||
color: {r: 0.9150943, g: 0.41006586, b: 0.65010196, a: 1}
|
||||
backgroundShape: {fileID: 8542402908941169558, guid: 84a9632f9bdc1ee4bab91cf4b764b5f7, type: 3}
|
||||
- zone: 3
|
||||
color: {r: 0.49056602, g: 0.3064167, b: 0.22908506, a: 1}
|
||||
backgroundShape: {fileID: -1529071355430692878, guid: 84a9632f9bdc1ee4bab91cf4b764b5f7, type: 3}
|
||||
- zone: 2
|
||||
color: {r: 0.5695372, g: 0.8867924, b: 0.45594516, a: 1}
|
||||
backgroundShape: {fileID: 1152548570994208632, guid: 84a9632f9bdc1ee4bab91cf4b764b5f7, type: 3}
|
||||
background: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
shapeNormal: {fileID: -555031247, guid: bc13c4091da05074ba208ec060326153, type: 3}
|
||||
shapeRare: {fileID: -7781690445634620112, guid: 2049b6df7b55c9d43a65125944ed7c01, type: 3}
|
||||
- zone: 1
|
||||
color: {r: 0.36561054, g: 0.59123904, b: 0.9811321, a: 1}
|
||||
backgroundShape: {fileID: 8542402908941169558, guid: 84a9632f9bdc1ee4bab91cf4b764b5f7, type: 3}
|
||||
background: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
shapeNormal: {fileID: -885559016, guid: a58017e7b840e654babc7465a400dc79, type: 3}
|
||||
shapeRare: {fileID: -4123633659264056548, guid: f0acfac6598fd754d9cebe517674fc93, type: 3}
|
||||
- zone: 2
|
||||
background: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
shapeNormal: {fileID: 412684597, guid: aa0c0c32fd1585a438555ffc5cde2a90, type: 3}
|
||||
shapeRare: {fileID: 4758665976143856727, guid: cef2ffe5a4f771e488c8255a643396a1, type: 3}
|
||||
- zone: 3
|
||||
background: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
shapeNormal: {fileID: -1617033473, guid: 91b8773f57580aa4587f68b5855d2bec, type: 3}
|
||||
shapeRare: {fileID: 7781173432231136668, guid: b178c902d0ba24e41b157bea5d138997, type: 3}
|
||||
- zone: 4
|
||||
color: {r: 0.5943396, g: 0.5943396, b: 0.58592916, a: 1}
|
||||
backgroundShape: {fileID: -1529071355430692878, guid: 84a9632f9bdc1ee4bab91cf4b764b5f7, type: 3}
|
||||
background: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
shapeNormal: {fileID: 545085061, guid: 0f156ba9342239c46aed04d6d76f63df, type: 3}
|
||||
shapeRare: {fileID: -3226689649940064328, guid: 31176c1dad1528648b981c3f381538e6, type: 3}
|
||||
legendaryBackground: {fileID: -2642905903075119301, guid: c293405722d536c4889a97d72085fece, type: 3}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c9a605210e7f1b48bc66baef17f18cf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_Brosten (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: c04b7d9c-bb6b-470c-a97c-fcf3d06c0172
|
||||
Name: Brosten
|
||||
Description: Description goes here
|
||||
Rarity: 2
|
||||
Zone: 1
|
||||
CardImage: {fileID: -6028342126936659889, guid: 88427f554aebb2a49a9bc9705bb0f7bf, type: 3}
|
||||
CollectionIndex: 8
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20ad613524eea614aacfc7d87629dfdc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,12 +10,14 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_Brosten (Copy) (Copy)
|
||||
m_Name: Card_Brosten
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 28b4b8b5-667c-49d0-9c4d-d9d513e9e689
|
||||
Id: dc253a1d-23db-4610-b05f-d5a4bffeda77
|
||||
Name: Brosten
|
||||
Description: Description goes here
|
||||
Rarity: 4
|
||||
Zone: 1
|
||||
CardImage: {fileID: -6028342126936659889, guid: 88427f554aebb2a49a9bc9705bb0f7bf, type: 3}
|
||||
CollectionIndex: 8
|
||||
UseCustomFileName: 0
|
||||
CustomFileName:
|
||||
Description: Description
|
||||
Rarity: 1
|
||||
Zone: 0
|
||||
CardImage: {fileID: 716150661, guid: 88427f554aebb2a49a9bc9705bb0f7bf, type: 3}
|
||||
CollectionIndex: 0
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42b258acaccec1c4c8a271b34f5c0ba9
|
||||
guid: ac75dd9d27a925f4c90bbc3b255820e2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_HR PimpSten (Copy) (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 9bcf6a94-a61b-47ff-abb7-10e8d2b9e140
|
||||
Name: HR PimpSten
|
||||
Description: Description goes hereeee
|
||||
Rarity: 4
|
||||
Zone: 1
|
||||
CardImage: {fileID: 2928974366146460655, guid: ab39d3c28640d3646ada092af9b639e6, type: 3}
|
||||
CollectionIndex: 7
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_HR PimpSten (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: c2f63556-636d-4e05-bf97-332db4f5d4b5
|
||||
Name: HR PimpSten
|
||||
Description: Description goes hereeee
|
||||
Rarity: 2
|
||||
Zone: 1
|
||||
CardImage: {fileID: 2928974366146460655, guid: ab39d3c28640d3646ada092af9b639e6, type: 3}
|
||||
CollectionIndex: 7
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fe09914d65c6d2429e917359ed54122
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_HRKvarts (Copy) (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: e032a426-91dd-4648-86b9-aed9b572e6a1
|
||||
Name: HRKvarts
|
||||
Description: Description goes here
|
||||
Rarity: 4
|
||||
Zone: 1
|
||||
CardImage: {fileID: 7622336620039435694, guid: 57aacc442c45ede49af137c00df8f2da, type: 3}
|
||||
CollectionIndex: 9
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1af518c607db864498329308e3dcc76
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_HRKvarts (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 7918bee9-1b3a-4731-af4b-b6a5b4e5150e
|
||||
Name: HRKvarts
|
||||
Description: Description goes here
|
||||
Rarity: 2
|
||||
Zone: 1
|
||||
CardImage: {fileID: 7622336620039435694, guid: 57aacc442c45ede49af137c00df8f2da, type: 3}
|
||||
CollectionIndex: 9
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7c519c4abc0edf4897168c699d9f250
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,12 +10,14 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_New Card 2
|
||||
m_Name: Card_Marmormormor
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 7ea4fa95-5327-439b-ab7f-94f2656281f2
|
||||
Name: HR PimpSten
|
||||
Description: Description goes hereeee
|
||||
Id: b8a2dcea-8439-4f0a-91a9-e352b24443ad
|
||||
Name: Marmormormor
|
||||
UseCustomFileName: 0
|
||||
CustomFileName:
|
||||
Description: ' fsdfsdfsdfsdf'
|
||||
Rarity: 0
|
||||
Zone: 1
|
||||
CardImage: {fileID: 2928974366146460655, guid: ab39d3c28640d3646ada092af9b639e6, type: 3}
|
||||
CollectionIndex: 7
|
||||
Zone: 0
|
||||
CardImage: {fileID: -1694013536, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
CollectionIndex: 1
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_Mormor Marmor (Copy) (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: f7b0d422-a7fe-4ab4-a731-0ca83e5328d2
|
||||
Name: Mormor Marmor
|
||||
Description: Description goes here
|
||||
Rarity: 4
|
||||
Zone: 1
|
||||
CardImage: {fileID: 8096915581896476643, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
CollectionIndex: 9
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f4654d849af5ef4d81e0bccacfe03e8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_Mormor Marmor (Copy)
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 99e66b22-ea53-4d02-ae36-c9c9bf28c93c
|
||||
Name: Mormor Marmor
|
||||
Description: Description goes here
|
||||
Rarity: 2
|
||||
Zone: 1
|
||||
CardImage: {fileID: 8096915581896476643, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
CollectionIndex: 9
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e507a1198083f747bf8f14f1dfc9daa
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b9c8b6ca63744a44acfe49ebe337619
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_New Card 3
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 2848767a-e715-403f-a0a0-81cd54d1ab00
|
||||
Name: Brosten
|
||||
Description: Description goes here
|
||||
Rarity: 0
|
||||
Zone: 1
|
||||
CardImage: {fileID: -6028342126936659889, guid: 88427f554aebb2a49a9bc9705bb0f7bf, type: 3}
|
||||
CollectionIndex: 8
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba36d0f7b72437d46aef231a1ed79110
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_New Card 4
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: ec173e56-7759-46fe-9127-facdd91a460f
|
||||
Name: Mormor Marmor
|
||||
Description: Description goes here
|
||||
Rarity: 0
|
||||
Zone: 1
|
||||
CardImage: {fileID: 8096915581896476643, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
CollectionIndex: 9
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 935dc5e5a05e0d443b263cceb57df300
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,21 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a80cc88c9884512b8b633110d838780, type: 3}
|
||||
m_Name: Card_New Card
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.Data.CardSystem.CardDefinition
|
||||
Id: 2e271648-c71a-4be1-b9d3-2eb4a3c87243
|
||||
Name: HRKvarts
|
||||
Description: Description goes here
|
||||
Rarity: 0
|
||||
Zone: 1
|
||||
CardImage: {fileID: 7622336620039435694, guid: 57aacc442c45ede49af137c00df8f2da, type: 3}
|
||||
CollectionIndex: 9
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,369 +1,369 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Data.CardSystem;
|
||||
using Core;
|
||||
using UI.CardSystem;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Editor.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor window for testing the Card System in play mode.
|
||||
/// Provides buttons to test core functionalities like adding booster packs, opening packs, and generating cards.
|
||||
/// </summary>
|
||||
public class CardSystemTesterWindow : EditorWindow
|
||||
{
|
||||
// Test Settings
|
||||
private int boosterPacksToAdd = 3;
|
||||
private int cardsToGenerate = 10;
|
||||
private bool autoOpenPacksWhenAdded = false;
|
||||
|
||||
// Debug Info
|
||||
private int currentBoosterCount;
|
||||
private int totalCardsInCollection;
|
||||
private string lastActionMessage = "";
|
||||
|
||||
// UI State
|
||||
private Vector2 scrollPosition;
|
||||
private CardAlbumUI cachedCardAlbumUI;
|
||||
|
||||
[MenuItem("AppleHills/Card System Tester")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<CardSystemTesterWindow>(false, "Card System Tester", true);
|
||||
window.minSize = new Vector2(400, 500);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
|
||||
}
|
||||
|
||||
private void OnPlayModeStateChanged(PlayModeStateChange state)
|
||||
{
|
||||
if (state == PlayModeStateChange.EnteredPlayMode)
|
||||
{
|
||||
cachedCardAlbumUI = null;
|
||||
RefreshDebugInfo();
|
||||
}
|
||||
else if (state == PlayModeStateChange.ExitingPlayMode)
|
||||
{
|
||||
cachedCardAlbumUI = null;
|
||||
lastActionMessage = "";
|
||||
}
|
||||
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
||||
|
||||
// Header
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Card System Tester", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("This tool allows you to test the card system in play mode. " +
|
||||
"Enter play mode to enable the testing functions.", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Test Settings Section
|
||||
DrawTestSettings();
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Debug Info Section
|
||||
DrawDebugInfo();
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Test Actions Section
|
||||
DrawTestActions();
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawTestSettings()
|
||||
{
|
||||
EditorGUILayout.LabelField("Test Settings", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!Application.isPlaying);
|
||||
|
||||
boosterPacksToAdd = EditorGUILayout.IntSlider("Booster Packs to Add", boosterPacksToAdd, 1, 10);
|
||||
cardsToGenerate = EditorGUILayout.IntSlider("Cards to Generate", cardsToGenerate, 1, 100);
|
||||
autoOpenPacksWhenAdded = EditorGUILayout.Toggle("Auto-Open Packs When Added", autoOpenPacksWhenAdded);
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
private void DrawDebugInfo()
|
||||
{
|
||||
EditorGUILayout.LabelField("Debug Info", EditorStyles.boldLabel);
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUILayout.IntField("Current Booster Count", currentBoosterCount);
|
||||
EditorGUILayout.IntField("Total Cards in Collection", totalCardsInCollection);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
if (!string.IsNullOrEmpty(lastActionMessage))
|
||||
{
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.HelpBox(lastActionMessage, MessageType.None);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
if (GUILayout.Button("Refresh Debug Info"))
|
||||
{
|
||||
RefreshDebugInfo();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Debug info available in play mode.", MessageType.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawTestActions()
|
||||
{
|
||||
EditorGUILayout.LabelField("Test Actions", EditorStyles.boldLabel);
|
||||
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Enter Play Mode to use these testing functions.", MessageType.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
// Booster Pack Actions
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.LabelField("Booster Pack Actions", EditorStyles.miniBoldLabel);
|
||||
|
||||
if (GUILayout.Button("Add Booster Packs", GUILayout.Height(30)))
|
||||
{
|
||||
AddBoosterPacks();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Open Card Menu", GUILayout.Height(30)))
|
||||
{
|
||||
SimulateBackpackClick();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Open Booster Pack", GUILayout.Height(30)))
|
||||
{
|
||||
OpenBoosterPack();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Open Album View", GUILayout.Height(30)))
|
||||
{
|
||||
OpenAlbumView();
|
||||
}
|
||||
|
||||
// Card Generation Actions
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Card Generation Actions", EditorStyles.miniBoldLabel);
|
||||
|
||||
if (GUILayout.Button("Generate Random Cards", GUILayout.Height(30)))
|
||||
{
|
||||
GenerateRandomCards();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
|
||||
// Danger Zone
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Danger Zone", EditorStyles.miniBoldLabel);
|
||||
|
||||
GUI.backgroundColor = new Color(1f, 0.6f, 0.6f);
|
||||
if (GUILayout.Button("Clear All Cards", GUILayout.Height(30)))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Clear All Cards",
|
||||
"Are you sure you want to clear all cards from the inventory? This cannot be undone in this play session.",
|
||||
"Clear All", "Cancel"))
|
||||
{
|
||||
ClearAllCards();
|
||||
}
|
||||
}
|
||||
GUI.backgroundColor = Color.white;
|
||||
}
|
||||
|
||||
// Refresh the debug information
|
||||
private void RefreshDebugInfo()
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
return;
|
||||
|
||||
if (CardSystemManager.Instance != null)
|
||||
{
|
||||
currentBoosterCount = CardSystemManager.Instance.GetBoosterPackCount();
|
||||
totalCardsInCollection = CardSystemManager.Instance.GetCardInventory().GetAllCards().Count;
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private CardAlbumUI GetCardAlbumUI()
|
||||
{
|
||||
if (cachedCardAlbumUI == null)
|
||||
{
|
||||
cachedCardAlbumUI = Object.FindAnyObjectByType<CardAlbumUI>();
|
||||
|
||||
if (cachedCardAlbumUI == null)
|
||||
{
|
||||
lastActionMessage = "Error: No CardAlbumUI found in the scene!";
|
||||
Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
return cachedCardAlbumUI;
|
||||
}
|
||||
|
||||
// Test Action Methods
|
||||
|
||||
private void AddBoosterPacks()
|
||||
{
|
||||
if (CardSystemManager.Instance != null)
|
||||
{
|
||||
CardSystemManager.Instance.AddBoosterPack(boosterPacksToAdd);
|
||||
lastActionMessage = $"Added {boosterPacksToAdd} booster pack(s)";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
RefreshDebugInfo();
|
||||
|
||||
if (autoOpenPacksWhenAdded && GetCardAlbumUI() != null)
|
||||
{
|
||||
SimulateBackpackClick();
|
||||
cachedCardAlbumUI.OpenBoosterPack();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void SimulateBackpackClick()
|
||||
{
|
||||
CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
|
||||
if (cardAlbumUI != null)
|
||||
{
|
||||
if (cardAlbumUI.BackpackIcon != null)
|
||||
{
|
||||
Button backpackButton = cardAlbumUI.BackpackIcon.GetComponent<Button>();
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.onClick.Invoke();
|
||||
lastActionMessage = "Opened card menu via backpack click";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
}
|
||||
else
|
||||
{
|
||||
lastActionMessage = "Failed to find Button component on backpack icon";
|
||||
Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastActionMessage = "BackpackIcon reference is null";
|
||||
Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
}
|
||||
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenBoosterPack()
|
||||
{
|
||||
CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
|
||||
if (cardAlbumUI != null)
|
||||
{
|
||||
SimulateBackpackClick();
|
||||
cardAlbumUI.OpenBoosterPack();
|
||||
lastActionMessage = "Opening booster pack";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
RefreshDebugInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenAlbumView()
|
||||
{
|
||||
CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
|
||||
if (cardAlbumUI != null)
|
||||
{
|
||||
SimulateBackpackClick();
|
||||
cardAlbumUI.OpenAlbumView();
|
||||
lastActionMessage = "Opening album view";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateRandomCards()
|
||||
{
|
||||
if (CardSystemManager.Instance != null)
|
||||
{
|
||||
int cardsAdded = 0;
|
||||
List<CardDefinition> allDefinitions = CardSystemManager.Instance.GetAllCardDefinitions();
|
||||
|
||||
if (allDefinitions.Count == 0)
|
||||
{
|
||||
lastActionMessage = "Error: No card definitions available";
|
||||
Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
Repaint();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < cardsToGenerate; i++)
|
||||
{
|
||||
// Get a random card definition
|
||||
CardDefinition randomDef = allDefinitions[Random.Range(0, allDefinitions.Count)];
|
||||
|
||||
// Create a card data instance and add it to inventory
|
||||
CardData newCard = randomDef.CreateCardData();
|
||||
CardSystemManager.Instance.GetCardInventory().AddCard(newCard);
|
||||
cardsAdded++;
|
||||
}
|
||||
|
||||
lastActionMessage = $"Generated {cardsAdded} random cards";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
RefreshDebugInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearAllCards()
|
||||
{
|
||||
if (CardSystemManager.Instance != null)
|
||||
{
|
||||
int count = CardSystemManager.Instance.GetCardInventory().GetAllCards().Count;
|
||||
CardSystemManager.Instance.GetCardInventory().ClearAllCards();
|
||||
lastActionMessage = $"Cleared {count} cards from inventory";
|
||||
Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
RefreshDebugInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// using UnityEditor;
|
||||
// using UnityEngine;
|
||||
// using AppleHills.Data.CardSystem;
|
||||
// using Data.CardSystem;
|
||||
// using Core;
|
||||
// using UI.CardSystem;
|
||||
// using UnityEngine.UI;
|
||||
// using System.Collections.Generic;
|
||||
//
|
||||
// namespace Editor.CardSystem
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// Editor window for testing the Card System in play mode.
|
||||
// /// Provides buttons to test core functionalities like adding booster packs, opening packs, and generating cards.
|
||||
// /// </summary>
|
||||
// public class CardSystemTesterWindow : EditorWindow
|
||||
// {
|
||||
// // Test Settings
|
||||
// private int boosterPacksToAdd = 3;
|
||||
// private int cardsToGenerate = 10;
|
||||
// private bool autoOpenPacksWhenAdded = false;
|
||||
//
|
||||
// // Debug Info
|
||||
// private int currentBoosterCount;
|
||||
// private int totalCardsInCollection;
|
||||
// private string lastActionMessage = "";
|
||||
//
|
||||
// // UI State
|
||||
// private Vector2 scrollPosition;
|
||||
// private CardAlbumUI cachedCardAlbumUI;
|
||||
//
|
||||
// [MenuItem("AppleHills/Card System Tester")]
|
||||
// public static void ShowWindow()
|
||||
// {
|
||||
// var window = GetWindow<CardSystemTesterWindow>(false, "Card System Tester", true);
|
||||
// window.minSize = new Vector2(400, 500);
|
||||
// }
|
||||
//
|
||||
// private void OnEnable()
|
||||
// {
|
||||
// EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
||||
// }
|
||||
//
|
||||
// private void OnDisable()
|
||||
// {
|
||||
// EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
|
||||
// }
|
||||
//
|
||||
// private void OnPlayModeStateChanged(PlayModeStateChange state)
|
||||
// {
|
||||
// if (state == PlayModeStateChange.EnteredPlayMode)
|
||||
// {
|
||||
// cachedCardAlbumUI = null;
|
||||
// RefreshDebugInfo();
|
||||
// }
|
||||
// else if (state == PlayModeStateChange.ExitingPlayMode)
|
||||
// {
|
||||
// cachedCardAlbumUI = null;
|
||||
// lastActionMessage = "";
|
||||
// }
|
||||
//
|
||||
// Repaint();
|
||||
// }
|
||||
//
|
||||
// private void OnGUI()
|
||||
// {
|
||||
// scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
||||
//
|
||||
// // Header
|
||||
// EditorGUILayout.Space(10);
|
||||
// EditorGUILayout.LabelField("Card System Tester", EditorStyles.boldLabel);
|
||||
// EditorGUILayout.HelpBox("This tool allows you to test the card system in play mode. " +
|
||||
// "Enter play mode to enable the testing functions.", MessageType.Info);
|
||||
//
|
||||
// EditorGUILayout.Space(10);
|
||||
//
|
||||
// // Test Settings Section
|
||||
// DrawTestSettings();
|
||||
//
|
||||
// EditorGUILayout.Space(10);
|
||||
//
|
||||
// // Debug Info Section
|
||||
// DrawDebugInfo();
|
||||
//
|
||||
// EditorGUILayout.Space(10);
|
||||
//
|
||||
// // Test Actions Section
|
||||
// DrawTestActions();
|
||||
//
|
||||
// EditorGUILayout.EndScrollView();
|
||||
// }
|
||||
//
|
||||
// private void DrawTestSettings()
|
||||
// {
|
||||
// EditorGUILayout.LabelField("Test Settings", EditorStyles.boldLabel);
|
||||
//
|
||||
// EditorGUI.BeginDisabledGroup(!Application.isPlaying);
|
||||
//
|
||||
// boosterPacksToAdd = EditorGUILayout.IntSlider("Booster Packs to Add", boosterPacksToAdd, 1, 10);
|
||||
// cardsToGenerate = EditorGUILayout.IntSlider("Cards to Generate", cardsToGenerate, 1, 100);
|
||||
// autoOpenPacksWhenAdded = EditorGUILayout.Toggle("Auto-Open Packs When Added", autoOpenPacksWhenAdded);
|
||||
//
|
||||
// EditorGUI.EndDisabledGroup();
|
||||
// }
|
||||
//
|
||||
// private void DrawDebugInfo()
|
||||
// {
|
||||
// EditorGUILayout.LabelField("Debug Info", EditorStyles.boldLabel);
|
||||
//
|
||||
// if (Application.isPlaying)
|
||||
// {
|
||||
// EditorGUI.BeginDisabledGroup(true);
|
||||
// EditorGUILayout.IntField("Current Booster Count", currentBoosterCount);
|
||||
// EditorGUILayout.IntField("Total Cards in Collection", totalCardsInCollection);
|
||||
// EditorGUI.EndDisabledGroup();
|
||||
//
|
||||
// if (!string.IsNullOrEmpty(lastActionMessage))
|
||||
// {
|
||||
// EditorGUILayout.Space(5);
|
||||
// EditorGUILayout.HelpBox(lastActionMessage, MessageType.None);
|
||||
// }
|
||||
//
|
||||
// EditorGUILayout.Space(5);
|
||||
// if (GUILayout.Button("Refresh Debug Info"))
|
||||
// {
|
||||
// RefreshDebugInfo();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// EditorGUILayout.HelpBox("Debug info available in play mode.", MessageType.Warning);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void DrawTestActions()
|
||||
// {
|
||||
// EditorGUILayout.LabelField("Test Actions", EditorStyles.boldLabel);
|
||||
//
|
||||
// if (!Application.isPlaying)
|
||||
// {
|
||||
// EditorGUILayout.HelpBox("Enter Play Mode to use these testing functions.", MessageType.Warning);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // Booster Pack Actions
|
||||
// EditorGUILayout.Space(5);
|
||||
// EditorGUILayout.LabelField("Booster Pack Actions", EditorStyles.miniBoldLabel);
|
||||
//
|
||||
// if (GUILayout.Button("Add Booster Packs", GUILayout.Height(30)))
|
||||
// {
|
||||
// AddBoosterPacks();
|
||||
// }
|
||||
//
|
||||
// if (GUILayout.Button("Open Card Menu", GUILayout.Height(30)))
|
||||
// {
|
||||
// SimulateBackpackClick();
|
||||
// }
|
||||
//
|
||||
// if (GUILayout.Button("Open Booster Pack", GUILayout.Height(30)))
|
||||
// {
|
||||
// OpenBoosterPack();
|
||||
// }
|
||||
//
|
||||
// if (GUILayout.Button("Open Album View", GUILayout.Height(30)))
|
||||
// {
|
||||
// OpenAlbumView();
|
||||
// }
|
||||
//
|
||||
// // Card Generation Actions
|
||||
// EditorGUILayout.Space(10);
|
||||
// EditorGUILayout.LabelField("Card Generation Actions", EditorStyles.miniBoldLabel);
|
||||
//
|
||||
// if (GUILayout.Button("Generate Random Cards", GUILayout.Height(30)))
|
||||
// {
|
||||
// GenerateRandomCards();
|
||||
// }
|
||||
//
|
||||
// EditorGUILayout.Space(5);
|
||||
//
|
||||
// // Danger Zone
|
||||
// EditorGUILayout.Space(10);
|
||||
// EditorGUILayout.LabelField("Danger Zone", EditorStyles.miniBoldLabel);
|
||||
//
|
||||
// GUI.backgroundColor = new Color(1f, 0.6f, 0.6f);
|
||||
// if (GUILayout.Button("Clear All Cards", GUILayout.Height(30)))
|
||||
// {
|
||||
// if (EditorUtility.DisplayDialog("Clear All Cards",
|
||||
// "Are you sure you want to clear all cards from the inventory? This cannot be undone in this play session.",
|
||||
// "Clear All", "Cancel"))
|
||||
// {
|
||||
// ClearAllCards();
|
||||
// }
|
||||
// }
|
||||
// GUI.backgroundColor = Color.white;
|
||||
// }
|
||||
//
|
||||
// // Refresh the debug information
|
||||
// private void RefreshDebugInfo()
|
||||
// {
|
||||
// if (!Application.isPlaying)
|
||||
// return;
|
||||
//
|
||||
// if (CardSystemManager.Instance != null)
|
||||
// {
|
||||
// currentBoosterCount = CardSystemManager.Instance.GetBoosterPackCount();
|
||||
// totalCardsInCollection = CardSystemManager.Instance.GetCardInventory().GetAllCards().Count;
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private CardAlbumUI GetCardAlbumUI()
|
||||
// {
|
||||
// if (cachedCardAlbumUI == null)
|
||||
// {
|
||||
// cachedCardAlbumUI = Object.FindAnyObjectByType<CardAlbumUI>();
|
||||
//
|
||||
// if (cachedCardAlbumUI == null)
|
||||
// {
|
||||
// lastActionMessage = "Error: No CardAlbumUI found in the scene!";
|
||||
// Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return cachedCardAlbumUI;
|
||||
// }
|
||||
//
|
||||
// // Test Action Methods
|
||||
//
|
||||
// private void AddBoosterPacks()
|
||||
// {
|
||||
// if (CardSystemManager.Instance != null)
|
||||
// {
|
||||
// CardSystemManager.Instance.AddBoosterPack(boosterPacksToAdd);
|
||||
// lastActionMessage = $"Added {boosterPacksToAdd} booster pack(s)";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// RefreshDebugInfo();
|
||||
//
|
||||
// if (autoOpenPacksWhenAdded && GetCardAlbumUI() != null)
|
||||
// {
|
||||
// SimulateBackpackClick();
|
||||
// cachedCardAlbumUI.OpenBoosterPack();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
// Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void SimulateBackpackClick()
|
||||
// {
|
||||
// CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
//
|
||||
// if (cardAlbumUI != null)
|
||||
// {
|
||||
// if (cardAlbumUI.BackpackIcon != null)
|
||||
// {
|
||||
// Button backpackButton = cardAlbumUI.BackpackIcon.GetComponent<Button>();
|
||||
// if (backpackButton != null)
|
||||
// {
|
||||
// backpackButton.onClick.Invoke();
|
||||
// lastActionMessage = "Opened card menu via backpack click";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lastActionMessage = "Failed to find Button component on backpack icon";
|
||||
// Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lastActionMessage = "BackpackIcon reference is null";
|
||||
// Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// }
|
||||
//
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void OpenBoosterPack()
|
||||
// {
|
||||
// CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
//
|
||||
// if (cardAlbumUI != null)
|
||||
// {
|
||||
// SimulateBackpackClick();
|
||||
// cardAlbumUI.OpenBoosterPack();
|
||||
// lastActionMessage = "Opening booster pack";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// RefreshDebugInfo();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void OpenAlbumView()
|
||||
// {
|
||||
// CardAlbumUI cardAlbumUI = GetCardAlbumUI();
|
||||
//
|
||||
// if (cardAlbumUI != null)
|
||||
// {
|
||||
// SimulateBackpackClick();
|
||||
// cardAlbumUI.OpenAlbumView();
|
||||
// lastActionMessage = "Opening album view";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void GenerateRandomCards()
|
||||
// {
|
||||
// if (CardSystemManager.Instance != null)
|
||||
// {
|
||||
// int cardsAdded = 0;
|
||||
// List<CardDefinition> allDefinitions = CardSystemManager.Instance.GetAllCardDefinitions();
|
||||
//
|
||||
// if (allDefinitions.Count == 0)
|
||||
// {
|
||||
// lastActionMessage = "Error: No card definitions available";
|
||||
// Logging.Warning($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// Repaint();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (int i = 0; i < cardsToGenerate; i++)
|
||||
// {
|
||||
// // Get a random card definition
|
||||
// CardDefinition randomDef = allDefinitions[Random.Range(0, allDefinitions.Count)];
|
||||
//
|
||||
// // Create a card data instance and add it to inventory
|
||||
// CardData newCard = randomDef.CreateCardData();
|
||||
// CardSystemManager.Instance.GetCardInventory().AddCard(newCard);
|
||||
// cardsAdded++;
|
||||
// }
|
||||
//
|
||||
// lastActionMessage = $"Generated {cardsAdded} random cards";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// RefreshDebugInfo();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
// Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void ClearAllCards()
|
||||
// {
|
||||
// if (CardSystemManager.Instance != null)
|
||||
// {
|
||||
// int count = CardSystemManager.Instance.GetCardInventory().GetAllCards().Count;
|
||||
// CardSystemManager.Instance.GetCardInventory().ClearAllCards();
|
||||
// lastActionMessage = $"Cleared {count} cards from inventory";
|
||||
// Logging.Debug($"[CardSystemTesterWindow] {lastActionMessage}");
|
||||
// RefreshDebugInfo();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lastActionMessage = "Error: CardSystemManager instance not found!";
|
||||
// Debug.LogError("[CardSystemTesterWindow] " + lastActionMessage);
|
||||
// Repaint();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d638a1b00d4814b4991b7b61450a7aab
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,334 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3555924788298046233
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2510839793683184596}
|
||||
- component: {fileID: 7931090856607470176}
|
||||
- component: {fileID: 3867938905670777662}
|
||||
m_Layer: 5
|
||||
m_Name: NotificationDot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2510839793683184596
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555924788298046233}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8243838592031101330}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7931090856607470176
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555924788298046233}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3867938905670777662
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3555924788298046233}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 1454986794490068504, guid: dad47d8bcf29e4742803088801ae4b04, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &3813704348964656314
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8243838592031101330}
|
||||
m_Layer: 5
|
||||
m_Name: Container
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8243838592031101330
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3813704348964656314}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2510839793683184596}
|
||||
- {fileID: 912809337432025300}
|
||||
m_Father: {fileID: 4399514539281523652}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &4367103374191057909
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 912809337432025300}
|
||||
- component: {fileID: 2674835159736628855}
|
||||
- component: {fileID: 7140808185011848511}
|
||||
m_Layer: 5
|
||||
m_Name: BoosterCount
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &912809337432025300
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4367103374191057909}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8243838592031101330}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2674835159736628855
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4367103374191057909}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7140808185011848511
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4367103374191057909}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 1
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &6686144552275602124
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4399514539281523652}
|
||||
- component: {fileID: 7701049314552813552}
|
||||
- component: {fileID: 6728421751561708195}
|
||||
m_Layer: 5
|
||||
m_Name: BoosterNotifications
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4399514539281523652
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6686144552275602124}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8243838592031101330}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 37.5, y: 37.5}
|
||||
m_SizeDelta: {x: 75, y: 75}
|
||||
m_Pivot: {x: 1, y: 1}
|
||||
--- !u!114 &7701049314552813552
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6686144552275602124}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ed8cced1478640229c5a61e3c6bd42df, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.UI.CardSystem.BoosterNotificationDot
|
||||
dotBackground: {fileID: 3813704348964656314}
|
||||
countText: {fileID: 7140808185011848511}
|
||||
hideWhenZero: 1
|
||||
useAnimation: 1
|
||||
textPrefix:
|
||||
textSuffix:
|
||||
textColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
useTween: 1
|
||||
pulseDuration: 0.3
|
||||
pulseScale: 1.2
|
||||
animator: {fileID: 6728421751561708195}
|
||||
animationTrigger: Update
|
||||
--- !u!95 &6728421751561708195
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6686144552275602124}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00a9eeae1396ffb488487b1555414c39
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06de8e223a669fe48b043983963d1e6a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -65,7 +65,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 2785675867010258551, guid: 58e298cfaf730814a8316c0596cbf0a0, type: 3}
|
||||
m_Sprite: {fileID: -1693298060938455423, guid: 98e781256598a844c955f322a651807e, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -109,7 +109,6 @@ RectTransform:
|
||||
- {fileID: 701288322681682632}
|
||||
- {fileID: 3358104539393755438}
|
||||
- {fileID: 5403705610400999619}
|
||||
- {fileID: 790099756778783334}
|
||||
m_Father: {fileID: 3108957999325520329}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -145,7 +144,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 8670586000075846323, guid: 2a09693b0a87b09498d682d25e8080b1, type: 3}
|
||||
m_Sprite: {fileID: -2642905903075119301, guid: c293405722d536c4889a97d72085fece, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -235,7 +234,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -1694013536, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
m_Sprite: {fileID: 716150661, guid: 88427f554aebb2a49a9bc9705bb0f7bf, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -291,7 +290,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1802458852284665438}
|
||||
m_Father: {fileID: 7619421269260494372}
|
||||
m_Father: {fileID: 701288322681682632}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.07, y: 0.06}
|
||||
m_AnchorMax: {x: 0.93, y: 0.27}
|
||||
@@ -381,6 +380,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4210468743547155963}
|
||||
- {fileID: 790099756778783334}
|
||||
m_Father: {fileID: 7619421269260494372}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -403,7 +403,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4798100034153273729}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
@@ -416,7 +416,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 2139176427, guid: 2876a4a9ee4ac0147a40b9aef4f5735d, type: 3}
|
||||
m_Sprite: {fileID: -7781690445634620112, guid: 2049b6df7b55c9d43a65125944ed7c01, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -435,7 +435,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3108957999325520329}
|
||||
- component: {fileID: 3415270300443107702}
|
||||
- component: {fileID: 693510968212398562}
|
||||
m_Layer: 5
|
||||
m_Name: Card
|
||||
m_TagString: Untagged
|
||||
@@ -461,31 +461,33 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 675, y: 900}
|
||||
m_SizeDelta: {x: 200, y: 2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &3415270300443107702
|
||||
Canvas:
|
||||
--- !u!114 &693510968212398562
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5533787515014034956}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 72cb26621865420aa763a66c06eb7f6d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::UI.CardSystem.CardDisplay
|
||||
cardNameText: {fileID: 7441149886460635393}
|
||||
cardImage: {fileID: 1081413904764417069}
|
||||
frameImage: {fileID: 796420825557574687}
|
||||
overlayImage: {fileID: 3019720862977059694}
|
||||
backgroundImage: {fileID: 3477072926370298145}
|
||||
zoneShapeImage: {fileID: 3408254326204982967}
|
||||
cardData:
|
||||
Id: fc2c42ee-d801-41c6-9987-0f094a7b2edf
|
||||
DefinitionId: dc253a1d-23db-4610-b05f-d5a4bffeda77
|
||||
Rarity: 2
|
||||
CopiesOwned: 1
|
||||
visualConfig: {fileID: 11400000, guid: 473a9bc98f6f6684e8023126fc557a88, type: 2}
|
||||
editorCardDefinition: {fileID: 11400000, guid: ac75dd9d27a925f4c90bbc3b255820e2, type: 2}
|
||||
--- !u!1 &6526396462000724448
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -551,7 +553,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 6144362121687729781, guid: b72b269b732c69a4ebd3fa1564e338ba, type: 3}
|
||||
m_Sprite: {fileID: -3770539431085108897, guid: 5896d629ac597cd49b8f03037f0dbcb2, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -596,8 +598,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 2.2666, y: 5.6664}
|
||||
m_SizeDelta: {x: 0, y: -18.1326}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8948373462880649785
|
||||
CanvasRenderer:
|
||||
@@ -627,7 +629,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Long Card Name
|
||||
m_text: My Test Card
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: ee27431114888c5418c7465f5d4a90bf, type: 2}
|
||||
m_sharedMaterial: {fileID: -3877009864442004118, guid: ee27431114888c5418c7465f5d4a90bf, type: 2}
|
||||
@@ -654,10 +656,10 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 0.95663
|
||||
m_fontSize: 0.1
|
||||
m_fontSizeBase: 0.95663
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 0.1
|
||||
m_fontSizeMax: 80
|
||||
m_fontStyle: 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 840f3d8a936b39a41b5896328a692005
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,7 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8318669147161080742}
|
||||
- component: {fileID: 5069851050693410091}
|
||||
m_Layer: 5
|
||||
m_Name: DCardCanvas
|
||||
m_Name: Card_WithCanvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -92,6 +92,14 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 6092374155348651304}
|
||||
m_Modifications:
|
||||
- target: {fileID: 790099756778783334, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1802458852284665438, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2233823152869352954, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SortingLayer
|
||||
value: 32709
|
||||
@@ -122,11 +130,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
value: 400
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
value: 600
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3108957999325520329, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -224,6 +232,22 @@ PrefabInstance:
|
||||
propertyPath: m_HorizontalFit
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7619421269260494372, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8586733118747829166, guid: 6d6e64f153ccde149bede8e82351d3c4, type: 3}
|
||||
propertyPath: m_PreferredWidth
|
||||
value: 675
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43be0f1cce1e5ae4d86def9da1fe2822
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,697 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1674595570562273386
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8321041088571283042}
|
||||
- component: {fileID: 8657710833814654092}
|
||||
- component: {fileID: 3062587662617271504}
|
||||
- component: {fileID: 773682364924707625}
|
||||
- component: {fileID: 5465547774692166910}
|
||||
- component: {fileID: 2506092559548033437}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8321041088571283042
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 7987423280633120294}
|
||||
- {fileID: 6467154550771149323}
|
||||
- {fileID: 5853287755371765300}
|
||||
m_Father: {fileID: 2699789555794789249}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8657710833814654092
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3062587662617271504
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -2642905903075119301, guid: c293405722d536c4889a97d72085fece, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1.9
|
||||
--- !u!114 &773682364924707625
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.AspectRatioFitter
|
||||
m_AspectMode: 2
|
||||
m_AspectRatio: 0.75
|
||||
--- !u!223 &5465547774692166910
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &2506092559548033437
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1674595570562273386}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!1 &2060536854119323360
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8124520331884430719}
|
||||
- component: {fileID: 2165315952716078155}
|
||||
- component: {fileID: 2550939788652313610}
|
||||
m_Layer: 0
|
||||
m_Name: NameText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8124520331884430719
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2060536854119323360}
|
||||
m_LocalRotation: {x: -0, y: -0, z: 0.15619579, w: 0.9877261}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7987423280633120294}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 17.972}
|
||||
m_AnchorMin: {x: 0.1, y: 0.1}
|
||||
m_AnchorMax: {x: 0.9, y: 0.9}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2165315952716078155
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2060536854119323360}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2550939788652313610
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2060536854119323360}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Test example card 3
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
|
||||
m_sharedMaterial: {fileID: -1441574381962284772, guid: 4aca0db6ec111b5418bdc747168f9474, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 62.7
|
||||
m_fontSizeBase: 15
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &2421709636016798578
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7987423280633120294}
|
||||
- component: {fileID: 8745186166470585342}
|
||||
- component: {fileID: 353314911414134125}
|
||||
m_Layer: 0
|
||||
m_Name: NameBackground
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7987423280633120294
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2421709636016798578}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 8124520331884430719}
|
||||
m_Father: {fileID: 8321041088571283042}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -380}
|
||||
m_SizeDelta: {x: 521, y: 161}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &8745186166470585342
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2421709636016798578}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &353314911414134125
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2421709636016798578}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -3310850967021205615, guid: bf14f631f4b34e74d83c20a1dd671422, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &3326706725254864107
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2699789555794789249}
|
||||
- component: {fileID: 8725212443281664752}
|
||||
- component: {fileID: 3914488700080302779}
|
||||
- component: {fileID: 6599324117435394003}
|
||||
m_Layer: 5
|
||||
m_Name: SIngleCardDisplayUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2699789555794789249
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3326706725254864107}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8321041088571283042}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 23.0607}
|
||||
m_SizeDelta: {x: 698, y: 900}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8725212443281664752
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3326706725254864107}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3914488700080302779
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3326706725254864107}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 1168924690279934439, guid: ef48d0f74df973948b8a0ffd35cb980e, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6599324117435394003
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3326706725254864107}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: aed7c581bdb84200a05dd8a7df409ab0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleHills.UI.CardSystem.CardUIElement
|
||||
cardNameText: {fileID: 2550939788652313610}
|
||||
cardImage: {fileID: 959067373316088928}
|
||||
frameImage: {fileID: 1665411369613789579}
|
||||
backgroundImage: {fileID: 3062587662617271504}
|
||||
backgroundShape: {fileID: 8871089254192903045}
|
||||
cardDefinition: {fileID: 11400000, guid: 28dbfbd7a6b2cd84b8274bd1126b220b, type: 2}
|
||||
cardData:
|
||||
Id: aca05c10-f25d-4636-95bf-8497c841b95a
|
||||
DefinitionId: ee1e2aec-bdb6-4c68-8d7a-061c7f5e8583
|
||||
Rarity: 2
|
||||
CopiesOwned: 1
|
||||
visualConfig: {fileID: 11400000, guid: 473a9bc98f6f6684e8023126fc557a88, type: 2}
|
||||
--- !u!1 &3429746996164215956
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5853287755371765300}
|
||||
- component: {fileID: 8909872439431770690}
|
||||
- component: {fileID: 8871089254192903045}
|
||||
- component: {fileID: 3888758318642584746}
|
||||
m_Layer: 5
|
||||
m_Name: BackgroundShape
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5853287755371765300
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3429746996164215956}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1376284209458560831}
|
||||
m_Father: {fileID: 8321041088571283042}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.1, y: 0.3}
|
||||
m_AnchorMax: {x: 0.9, y: 0.9}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8909872439431770690
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3429746996164215956}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8871089254192903045
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3429746996164215956}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 1182931454153362743, guid: 6abc7d4ad9ecc194ba2358d657afb7ef, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3888758318642584746
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3429746996164215956}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.AspectRatioFitter
|
||||
m_AspectMode: 1
|
||||
m_AspectRatio: 1
|
||||
--- !u!1 &5412331388939213537
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1376284209458560831}
|
||||
- component: {fileID: 9097459168520965074}
|
||||
- component: {fileID: 959067373316088928}
|
||||
m_Layer: 5
|
||||
m_Name: Portrait
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1376284209458560831
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5412331388939213537}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5853287755371765300}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 593, y: 576}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9097459168520965074
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5412331388939213537}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &959067373316088928
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5412331388939213537}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -1694013536, guid: c28c2d55edc2fbc4baf57d2672c0c3df, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5760001742287037279
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6467154550771149323}
|
||||
- component: {fileID: 1731110110200268733}
|
||||
- component: {fileID: 1665411369613789579}
|
||||
m_Layer: 5
|
||||
m_Name: BorderFrame
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6467154550771149323
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5760001742287037279}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8321041088571283042}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 675, y: 900}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1731110110200268733
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5760001742287037279}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1665411369613789579
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5760001742287037279}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: -5982761598017616961, guid: 69bf9bb654ffbcf49b64322174a8d389, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 2.5
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 594aad71e4281174da8fb4f47a8d19b0
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,15 +23,6 @@ namespace AppleHills.Data.CardSystem
|
||||
public int CollectionIndex => _definition?.CollectionIndex ?? 0;
|
||||
public Sprite CardImage => _definition?.CardImage;
|
||||
|
||||
// Derived properties
|
||||
public Color BackgroundColor => _definition?.GetBackgroundColor() ?? Color.white;
|
||||
|
||||
// Get frame shape based on rarity
|
||||
public string GetFrameShapeName()
|
||||
{
|
||||
return $"Frame_{Rarity}";
|
||||
}
|
||||
|
||||
// Default constructor
|
||||
public CardData()
|
||||
{
|
||||
@@ -97,11 +88,9 @@ namespace AppleHills.Data.CardSystem
|
||||
// Enums for card attributes
|
||||
public enum CardRarity
|
||||
{
|
||||
Common = 0,
|
||||
Uncommon = 1,
|
||||
Rare = 2,
|
||||
Epic = 3,
|
||||
Legendary = 4
|
||||
Normal = 0,
|
||||
Rare = 1,
|
||||
Legendary = 2
|
||||
}
|
||||
|
||||
public enum CardZone
|
||||
|
||||
@@ -16,6 +16,13 @@ namespace AppleHills.Data.CardSystem
|
||||
|
||||
[Header("Basic Info")]
|
||||
public string Name;
|
||||
|
||||
[Tooltip("Use a custom file name instead of the card name")]
|
||||
public bool UseCustomFileName = false;
|
||||
|
||||
[Tooltip("Custom file name (only used if UseCustomFileName is true)")]
|
||||
public string CustomFileName = "";
|
||||
|
||||
[TextArea(3, 5)]
|
||||
public string Description;
|
||||
public CardRarity Rarity;
|
||||
@@ -35,29 +42,6 @@ namespace AppleHills.Data.CardSystem
|
||||
return new CardData(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the background color for this card based on its zone
|
||||
/// </summary>
|
||||
public Color GetBackgroundColor()
|
||||
{
|
||||
// Colors based on zone
|
||||
switch (Zone)
|
||||
{
|
||||
case CardZone.AppleHills:
|
||||
return new Color(0.8f, 0.9f, 0.8f); // Light green
|
||||
case CardZone.Quarry:
|
||||
return new Color(0.85f, 0.8f, 0.7f); // Sandy brown
|
||||
case CardZone.Forest:
|
||||
return new Color(0.6f, 0.8f, 0.6f); // Forest green
|
||||
case CardZone.Mountain:
|
||||
return new Color(0.7f, 0.7f, 0.9f); // Bluish
|
||||
case CardZone.Beach:
|
||||
return new Color(0.9f, 0.85f, 0.7f); // Sandy yellow
|
||||
default:
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is CardDefinition other)
|
||||
|
||||
@@ -259,14 +259,12 @@ namespace Data.CardSystem
|
||||
/// </summary>
|
||||
private CardRarity DetermineRandomRarity()
|
||||
{
|
||||
// Simple weighted random - can be adjusted for better distribution
|
||||
// Weighted random for 3 rarities
|
||||
float rand = UnityEngine.Random.value;
|
||||
|
||||
if (rand < 0.6f) return CardRarity.Common;
|
||||
if (rand < 0.85f) return CardRarity.Uncommon;
|
||||
if (rand < 0.95f) return CardRarity.Rare;
|
||||
if (rand < 0.99f) return CardRarity.Epic;
|
||||
return CardRarity.Legendary;
|
||||
if (rand < 0.70f) return CardRarity.Normal; // 70% chance
|
||||
if (rand < 0.95f) return CardRarity.Rare; // 25% chance
|
||||
return CardRarity.Legendary; // 5% chance
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,37 +7,47 @@ namespace AppleHills.Data.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// ScriptableObject containing visual configuration for card display
|
||||
/// Maps card rarities to colors and zones to colors/shapes
|
||||
/// Maps card rarities to frames/overlays and zones to backgrounds/shapes
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "CardVisualConfig", menuName = "AppleHills/Card System/Visual Config")]
|
||||
public class CardVisualConfig : ScriptableObject
|
||||
{
|
||||
[Serializable]
|
||||
public class RarityColorMapping
|
||||
public class RarityVisualMapping
|
||||
{
|
||||
public CardRarity rarity;
|
||||
public Color color = Color.white;
|
||||
[Tooltip("Frame image for this rarity")]
|
||||
public Sprite frame;
|
||||
[Tooltip("Overlay image for this rarity (can be null)")]
|
||||
public Sprite overlay;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ZoneVisualMapping
|
||||
{
|
||||
public CardZone zone;
|
||||
public Color color = Color.white;
|
||||
public Sprite backgroundShape;
|
||||
[Tooltip("Background image for this zone")]
|
||||
public Sprite background;
|
||||
[Tooltip("Shape sprite for Normal rarity cards in this zone")]
|
||||
public Sprite shapeNormal;
|
||||
[Tooltip("Shape sprite for Rare rarity cards in this zone")]
|
||||
public Sprite shapeRare;
|
||||
}
|
||||
|
||||
[Header("Rarity Configuration")]
|
||||
[Tooltip("Color mappings for different card rarities")]
|
||||
[SerializeField] private List<RarityColorMapping> rarityColors = new List<RarityColorMapping>();
|
||||
[Tooltip("Visual mappings for different card rarities (frames and overlays)")]
|
||||
[SerializeField] private List<RarityVisualMapping> rarityVisuals = new List<RarityVisualMapping>();
|
||||
|
||||
[Header("Zone Configuration")]
|
||||
[Tooltip("Visual mappings for different card zones")]
|
||||
[Tooltip("Visual mappings for different card zones (backgrounds and shapes)")]
|
||||
[SerializeField] private List<ZoneVisualMapping> zoneVisuals = new List<ZoneVisualMapping>();
|
||||
|
||||
private Dictionary<CardRarity, Color> _rarityColorLookup;
|
||||
private Dictionary<CardZone, Color> _zoneColorLookup;
|
||||
private Dictionary<CardZone, Sprite> _zoneShapeLookup;
|
||||
[Header("Legendary Override")]
|
||||
[Tooltip("Background used for all Legendary cards, regardless of zone")]
|
||||
[SerializeField] private Sprite legendaryBackground;
|
||||
|
||||
private Dictionary<CardRarity, RarityVisualMapping> _rarityLookup;
|
||||
private Dictionary<CardZone, ZoneVisualMapping> _zoneLookup;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the lookup dictionaries when the asset is loaded
|
||||
@@ -52,81 +62,94 @@ namespace AppleHills.Data.CardSystem
|
||||
/// </summary>
|
||||
private void InitializeLookups()
|
||||
{
|
||||
// Build rarity color lookup
|
||||
_rarityColorLookup = new Dictionary<CardRarity, Color>();
|
||||
foreach (var mapping in rarityColors)
|
||||
// Build rarity visual lookup
|
||||
_rarityLookup = new Dictionary<CardRarity, RarityVisualMapping>();
|
||||
foreach (var mapping in rarityVisuals)
|
||||
{
|
||||
_rarityColorLookup[mapping.rarity] = mapping.color;
|
||||
_rarityLookup[mapping.rarity] = mapping;
|
||||
}
|
||||
|
||||
// Build zone color and shape lookups
|
||||
_zoneColorLookup = new Dictionary<CardZone, Color>();
|
||||
_zoneShapeLookup = new Dictionary<CardZone, Sprite>();
|
||||
|
||||
// Build zone visual lookup
|
||||
_zoneLookup = new Dictionary<CardZone, ZoneVisualMapping>();
|
||||
foreach (var mapping in zoneVisuals)
|
||||
{
|
||||
_zoneColorLookup[mapping.zone] = mapping.color;
|
||||
_zoneShapeLookup[mapping.zone] = mapping.backgroundShape;
|
||||
_zoneLookup[mapping.zone] = mapping;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the color for a specific card rarity
|
||||
/// Get the frame sprite for a specific card rarity
|
||||
/// </summary>
|
||||
public Color GetRarityColor(CardRarity rarity)
|
||||
public Sprite GetRarityFrame(CardRarity rarity)
|
||||
{
|
||||
// Initialize lookups if needed
|
||||
if (_rarityColorLookup == null)
|
||||
if (_rarityLookup == null) InitializeLookups();
|
||||
|
||||
if (_rarityLookup.TryGetValue(rarity, out RarityVisualMapping mapping))
|
||||
{
|
||||
InitializeLookups();
|
||||
return mapping.frame;
|
||||
}
|
||||
|
||||
// Return the color if found, otherwise white
|
||||
if (_rarityColorLookup.TryGetValue(rarity, out Color color))
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
Logging.Warning($"[CardVisualConfig] No color mapping found for rarity {rarity}, using default");
|
||||
return Color.white;
|
||||
Logging.Warning($"[CardVisualConfig] No frame mapping found for rarity {rarity}");
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the color for a specific card zone
|
||||
/// Get the overlay sprite for a specific card rarity (can be null)
|
||||
/// </summary>
|
||||
public Color GetZoneColor(CardZone zone)
|
||||
public Sprite GetRarityOverlay(CardRarity rarity)
|
||||
{
|
||||
// Initialize lookups if needed
|
||||
if (_zoneColorLookup == null)
|
||||
if (_rarityLookup == null) InitializeLookups();
|
||||
|
||||
if (_rarityLookup.TryGetValue(rarity, out RarityVisualMapping mapping))
|
||||
{
|
||||
InitializeLookups();
|
||||
return mapping.overlay;
|
||||
}
|
||||
|
||||
// Return the color if found, otherwise white
|
||||
if (_zoneColorLookup.TryGetValue(zone, out Color color))
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
Logging.Warning($"[CardVisualConfig] No color mapping found for zone {zone}, using default");
|
||||
return Color.white;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the background shape sprite for a specific zone
|
||||
/// Get the background sprite for a card based on zone and rarity
|
||||
/// Legendary cards always use the legendary background override
|
||||
/// </summary>
|
||||
public Sprite GetZoneShape(CardZone zone)
|
||||
public Sprite GetBackground(CardZone zone, CardRarity rarity)
|
||||
{
|
||||
// Initialize lookups if needed
|
||||
if (_zoneShapeLookup == null)
|
||||
if (_zoneLookup == null) InitializeLookups();
|
||||
|
||||
// Legendary cards use special background
|
||||
if (rarity == CardRarity.Legendary)
|
||||
{
|
||||
InitializeLookups();
|
||||
return legendaryBackground;
|
||||
}
|
||||
|
||||
// Return the sprite if found, otherwise null
|
||||
if (_zoneShapeLookup.TryGetValue(zone, out Sprite sprite))
|
||||
// Normal and Rare cards use zone background
|
||||
if (_zoneLookup.TryGetValue(zone, out ZoneVisualMapping mapping))
|
||||
{
|
||||
return sprite;
|
||||
return mapping.background;
|
||||
}
|
||||
|
||||
Logging.Warning($"[CardVisualConfig] No background mapping found for zone {zone}");
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the shape sprite for a card based on zone and rarity
|
||||
/// Legendary cards don't display shapes (returns null)
|
||||
/// </summary>
|
||||
public Sprite GetZoneShape(CardZone zone, CardRarity rarity)
|
||||
{
|
||||
if (_zoneLookup == null) InitializeLookups();
|
||||
|
||||
// Legendary cards don't have shapes
|
||||
if (rarity == CardRarity.Legendary)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_zoneLookup.TryGetValue(zone, out ZoneVisualMapping mapping))
|
||||
{
|
||||
// Return shape based on rarity
|
||||
return rarity == CardRarity.Rare ? mapping.shapeRare : mapping.shapeNormal;
|
||||
}
|
||||
|
||||
Logging.Warning($"[CardVisualConfig] No shape mapping found for zone {zone}");
|
||||
@@ -135,46 +158,25 @@ namespace AppleHills.Data.CardSystem
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Editor-only utility to reset the config with default values
|
||||
/// Editor-only utility to initialize the config with default structure
|
||||
/// </summary>
|
||||
public void ResetWithDefaults()
|
||||
public void InitializeDefaults()
|
||||
{
|
||||
// Clear existing mappings
|
||||
rarityColors.Clear();
|
||||
rarityVisuals.Clear();
|
||||
zoneVisuals.Clear();
|
||||
|
||||
// Add default rarity colors
|
||||
rarityColors.Add(new RarityColorMapping { rarity = CardRarity.Common, color = Color.gray });
|
||||
rarityColors.Add(new RarityColorMapping { rarity = CardRarity.Uncommon, color = Color.green });
|
||||
rarityColors.Add(new RarityColorMapping { rarity = CardRarity.Rare, color = Color.blue });
|
||||
rarityColors.Add(new RarityColorMapping { rarity = CardRarity.Epic, color = new Color(0.5f, 0, 0.5f) });
|
||||
rarityColors.Add(new RarityColorMapping { rarity = CardRarity.Legendary, color = Color.yellow });
|
||||
// Add entries for all rarities
|
||||
foreach (CardRarity rarity in Enum.GetValues(typeof(CardRarity)))
|
||||
{
|
||||
rarityVisuals.Add(new RarityVisualMapping { rarity = rarity });
|
||||
}
|
||||
|
||||
// Add default zone colors
|
||||
zoneVisuals.Add(new ZoneVisualMapping {
|
||||
zone = CardZone.AppleHills,
|
||||
color = new Color(0.8f, 0.9f, 0.8f)
|
||||
});
|
||||
|
||||
zoneVisuals.Add(new ZoneVisualMapping {
|
||||
zone = CardZone.Quarry,
|
||||
color = new Color(0.85f, 0.8f, 0.7f)
|
||||
});
|
||||
|
||||
zoneVisuals.Add(new ZoneVisualMapping {
|
||||
zone = CardZone.Forest,
|
||||
color = new Color(0.6f, 0.8f, 0.6f)
|
||||
});
|
||||
|
||||
zoneVisuals.Add(new ZoneVisualMapping {
|
||||
zone = CardZone.Mountain,
|
||||
color = new Color(0.7f, 0.7f, 0.9f)
|
||||
});
|
||||
|
||||
zoneVisuals.Add(new ZoneVisualMapping {
|
||||
zone = CardZone.Beach,
|
||||
color = new Color(0.9f, 0.85f, 0.7f)
|
||||
});
|
||||
// Add entries for all zones
|
||||
foreach (CardZone zone in Enum.GetValues(typeof(CardZone)))
|
||||
{
|
||||
zoneVisuals.Add(new ZoneVisualMapping { zone = zone });
|
||||
}
|
||||
|
||||
// Initialize the lookups
|
||||
InitializeLookups();
|
||||
@@ -193,9 +195,9 @@ namespace AppleHills.Data.CardSystem
|
||||
CardVisualConfig config = (CardVisualConfig)target;
|
||||
|
||||
UnityEditor.EditorGUILayout.Space();
|
||||
if (GUILayout.Button("Reset with Defaults"))
|
||||
if (GUILayout.Button("Initialize Default Structure"))
|
||||
{
|
||||
config.ResetWithDefaults();
|
||||
config.InitializeDefaults();
|
||||
UnityEditor.EditorUtility.SetDirty(config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
/*
|
||||
using UnityEngine;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
@@ -15,8 +16,8 @@ namespace AppleHills.Tests
|
||||
/// </summary>
|
||||
public class CardSystemTester : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
[SerializeField] private CardAlbumUI cardAlbumUI;
|
||||
// [Header("References")]
|
||||
[SerializeField] private GameObject cardAlbumUI;
|
||||
|
||||
[Header("Test Settings")]
|
||||
[SerializeField] [Range(1, 10)] private int boosterPacksToAdd = 3;
|
||||
@@ -30,13 +31,13 @@ namespace AppleHills.Tests
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Auto-find references if needed
|
||||
if (cardAlbumUI == null)
|
||||
cardAlbumUI = FindAnyObjectByType<CardAlbumUI>();
|
||||
|
||||
// Log missing references
|
||||
if (cardAlbumUI == null)
|
||||
Debug.LogError("CardSystemTester: No CardAlbumUI found in the scene!");
|
||||
// // Auto-find references if needed
|
||||
// if (cardAlbumUI == null)
|
||||
// cardAlbumUI = FindAnyObjectByType<CardAlbumUI>();
|
||||
//
|
||||
// // Log missing references
|
||||
// if (cardAlbumUI == null)
|
||||
// Debug.LogError("CardSystemTester: No CardAlbumUI found in the scene!");
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -249,3 +250,4 @@ public class ReadOnlyDrawer : PropertyDrawer
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace UI.CardSystem
|
||||
|
||||
// Runtime references
|
||||
private CardSystemManager _cardManager;
|
||||
private List<CardUIElement> _displayedCards = new List<CardUIElement>();
|
||||
private List<CardDisplay> _displayedCards = new List<CardDisplay>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -98,12 +98,13 @@ namespace UI.CardSystem
|
||||
GameObject cardObj = Instantiate(cardPrefab, albumGrid.transform);
|
||||
|
||||
// Configure the card UI with the card data
|
||||
CardUIElement cardUI = cardObj.GetComponent<CardUIElement>();
|
||||
if (cardUI != null)
|
||||
{
|
||||
cardUI.SetupCard(cardData);
|
||||
_displayedCards.Add(cardUI);
|
||||
}
|
||||
// TODO: Update this to use your actual CardDisplay component
|
||||
// CardUIElement cardUI = cardObj.GetComponent<CardUIElement>();
|
||||
// if (cardUI != null)
|
||||
// {
|
||||
// cardUI.SetupCard(cardData);
|
||||
// _displayedCards.Add(cardUI);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
using Pixelplacement;
|
||||
using Pixelplacement.TweenSystem;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages a notification dot that displays a count (e.g., booster packs)
|
||||
/// Can be reused across different UI elements that need to show numeric notifications
|
||||
/// </summary>
|
||||
public class BoosterNotificationDot : MonoBehaviour
|
||||
{
|
||||
[Header("UI References")]
|
||||
[SerializeField] private GameObject dotBackground;
|
||||
[SerializeField] private TextMeshProUGUI countText;
|
||||
|
||||
[Header("Settings")]
|
||||
[SerializeField] private bool hideWhenZero = true;
|
||||
[SerializeField] private bool useAnimation = false;
|
||||
[SerializeField] private string textPrefix = "";
|
||||
[SerializeField] private string textSuffix = "";
|
||||
[SerializeField] private Color textColor = Color.white;
|
||||
|
||||
[Header("Animation")]
|
||||
[SerializeField] private bool useTween = true;
|
||||
[SerializeField] private float pulseDuration = 0.3f;
|
||||
[SerializeField] private float pulseScale = 1.2f;
|
||||
|
||||
// Optional animator reference
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField] private string animationTrigger = "Update";
|
||||
|
||||
// Current count value
|
||||
private int _currentCount;
|
||||
private Vector3 _originalScale;
|
||||
|
||||
private TweenBase _activeTween;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Store original scale for pulse animation
|
||||
if (dotBackground != null)
|
||||
{
|
||||
_originalScale = dotBackground.transform.localScale;
|
||||
}
|
||||
|
||||
// Apply text color
|
||||
if (countText != null)
|
||||
{
|
||||
countText.color = textColor;
|
||||
}
|
||||
|
||||
// Initial setup based on current count
|
||||
SetCount(_currentCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the count displayed on the notification dot
|
||||
/// Also handles visibility based on settings
|
||||
/// </summary>
|
||||
public void SetCount(int count)
|
||||
{
|
||||
bool countChanged = count != _currentCount;
|
||||
_currentCount = count;
|
||||
|
||||
// Update text
|
||||
if (countText != null)
|
||||
{
|
||||
countText.text = textPrefix + count.ToString() + textSuffix;
|
||||
}
|
||||
|
||||
// Handle visibility
|
||||
if (hideWhenZero)
|
||||
{
|
||||
SetVisibility(count > 0);
|
||||
}
|
||||
|
||||
// Play animation if value changed and animation is enabled
|
||||
if (countChanged && count > 0)
|
||||
{
|
||||
if (useAnimation)
|
||||
{
|
||||
Animate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current count value
|
||||
/// </summary>
|
||||
public int GetCount()
|
||||
{
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set text formatting options
|
||||
/// </summary>
|
||||
public void SetFormatting(string prefix, string suffix, Color color)
|
||||
{
|
||||
textPrefix = prefix;
|
||||
textSuffix = suffix;
|
||||
textColor = color;
|
||||
|
||||
if (countText != null)
|
||||
{
|
||||
countText.color = color;
|
||||
// Update text with new formatting
|
||||
countText.text = textPrefix + _currentCount.ToString() + textSuffix;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Explicitly control the notification dot visibility
|
||||
/// </summary>
|
||||
public void SetVisibility(bool isVisible)
|
||||
{
|
||||
if (dotBackground != null)
|
||||
{
|
||||
dotBackground.SetActive(isVisible);
|
||||
}
|
||||
|
||||
if (countText != null)
|
||||
{
|
||||
countText.gameObject.SetActive(isVisible);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the notification dot
|
||||
/// </summary>
|
||||
public void Show()
|
||||
{
|
||||
SetVisibility(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide the notification dot
|
||||
/// </summary>
|
||||
public void Hide()
|
||||
{
|
||||
SetVisibility(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play animation manually - either using Animator or Tween
|
||||
/// </summary>
|
||||
public void Animate()
|
||||
{
|
||||
if (useAnimation)
|
||||
{
|
||||
if (animator != null)
|
||||
{
|
||||
animator.SetTrigger(animationTrigger);
|
||||
}
|
||||
else if (useTween && dotBackground != null)
|
||||
{
|
||||
// Cancel any existing tweens on this transform
|
||||
_activeTween.Cancel();
|
||||
|
||||
// Reset to original scale
|
||||
dotBackground.transform.localScale = _originalScale;
|
||||
|
||||
// Pulse animation using Tween
|
||||
_activeTween = Tween.LocalScale(dotBackground.transform,
|
||||
_originalScale * pulseScale,
|
||||
pulseDuration/2,
|
||||
0,
|
||||
Tween.EaseOut,
|
||||
Tween.LoopType.None,
|
||||
null,
|
||||
() => {
|
||||
// Scale back to original size
|
||||
Tween.LocalScale(dotBackground.transform,
|
||||
_originalScale,
|
||||
pulseDuration/2,
|
||||
0,
|
||||
Tween.EaseIn);
|
||||
},
|
||||
obeyTimescale: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed8cced1478640229c5a61e3c6bd42df
|
||||
timeCreated: 1760710148
|
||||
@@ -1,626 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Core;
|
||||
using Data.CardSystem;
|
||||
using Pixelplacement;
|
||||
using UI.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// UI page for opening booster packs and displaying the cards obtained.
|
||||
/// </summary>
|
||||
public class BoosterOpeningPage : UIPage
|
||||
{
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private GameObject boosterPackObject;
|
||||
[SerializeField] private RectTransform cardRevealContainer; // This should have a HorizontalLayoutGroup component with pre-populated card backs
|
||||
[SerializeField] private GameObject cardPrefab;
|
||||
[SerializeField] private Button openBoosterButton;
|
||||
[SerializeField] private Button continueButton;
|
||||
[SerializeField] private CanvasGroup canvasGroup;
|
||||
|
||||
[Header("Navigation")]
|
||||
[SerializeField] private Button backButton;
|
||||
|
||||
[Header("Animation Settings")]
|
||||
[SerializeField] private float cardRevealDelay = 0.3f;
|
||||
[SerializeField] private float flipAnimationDuration = 0.5f;
|
||||
|
||||
// State tracking
|
||||
private enum OpeningState
|
||||
{
|
||||
BoosterReady,
|
||||
CardBacksVisible,
|
||||
CardsRevealing,
|
||||
CardsRevealed,
|
||||
MovingToBackpack,
|
||||
Completed
|
||||
}
|
||||
|
||||
private OpeningState _currentState = OpeningState.BoosterReady;
|
||||
private List<CardUIElement> _revealedCards = new List<CardUIElement>();
|
||||
private List<Button> _cardBackButtons = new List<Button>();
|
||||
private List<CardData> _boosterCards = new List<CardData>();
|
||||
private int _revealedCardCount = 0;
|
||||
private CardSystemManager _cardManager;
|
||||
private CardAlbumUI _cardAlbumUI;
|
||||
private Coroutine _moveToBackpackCoroutine;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_cardManager = CardSystemManager.Instance;
|
||||
_cardAlbumUI = FindFirstObjectByType<CardAlbumUI>();
|
||||
|
||||
// Set up button listeners
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.onClick.AddListener(OnOpenBoosterClicked);
|
||||
}
|
||||
|
||||
if (continueButton != null)
|
||||
{
|
||||
continueButton.onClick.AddListener(OnContinueClicked);
|
||||
continueButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Set up back button
|
||||
if (backButton != null)
|
||||
{
|
||||
backButton.onClick.AddListener(OnBackButtonClicked);
|
||||
}
|
||||
|
||||
// Make sure we have a CanvasGroup for transitions
|
||||
if (canvasGroup == null)
|
||||
canvasGroup = GetComponent<CanvasGroup>();
|
||||
if (canvasGroup == null)
|
||||
canvasGroup = gameObject.AddComponent<CanvasGroup>();
|
||||
|
||||
// Cache card back buttons from container
|
||||
CacheCardBackButtons();
|
||||
|
||||
// Initially hide all card backs
|
||||
HideAllCardBacks();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cache all card back buttons from the container
|
||||
/// </summary>
|
||||
private void CacheCardBackButtons()
|
||||
{
|
||||
_cardBackButtons.Clear();
|
||||
|
||||
if (cardRevealContainer != null)
|
||||
{
|
||||
// Get all buttons in the container (these are our card backs)
|
||||
Button[] buttonsInContainer = cardRevealContainer.GetComponentsInChildren<Button>(true);
|
||||
_cardBackButtons.AddRange(buttonsInContainer);
|
||||
|
||||
Debug.Log($"[BoosterOpeningPage] Found {_cardBackButtons.Count} card back buttons in container");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("[BoosterOpeningPage] Card reveal container is null, can't find card backs!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hides all card backs in the container
|
||||
/// </summary>
|
||||
private void HideAllCardBacks()
|
||||
{
|
||||
foreach (var cardBack in _cardBackButtons)
|
||||
{
|
||||
if (cardBack != null && cardBack.gameObject != null)
|
||||
{
|
||||
cardBack.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Clean up button listeners
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.onClick.RemoveListener(OnOpenBoosterClicked);
|
||||
}
|
||||
|
||||
if (continueButton != null)
|
||||
{
|
||||
continueButton.onClick.RemoveListener(OnContinueClicked);
|
||||
}
|
||||
|
||||
if (backButton != null)
|
||||
{
|
||||
backButton.onClick.RemoveListener(OnBackButtonClicked);
|
||||
}
|
||||
|
||||
// Stop any running coroutines
|
||||
if (_moveToBackpackCoroutine != null)
|
||||
StopCoroutine(_moveToBackpackCoroutine);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the back button
|
||||
/// </summary>
|
||||
private void OnBackButtonClicked()
|
||||
{
|
||||
// Don't allow going back during animations or card reveals
|
||||
if (_currentState == OpeningState.CardsRevealing ||
|
||||
_currentState == OpeningState.MovingToBackpack)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Use the UIPageController to go back to the previous page
|
||||
UIPageController pageController = UIPageController.Instance;
|
||||
if (pageController != null)
|
||||
{
|
||||
pageController.PopPage();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the page to its initial state when it becomes active
|
||||
/// </summary>
|
||||
public override void TransitionIn()
|
||||
{
|
||||
base.TransitionIn();
|
||||
|
||||
ResetState();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the state of the booster opening process
|
||||
/// </summary>
|
||||
private void ResetState()
|
||||
{
|
||||
// Clear any previously revealed cards
|
||||
foreach (var card in _revealedCards)
|
||||
{
|
||||
if (card != null && card.gameObject != null)
|
||||
Destroy(card.gameObject);
|
||||
}
|
||||
_revealedCards.Clear();
|
||||
|
||||
// Re-cache card backs in case they changed
|
||||
CacheCardBackButtons();
|
||||
|
||||
// Reset all card backs - both visibility and scale
|
||||
foreach (var cardBack in _cardBackButtons)
|
||||
{
|
||||
if (cardBack != null && cardBack.gameObject != null)
|
||||
{
|
||||
cardBack.gameObject.SetActive(false);
|
||||
cardBack.transform.localScale = Vector3.one; // Reset scale
|
||||
cardBack.transform.localRotation = Quaternion.identity; // Reset rotation
|
||||
}
|
||||
}
|
||||
|
||||
// Reset state
|
||||
_currentState = OpeningState.BoosterReady;
|
||||
_revealedCardCount = 0;
|
||||
_boosterCards.Clear();
|
||||
|
||||
// Show booster pack, show open button, hide continue button
|
||||
if (boosterPackObject != null)
|
||||
{
|
||||
boosterPackObject.SetActive(true);
|
||||
boosterPackObject.transform.localScale = Vector3.one; // Reset scale
|
||||
boosterPackObject.transform.localRotation = Quaternion.identity; // Reset rotation
|
||||
}
|
||||
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
if (continueButton != null)
|
||||
{
|
||||
continueButton.gameObject.SetActive(false);
|
||||
continueButton.transform.localScale = Vector3.one; // Reset scale
|
||||
}
|
||||
|
||||
// Make back button visible
|
||||
if (backButton != null)
|
||||
{
|
||||
backButton.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
Debug.Log("[BoosterOpeningPage] State reset complete, all scales and rotations reset to defaults");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the booster pack to open it
|
||||
/// </summary>
|
||||
private void OnOpenBoosterClicked()
|
||||
{
|
||||
if (_currentState != OpeningState.BoosterReady) return;
|
||||
|
||||
_currentState = OpeningState.CardBacksVisible;
|
||||
|
||||
// Open the booster pack and get the cards
|
||||
_boosterCards = _cardManager.OpenBoosterPack();
|
||||
|
||||
if (_boosterCards.Count > 0)
|
||||
{
|
||||
// Hide the booster pack and open button
|
||||
if (boosterPackObject != null)
|
||||
{
|
||||
// Animate the booster pack opening
|
||||
Tween.LocalScale(boosterPackObject.transform, Vector3.zero, 0.3f, 0f, Tween.EaseInBack, Tween.LoopType.None, null, () => {
|
||||
boosterPackObject.SetActive(false);
|
||||
}, obeyTimescale: false);
|
||||
}
|
||||
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Show card backs first
|
||||
StartCoroutine(ShowCardBacks());
|
||||
}
|
||||
else
|
||||
{
|
||||
Logging.Warning("[BoosterOpeningPage] No cards were obtained from the booster pack.");
|
||||
UIPageController.Instance.PopPage();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows card backs in the reveal positions
|
||||
/// </summary>
|
||||
private IEnumerator ShowCardBacks()
|
||||
{
|
||||
// Wait a short delay before showing card backs
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
// Check if we have proper container setup
|
||||
if (cardRevealContainer == null)
|
||||
{
|
||||
Debug.LogError("[BoosterOpeningPage] Card reveal container is null!");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Check if we found any card backs
|
||||
if (_cardBackButtons.Count == 0)
|
||||
{
|
||||
Debug.LogError("[BoosterOpeningPage] No card back buttons found in container!");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Determine how many cards to show based on the booster cards and available card backs
|
||||
int cardsToShow = Mathf.Min(_boosterCards.Count, _cardBackButtons.Count);
|
||||
|
||||
// Activate and animate the card backs
|
||||
for (int i = 0; i < cardsToShow; i++)
|
||||
{
|
||||
Button cardBack = _cardBackButtons[i];
|
||||
if (cardBack == null) continue;
|
||||
|
||||
GameObject cardBackObj = cardBack.gameObject;
|
||||
|
||||
// Ensure the card back is active
|
||||
cardBackObj.SetActive(true);
|
||||
|
||||
// Store the index for later reference when clicked
|
||||
int cardIndex = i;
|
||||
|
||||
// Configure the button
|
||||
cardBack.onClick.RemoveAllListeners(); // Clear any previous listeners
|
||||
cardBack.onClick.AddListener(() => OnCardBackClicked(cardIndex));
|
||||
|
||||
// Set initial scale to zero for animation
|
||||
cardBackObj.transform.localScale = Vector3.zero;
|
||||
|
||||
Debug.Log($"[BoosterOpeningPage] Card back {i} activated");
|
||||
|
||||
// Play reveal animation using Pixelplacement.Tween
|
||||
Tween.LocalScale(cardBackObj.transform, Vector3.one, 0.5f, 0f, Tween.EaseOutBack, obeyTimescale: false);
|
||||
|
||||
// Wait for animation delay
|
||||
yield return new WaitForSeconds(cardRevealDelay);
|
||||
}
|
||||
|
||||
// Update state
|
||||
_currentState = OpeningState.CardBacksVisible;
|
||||
Debug.Log($"[BoosterOpeningPage] All {cardsToShow} card backs should now be visible");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on a card back to reveal the card
|
||||
/// </summary>
|
||||
private void OnCardBackClicked(int cardIndex)
|
||||
{
|
||||
Logging.Debug($"[BoosterOpeningPage] Card back clicked at index {cardIndex}");
|
||||
|
||||
// Only respond to clicks when in the appropriate state
|
||||
if (_currentState != OpeningState.CardBacksVisible)
|
||||
{
|
||||
Logging.Warning($"[BoosterOpeningPage] Card clicked in wrong state: {_currentState}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the index is valid
|
||||
if (cardIndex < 0 || cardIndex >= _boosterCards.Count || cardIndex >= _cardBackButtons.Count)
|
||||
{
|
||||
Debug.LogError($"[BoosterOpeningPage] Invalid card index: {cardIndex}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the card data and card back
|
||||
CardData cardData = _boosterCards[cardIndex];
|
||||
Button cardBack = _cardBackButtons[cardIndex];
|
||||
|
||||
// Start the reveal animation for this specific card
|
||||
StartCoroutine(RevealCard(cardIndex, cardData, cardBack.gameObject));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reveals an individual card with animation
|
||||
/// </summary>
|
||||
private IEnumerator RevealCard(int cardIndex, CardData cardData, GameObject cardBack)
|
||||
{
|
||||
if (cardBack == null)
|
||||
yield break;
|
||||
|
||||
// Start flip animation
|
||||
Transform cardBackTransform = cardBack.transform;
|
||||
|
||||
// Step 1: Flip the card 90 degrees (showing the edge)
|
||||
Tween.LocalRotation(cardBackTransform, new Vector3(0, 90, 0), flipAnimationDuration * 0.5f, 0, obeyTimescale: false);
|
||||
|
||||
// Wait for half the flip duration
|
||||
yield return new WaitForSeconds(flipAnimationDuration * 0.5f);
|
||||
|
||||
// Step 2: Hide the card back and show the actual card
|
||||
cardBack.SetActive(false);
|
||||
|
||||
// Instantiate the card prefab at the same position
|
||||
if (cardPrefab != null)
|
||||
{
|
||||
// Instantiate the card in the same parent as the card back and at the same position
|
||||
GameObject cardObj = Instantiate(cardPrefab, cardBack.transform.parent);
|
||||
cardObj.transform.SetSiblingIndex(cardBackTransform.GetSiblingIndex()); // Keep the same order in hierarchy
|
||||
cardObj.transform.position = cardBackTransform.position; // Same world position
|
||||
|
||||
// Set initial rotation to continue the flip animation
|
||||
cardObj.transform.localRotation = Quaternion.Euler(0, 90, 0);
|
||||
|
||||
// Configure the card UI with the card data
|
||||
CardUIElement cardUI = cardObj.GetComponent<CardUIElement>();
|
||||
if (cardUI != null)
|
||||
{
|
||||
cardUI.SetupCard(cardData);
|
||||
_revealedCards.Add(cardUI);
|
||||
|
||||
// Play special effects based on card rarity
|
||||
PlayRevealEffect(cardObj, cardData.Rarity);
|
||||
}
|
||||
|
||||
// Step 3: Finish the flip animation (from 90 degrees to 0)
|
||||
Tween.LocalRotation(cardObj.transform, Vector3.zero, flipAnimationDuration * 0.5f, 0, obeyTimescale: false);
|
||||
|
||||
// Increment counter of revealed cards
|
||||
_revealedCardCount++;
|
||||
|
||||
// Update state if all cards are revealed
|
||||
if (_revealedCardCount >= _boosterCards.Count)
|
||||
{
|
||||
_currentState = OpeningState.CardsRevealed;
|
||||
|
||||
// Show continue button after a short delay
|
||||
StartCoroutine(ShowContinueButton());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Plays reveal effect for a card based on its rarity
|
||||
/// </summary>
|
||||
private void PlayRevealEffect(GameObject cardObject, CardRarity rarity)
|
||||
{
|
||||
// Add visual effect based on rarity
|
||||
if (rarity >= CardRarity.Rare)
|
||||
{
|
||||
// For rare cards and above, add a particle effect
|
||||
var particleSystem = cardObject.GetComponentInChildren<ParticleSystem>();
|
||||
if (particleSystem != null)
|
||||
{
|
||||
particleSystem.Play();
|
||||
}
|
||||
|
||||
// Scale up and down for emphasis
|
||||
Transform cardTransform = cardObject.transform;
|
||||
Vector3 originalScale = cardTransform.localScale;
|
||||
|
||||
// Sequence: Scale up slightly, then back to normal
|
||||
Tween.LocalScale(cardTransform, originalScale * 1.2f, 0.2f, 0.1f, Tween.EaseOutBack, obeyTimescale: false);
|
||||
Tween.LocalScale(cardTransform, originalScale, 0.15f, 0.3f, Tween.EaseIn, obeyTimescale: false);
|
||||
|
||||
// Play sound effect based on rarity (if available)
|
||||
// This would require audio source components to be set up
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows the continue button after all cards are revealed
|
||||
/// </summary>
|
||||
private IEnumerator ShowContinueButton()
|
||||
{
|
||||
// Wait for a moment to let the user see all cards
|
||||
yield return new WaitForSeconds(1.0f);
|
||||
|
||||
if (continueButton != null)
|
||||
{
|
||||
// Show the continue button with a nice animation
|
||||
continueButton.gameObject.SetActive(true);
|
||||
continueButton.transform.localScale = Vector3.zero;
|
||||
|
||||
Tween.LocalScale(continueButton.transform, Vector3.one, 0.3f, 0f, Tween.EaseOutBack, obeyTimescale: false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the continue button
|
||||
/// </summary>
|
||||
private void OnContinueClicked()
|
||||
{
|
||||
if (_currentState != OpeningState.CardsRevealed) return;
|
||||
|
||||
_currentState = OpeningState.MovingToBackpack;
|
||||
|
||||
// Hide continue button
|
||||
if (continueButton != null)
|
||||
{
|
||||
continueButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Hide back button during transition
|
||||
if (backButton != null)
|
||||
{
|
||||
backButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Start animation to move cards to backpack
|
||||
_moveToBackpackCoroutine = StartCoroutine(MoveCardsToBackpack());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Animates cards moving to the backpack icon
|
||||
/// </summary>
|
||||
private IEnumerator MoveCardsToBackpack()
|
||||
{
|
||||
// Find the backpack button GameObject
|
||||
GameObject backpackButton = null;
|
||||
Transform backpackTransform = null;
|
||||
|
||||
if (_cardAlbumUI != null && _cardAlbumUI.BackpackIcon != null)
|
||||
{
|
||||
// Get the backpack icon
|
||||
GameObject backpackIcon = _cardAlbumUI.BackpackIcon;
|
||||
backpackTransform = backpackIcon.transform;
|
||||
|
||||
// Find the parent button that controls visibility
|
||||
backpackButton = backpackIcon.transform.parent.gameObject;
|
||||
|
||||
// Make sure the backpack button is visible for the animation
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.SetActive(true);
|
||||
Debug.Log("[BoosterOpeningPage] Made backpack button visible for animation");
|
||||
}
|
||||
}
|
||||
|
||||
if (backpackTransform == null)
|
||||
{
|
||||
// If no backpack is found, just return to the menu
|
||||
UIPageController.Instance.PopPage();
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Speed up the animation by reducing the delay
|
||||
float animationDuration = 0.3f; // Faster animation duration
|
||||
float cardDelay = 0.15f; // Even shorter delay between cards
|
||||
|
||||
// Move each card to the backpack with slight delay between cards
|
||||
for (int i = 0; i < _revealedCards.Count; i++)
|
||||
{
|
||||
CardUIElement card = _revealedCards[i];
|
||||
if (card != null)
|
||||
{
|
||||
// Get the world position of the backpack
|
||||
Vector3 backpackWorldPos = backpackTransform.position;
|
||||
|
||||
// Convert to local space of the card's parent for Tween
|
||||
Vector3 targetPos = card.transform.parent.InverseTransformPoint(backpackWorldPos);
|
||||
|
||||
// Start the move animation - ensure no cancellation between animations
|
||||
Tween.LocalPosition(card.transform, targetPos, animationDuration, cardDelay * i, Tween.EaseInOut, obeyTimescale: false);
|
||||
Tween.LocalScale(card.transform, Vector3.zero, animationDuration, cardDelay * i, Tween.EaseIn, obeyTimescale: false);
|
||||
|
||||
Debug.Log($"[BoosterOpeningPage] Starting animation for card {i}");
|
||||
}
|
||||
|
||||
// Only wait after starting each animation (don't wait after the last one)
|
||||
if (i < _revealedCards.Count - 1)
|
||||
{
|
||||
yield return new WaitForSeconds(cardDelay);
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate total animation time and wait for it to complete
|
||||
float totalAnimationTime = cardDelay * (_revealedCards.Count - 1) + animationDuration;
|
||||
yield return new WaitForSeconds(totalAnimationTime + 0.1f); // Small buffer to ensure animations complete
|
||||
|
||||
// The backpack visibility will be handled by CardAlbumUI's OnPageChanged after popping this page
|
||||
// We don't need to explicitly hide it here as the system will handle it properly
|
||||
|
||||
// Update state
|
||||
_currentState = OpeningState.Completed;
|
||||
|
||||
// Return to the menu
|
||||
UIPageController.Instance.PopPage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override for transition in animation using Pixelplacement.Tween
|
||||
/// </summary>
|
||||
protected override void DoTransitionIn(System.Action onComplete)
|
||||
{
|
||||
// Simple fade in animation
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
canvasGroup.alpha = 0f;
|
||||
Tween.Value(0f, 1f, (value) => canvasGroup.alpha = value, transitionDuration, 0f, Tween.EaseInOut, Tween.LoopType.None, null, onComplete, obeyTimescale: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback if no CanvasGroup
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override for transition out animation using Pixelplacement.Tween
|
||||
/// </summary>
|
||||
protected override void DoTransitionOut(System.Action onComplete)
|
||||
{
|
||||
// Simple fade out animation
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
Tween.Value(canvasGroup.alpha, 0f, (value) => canvasGroup.alpha = value, transitionDuration, 0f, Tween.EaseInOut, Tween.LoopType.None, null, onComplete, obeyTimescale: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback if no CanvasGroup
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OnEnable override to ensure proper initialization
|
||||
/// </summary>
|
||||
private void OnEnable()
|
||||
{
|
||||
if (_cardManager == null)
|
||||
{
|
||||
_cardManager = CardSystemManager.Instance;
|
||||
}
|
||||
|
||||
if (_cardAlbumUI == null)
|
||||
{
|
||||
_cardAlbumUI = FindFirstObjectByType<CardAlbumUI>();
|
||||
}
|
||||
|
||||
// Re-cache card backs in case they changed while disabled
|
||||
CacheCardBackButtons();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f64698442ba344e0a466ee3c530797c7
|
||||
timeCreated: 1759923862
|
||||
@@ -1,340 +0,0 @@
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using Data.CardSystem;
|
||||
using Pixelplacement;
|
||||
using UI.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Main UI controller for the card album system.
|
||||
/// Manages the backpack icon and navigation between card system pages.
|
||||
/// </summary>
|
||||
public class CardAlbumUI : MonoBehaviour
|
||||
{
|
||||
[Header("UI References")]
|
||||
[SerializeField] private GameObject backpackIcon;
|
||||
[SerializeField] private UIPage mainMenuPage;
|
||||
[SerializeField] private UIPage albumViewPage;
|
||||
[SerializeField] private UIPage boosterOpeningPage;
|
||||
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private Button backpackButton;
|
||||
[SerializeField] private BoosterNotificationDot boosterNotificationDot;
|
||||
|
||||
[Header("Notification Settings")]
|
||||
[SerializeField] private AudioSource notificationSound;
|
||||
|
||||
// Public property to access the backpack icon for animations
|
||||
public GameObject BackpackIcon => backpackIcon;
|
||||
private UIPageController PageController => UIPageController.Instance;
|
||||
private CardSystemManager _cardManager;
|
||||
private bool _hasUnseenCards;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Set up backpack button
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.onClick.AddListener(OnBackpackButtonClicked);
|
||||
}
|
||||
|
||||
// Hide notification dot initially
|
||||
if (boosterNotificationDot != null)
|
||||
boosterNotificationDot.gameObject.SetActive(false);
|
||||
|
||||
// Register for post-boot initialization
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot);
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
// Initially show only the backpack icon
|
||||
ShowOnlyBackpackIcon();
|
||||
|
||||
// Initialize pages and hide them
|
||||
InitializePages();
|
||||
|
||||
// React to global UI hide/show events (top-page only) by toggling this GameObject
|
||||
if (UIPageController.Instance != null)
|
||||
{
|
||||
UIPageController.Instance.OnAllUIHidden += HandleAllUIHidden;
|
||||
UIPageController.Instance.OnAllUIShown += HandleAllUIShown;
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Get card manager
|
||||
_cardManager = CardSystemManager.Instance;
|
||||
|
||||
// Subscribe to events
|
||||
if (_cardManager != null)
|
||||
{
|
||||
_cardManager.OnBoosterCountChanged += UpdateBoosterCount;
|
||||
_cardManager.OnBoosterOpened += HandleBoosterOpened;
|
||||
_cardManager.OnCardCollected += HandleCardCollected;
|
||||
_cardManager.OnCardRarityUpgraded += HandleCardRarityUpgraded;
|
||||
|
||||
// Initialize UI with current values
|
||||
UpdateBoosterCount(_cardManager.GetBoosterPackCount());
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Unsubscribe from events
|
||||
if (_cardManager != null)
|
||||
{
|
||||
_cardManager.OnBoosterCountChanged -= UpdateBoosterCount;
|
||||
_cardManager.OnBoosterOpened -= HandleBoosterOpened;
|
||||
_cardManager.OnCardCollected -= HandleCardCollected;
|
||||
_cardManager.OnCardRarityUpgraded -= HandleCardRarityUpgraded;
|
||||
}
|
||||
|
||||
// Clean up button listeners
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.onClick.RemoveListener(OnBackpackButtonClicked);
|
||||
}
|
||||
|
||||
// Unsubscribe from page controller events
|
||||
if (PageController != null)
|
||||
{
|
||||
PageController.OnPageChanged -= OnPageChanged;
|
||||
}
|
||||
|
||||
// Unsubscribe from global UI hide/show events
|
||||
if (UIPageController.Instance != null)
|
||||
{
|
||||
UIPageController.Instance.OnAllUIHidden -= HandleAllUIHidden;
|
||||
UIPageController.Instance.OnAllUIShown -= HandleAllUIShown;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes all UI pages and sets them up with proper callbacks
|
||||
/// </summary>
|
||||
private void InitializePages()
|
||||
{
|
||||
// Ensure all pages are inactive at start
|
||||
if (mainMenuPage != null)
|
||||
{
|
||||
mainMenuPage.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (albumViewPage != null)
|
||||
{
|
||||
albumViewPage.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (boosterOpeningPage != null)
|
||||
{
|
||||
boosterOpeningPage.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
// Set up page changed callback
|
||||
if (PageController != null)
|
||||
{
|
||||
PageController.OnPageChanged += OnPageChanged;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the backpack icon
|
||||
/// </summary>
|
||||
private void OnBackpackButtonClicked()
|
||||
{
|
||||
// Play button sound if available
|
||||
if (notificationSound != null)
|
||||
notificationSound.Play();
|
||||
|
||||
PageController.PushPage(mainMenuPage);
|
||||
|
||||
// Clear notification for unseen cards when opening menu
|
||||
if (_hasUnseenCards)
|
||||
{
|
||||
_hasUnseenCards = false;
|
||||
}
|
||||
|
||||
// Hide the backpack button when entering menu
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
GameManager.Instance.RequestPause(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles changes to the current page
|
||||
/// </summary>
|
||||
private void OnPageChanged(UIPage newPage)
|
||||
{
|
||||
// Hide/show backpack icon based on current page
|
||||
if (newPage == null)
|
||||
{
|
||||
ShowOnlyBackpackIcon();
|
||||
GameManager.Instance.ReleasePause(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if any page in the stack has "Card" or "Album" in the name
|
||||
bool hasCardOrAlbumPage = false;
|
||||
if (PageController != null && PageController.PageStack != null)
|
||||
{
|
||||
foreach (var page in PageController.PageStack)
|
||||
{
|
||||
if (page != null && page.PageName != null)
|
||||
{
|
||||
if (page.PageName.Contains("Card") || page.PageName.Contains("Album"))
|
||||
{
|
||||
hasCardOrAlbumPage = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hide backpack button if there's a card/album page in the stack
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.gameObject.SetActive(!hasCardOrAlbumPage);
|
||||
}
|
||||
}
|
||||
|
||||
// Update menu if it's the main menu page
|
||||
if (newPage == mainMenuPage && mainMenuPage is CardMenuPage menuPage)
|
||||
{
|
||||
// Force UI refresh when returning to main menu
|
||||
menuPage.RefreshUI();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows only the backpack icon, hiding all other UI elements
|
||||
/// </summary>
|
||||
private void ShowOnlyBackpackIcon()
|
||||
{
|
||||
if (backpackButton != null)
|
||||
{
|
||||
backpackButton.gameObject.SetActive(true);
|
||||
|
||||
// Update notification visibility based on booster count
|
||||
bool hasBooters = _cardManager != null && _cardManager.GetBoosterPackCount() > 0;
|
||||
|
||||
// Show notification dot if there are boosters or unseen cards
|
||||
if (boosterNotificationDot != null)
|
||||
{
|
||||
boosterNotificationDot.gameObject.SetActive(hasBooters || _hasUnseenCards);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the album view page
|
||||
/// </summary>
|
||||
public void OpenAlbumView()
|
||||
{
|
||||
PageController.PushPage(albumViewPage);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the booster opening page if boosters are available
|
||||
/// </summary>
|
||||
public void OpenBoosterPack()
|
||||
{
|
||||
if (_cardManager != null && _cardManager.GetBoosterPackCount() > 0)
|
||||
{
|
||||
PageController.PushPage(boosterOpeningPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logging.Debug("[CardAlbumUI] No booster packs available");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the booster count display
|
||||
/// </summary>
|
||||
private void UpdateBoosterCount(int count)
|
||||
{
|
||||
if (boosterNotificationDot != null)
|
||||
{
|
||||
boosterNotificationDot.SetCount(count);
|
||||
|
||||
// Animate the notification dot for feedback
|
||||
boosterNotificationDot.transform.localScale = Vector3.one * 1.2f;
|
||||
Tween.LocalScale(boosterNotificationDot.transform, Vector3.one, 0.3f, 0f, obeyTimescale: false);
|
||||
|
||||
// Update visibility based on count
|
||||
UpdateBoosterVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the visibility of the booster notification dot based on current state
|
||||
/// </summary>
|
||||
private void UpdateBoosterVisibility()
|
||||
{
|
||||
if (boosterNotificationDot != null)
|
||||
{
|
||||
// Show dot if there are boosters or unseen cards
|
||||
bool hasBooters = _cardManager != null && _cardManager.GetBoosterPackCount() > 0;
|
||||
boosterNotificationDot.gameObject.SetActive(hasBooters || _hasUnseenCards);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles event when a booster pack is opened
|
||||
/// </summary>
|
||||
private void HandleBoosterOpened(System.Collections.Generic.List<CardData> cards)
|
||||
{
|
||||
Logging.Debug($"[CardAlbumUI] Booster opened with {cards.Count} cards");
|
||||
// The booster opening page handles the UI for this event
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles event when a new card is collected
|
||||
/// </summary>
|
||||
private void HandleCardCollected(CardData card)
|
||||
{
|
||||
// If we're not in the album view or booster opening view,
|
||||
// show a notification dot on the backpack
|
||||
if (PageController.CurrentPage != albumViewPage &&
|
||||
PageController.CurrentPage != boosterOpeningPage)
|
||||
{
|
||||
_hasUnseenCards = true;
|
||||
UpdateBoosterVisibility();
|
||||
}
|
||||
|
||||
Logging.Debug($"[CardAlbumUI] New card collected: {card.Name}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles event when a card is upgraded to a higher rarity
|
||||
/// </summary>
|
||||
private void HandleCardRarityUpgraded(CardData card)
|
||||
{
|
||||
// Just log the upgrade event without showing a notification
|
||||
Logging.Debug($"[CardAlbumUI] Card upgraded: {card.Name} to {card.Rarity}");
|
||||
}
|
||||
|
||||
// Handlers for UI controller hide/show events — toggle this GameObject active state
|
||||
private void HandleAllUIHidden()
|
||||
{
|
||||
// Ensure UI returns to backpack-only state before deactivating so we don't leave the game paused
|
||||
ShowOnlyBackpackIcon();
|
||||
backpackButton.gameObject.SetActive(false);
|
||||
|
||||
}
|
||||
|
||||
private void HandleAllUIShown()
|
||||
{
|
||||
backpackButton.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe5ff32f529d4f24a2064ee1dfa07758
|
||||
timeCreated: 1759923763
|
||||
303
Assets/Scripts/UI/CardSystem/CardDisplay.cs
Normal file
303
Assets/Scripts/UI/CardSystem/CardDisplay.cs
Normal file
@@ -0,0 +1,303 @@
|
||||
using System;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Core;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Displays a single card using the new visual system with frames, overlays, backgrounds, and zone shapes.
|
||||
/// </summary>
|
||||
public class CardDisplay : MonoBehaviour
|
||||
{
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private TextMeshProUGUI cardNameText;
|
||||
[SerializeField] private Image cardImage;
|
||||
[SerializeField] private Image frameImage;
|
||||
[SerializeField] private Image overlayImage;
|
||||
[SerializeField] private Image backgroundImage;
|
||||
[SerializeField] private Image zoneShapeImage;
|
||||
|
||||
[Header("Card Data")]
|
||||
[SerializeField] private CardData cardData;
|
||||
|
||||
[Header("Visual Settings")]
|
||||
[SerializeField] private CardVisualConfig visualConfig;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[Header("Editor Tools")]
|
||||
[SerializeField] private CardDefinition editorCardDefinition;
|
||||
#endif
|
||||
|
||||
// Events
|
||||
public event Action<CardDisplay> OnCardClicked;
|
||||
|
||||
/// <summary>
|
||||
/// Sets up the card display with the given card data
|
||||
/// </summary>
|
||||
public void SetupCard(CardData data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
Logging.Warning("[CardDisplay] Attempted to setup card with null data");
|
||||
return;
|
||||
}
|
||||
|
||||
cardData = data;
|
||||
UpdateCardVisuals();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates all visual elements based on current card data
|
||||
/// </summary>
|
||||
private void UpdateCardVisuals()
|
||||
{
|
||||
if (cardData == null)
|
||||
{
|
||||
ClearCard();
|
||||
return;
|
||||
}
|
||||
|
||||
if (visualConfig == null)
|
||||
{
|
||||
Logging.Warning("[CardDisplay] No CardVisualConfig assigned. Visuals may not display correctly.");
|
||||
}
|
||||
|
||||
// Update text
|
||||
UpdateCardName();
|
||||
|
||||
// Update main card image
|
||||
UpdateCardImage();
|
||||
|
||||
// Update rarity-based visuals (frame and overlay)
|
||||
UpdateRarityVisuals();
|
||||
|
||||
// Update zone-based visuals (background and shape)
|
||||
UpdateZoneVisuals();
|
||||
|
||||
Logging.Debug($"[CardDisplay] Updated visuals for card: {cardData.Name} (Rarity: {cardData.Rarity}, Zone: {cardData.Zone})");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the card name text
|
||||
/// </summary>
|
||||
private void UpdateCardName()
|
||||
{
|
||||
if (cardNameText != null)
|
||||
{
|
||||
cardNameText.text = cardData.Name ?? "Unknown Card";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the main card image
|
||||
/// </summary>
|
||||
private void UpdateCardImage()
|
||||
{
|
||||
if (cardImage != null)
|
||||
{
|
||||
if (cardData.CardImage != null)
|
||||
{
|
||||
cardImage.sprite = cardData.CardImage;
|
||||
cardImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cardImage.sprite = null;
|
||||
cardImage.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates frame and overlay based on card rarity
|
||||
/// </summary>
|
||||
private void UpdateRarityVisuals()
|
||||
{
|
||||
if (visualConfig == null) return;
|
||||
|
||||
// Update frame
|
||||
if (frameImage != null)
|
||||
{
|
||||
Sprite frameSprite = visualConfig.GetRarityFrame(cardData.Rarity);
|
||||
if (frameSprite != null)
|
||||
{
|
||||
frameImage.sprite = frameSprite;
|
||||
frameImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
frameImage.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Update overlay (can be null for some rarities)
|
||||
if (overlayImage != null)
|
||||
{
|
||||
Sprite overlaySprite = visualConfig.GetRarityOverlay(cardData.Rarity);
|
||||
if (overlaySprite != null)
|
||||
{
|
||||
overlayImage.sprite = overlaySprite;
|
||||
overlayImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
overlayImage.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates background and zone shape based on card zone and rarity
|
||||
/// Special handling for Legendary cards
|
||||
/// </summary>
|
||||
private void UpdateZoneVisuals()
|
||||
{
|
||||
if (visualConfig == null) return;
|
||||
|
||||
// Update background
|
||||
// Legendary cards get special background, others get zone background
|
||||
if (backgroundImage != null)
|
||||
{
|
||||
Sprite bgSprite = visualConfig.GetBackground(cardData.Zone, cardData.Rarity);
|
||||
if (bgSprite != null)
|
||||
{
|
||||
backgroundImage.sprite = bgSprite;
|
||||
backgroundImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
backgroundImage.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Update zone shape
|
||||
// Legendary cards don't show shapes
|
||||
if (zoneShapeImage != null)
|
||||
{
|
||||
Sprite shapeSprite = visualConfig.GetZoneShape(cardData.Zone, cardData.Rarity);
|
||||
if (shapeSprite != null)
|
||||
{
|
||||
zoneShapeImage.sprite = shapeSprite;
|
||||
zoneShapeImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
zoneShapeImage.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all visual elements
|
||||
/// </summary>
|
||||
private void ClearCard()
|
||||
{
|
||||
if (cardNameText != null) cardNameText.text = "";
|
||||
if (cardImage != null) cardImage.enabled = false;
|
||||
if (frameImage != null) frameImage.enabled = false;
|
||||
if (overlayImage != null) overlayImage.enabled = false;
|
||||
if (backgroundImage != null) backgroundImage.enabled = false;
|
||||
if (zoneShapeImage != null) zoneShapeImage.enabled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the card is clicked
|
||||
/// </summary>
|
||||
public void OnClick()
|
||||
{
|
||||
OnCardClicked?.Invoke(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the card data associated with this display
|
||||
/// </summary>
|
||||
public CardData GetCardData()
|
||||
{
|
||||
return cardData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the visual config reference
|
||||
/// </summary>
|
||||
public void SetVisualConfig(CardVisualConfig config)
|
||||
{
|
||||
visualConfig = config;
|
||||
if (cardData != null)
|
||||
{
|
||||
UpdateCardVisuals();
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Editor-only: Creates card data from the assigned definition and displays it
|
||||
/// </summary>
|
||||
public void PreviewFromDefinition()
|
||||
{
|
||||
if (editorCardDefinition == null)
|
||||
{
|
||||
Logging.Warning("[CardDisplay] Cannot preview: No card definition assigned in editor");
|
||||
return;
|
||||
}
|
||||
|
||||
cardData = editorCardDefinition.CreateCardData();
|
||||
UpdateCardVisuals();
|
||||
|
||||
Logging.Debug($"[CardDisplay] Previewing card from definition: {cardData.Name}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Editor-only: Clears the preview
|
||||
/// </summary>
|
||||
public void ClearPreview()
|
||||
{
|
||||
cardData = null;
|
||||
ClearCard();
|
||||
Logging.Debug("[CardDisplay] Preview cleared");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomEditor(typeof(CardDisplay))]
|
||||
public class CardDisplayEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
|
||||
CardDisplay display = (CardDisplay)target;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Editor Preview Tools", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("Preview Card"))
|
||||
{
|
||||
display.PreviewFromDefinition();
|
||||
EditorUtility.SetDirty(display);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Clear Preview"))
|
||||
{
|
||||
display.ClearPreview();
|
||||
EditorUtility.SetDirty(display);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.HelpBox(
|
||||
"Assign a Card Definition in 'Editor Tools' section, then click 'Preview Card' to see how it will look at runtime.",
|
||||
MessageType.Info
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
3
Assets/Scripts/UI/CardSystem/CardDisplay.cs.meta
Normal file
3
Assets/Scripts/UI/CardSystem/CardDisplay.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72cb26621865420aa763a66c06eb7f6d
|
||||
timeCreated: 1762380447
|
||||
@@ -1,204 +0,0 @@
|
||||
using Core;
|
||||
using Data.CardSystem;
|
||||
using Pixelplacement;
|
||||
using UI.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// UI page for the main menu of the card system.
|
||||
/// Shows options to open boosters, view album, etc.
|
||||
/// </summary>
|
||||
public class CardMenuPage : UIPage
|
||||
{
|
||||
[Header("Menu Options")]
|
||||
[SerializeField] private Button openBoosterButton;
|
||||
[SerializeField] private Button viewAlbumButton;
|
||||
[SerializeField] private Button changeClothesButton;
|
||||
[SerializeField] private Button backButton; // Added back button field
|
||||
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private BoosterNotificationDot boosterNotificationDot; // Changed to BoosterNotificationDot
|
||||
[SerializeField] private CanvasGroup canvasGroup;
|
||||
|
||||
private CardAlbumUI _cardAlbumUI;
|
||||
private CardSystemManager _cardManager;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// Get references
|
||||
_cardAlbumUI = FindAnyObjectByType<CardAlbumUI>();
|
||||
_cardManager = CardSystemManager.Instance;
|
||||
|
||||
// Make sure we have a CanvasGroup
|
||||
if (canvasGroup == null)
|
||||
canvasGroup = GetComponent<CanvasGroup>();
|
||||
if (canvasGroup == null)
|
||||
canvasGroup = gameObject.AddComponent<CanvasGroup>();
|
||||
|
||||
// Set up button listeners
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.onClick.AddListener(OnOpenBoosterClicked);
|
||||
}
|
||||
|
||||
if (viewAlbumButton != null)
|
||||
{
|
||||
viewAlbumButton.onClick.AddListener(OnViewAlbumClicked);
|
||||
}
|
||||
|
||||
if (changeClothesButton != null)
|
||||
{
|
||||
changeClothesButton.onClick.AddListener(OnChangeClothesClicked);
|
||||
// Disable "Coming Soon" feature
|
||||
changeClothesButton.interactable = false;
|
||||
}
|
||||
|
||||
if (backButton != null) // Set up back button listener
|
||||
{
|
||||
backButton.onClick.AddListener(OnBackButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Clean up button listeners
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.onClick.RemoveListener(OnOpenBoosterClicked);
|
||||
}
|
||||
|
||||
if (viewAlbumButton != null)
|
||||
{
|
||||
viewAlbumButton.onClick.RemoveListener(OnViewAlbumClicked);
|
||||
}
|
||||
|
||||
if (changeClothesButton != null)
|
||||
{
|
||||
changeClothesButton.onClick.RemoveListener(OnChangeClothesClicked);
|
||||
}
|
||||
|
||||
if (backButton != null) // Clean up back button listener
|
||||
{
|
||||
backButton.onClick.RemoveListener(OnBackButtonClicked);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to refresh UI state when returning to this page
|
||||
/// </summary>
|
||||
public void RefreshUI()
|
||||
{
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the UI elements based on current state
|
||||
/// </summary>
|
||||
private void UpdateUI()
|
||||
{
|
||||
if (_cardManager == null) return;
|
||||
|
||||
int boosterCount = _cardManager.GetBoosterPackCount();
|
||||
|
||||
// Update booster count text using the notification dot
|
||||
if (boosterNotificationDot != null)
|
||||
{
|
||||
boosterNotificationDot.SetCount(boosterCount);
|
||||
}
|
||||
|
||||
// Enable/disable open booster button based on availability
|
||||
if (openBoosterButton != null)
|
||||
{
|
||||
openBoosterButton.interactable = boosterCount > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the Open Booster button
|
||||
/// </summary>
|
||||
private void OnOpenBoosterClicked()
|
||||
{
|
||||
if (_cardAlbumUI != null)
|
||||
{
|
||||
_cardAlbumUI.OpenBoosterPack();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the View Album button
|
||||
/// </summary>
|
||||
private void OnViewAlbumClicked()
|
||||
{
|
||||
if (_cardAlbumUI != null)
|
||||
{
|
||||
_cardAlbumUI.OpenAlbumView();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the Change Clothes button (coming soon)
|
||||
/// </summary>
|
||||
private void OnChangeClothesClicked()
|
||||
{
|
||||
Logging.Debug("[CardMenuPage] Change Clothes feature coming soon!");
|
||||
// No implementation yet - "Coming soon" feature
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles click on the Back button
|
||||
/// </summary>
|
||||
private void OnBackButtonClicked()
|
||||
{
|
||||
// Use the UIPageController to pop this page
|
||||
// This will hide the card menu and return to the game
|
||||
if (UIPageController.Instance != null)
|
||||
{
|
||||
UIPageController.Instance.PopPage();
|
||||
Logging.Debug("[CardMenuPage] Exiting card menu back to game");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override for transition in animation using Pixelplacement.Tween
|
||||
/// </summary>
|
||||
protected override void DoTransitionIn(System.Action onComplete)
|
||||
{
|
||||
// Simple fade in animation
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
canvasGroup.alpha = 0f;
|
||||
Tween.Value(0f, 1f, (value) => canvasGroup.alpha = value, transitionDuration, 0f, Tween.EaseInOut, Tween.LoopType.None, null, onComplete, obeyTimescale: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback if no CanvasGroup
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override for transition out animation using Pixelplacement.Tween
|
||||
/// </summary>
|
||||
protected override void DoTransitionOut(System.Action onComplete)
|
||||
{
|
||||
// Simple fade out animation
|
||||
if (canvasGroup != null)
|
||||
{
|
||||
Tween.Value(canvasGroup.alpha, 0f, (value) => canvasGroup.alpha = value, transitionDuration, 0f, Tween.EaseInOut, Tween.LoopType.None, null, onComplete, obeyTimescale: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback if no CanvasGroup
|
||||
onComplete?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a81af156ae284925a1f004d08f0bb364
|
||||
timeCreated: 1759923823
|
||||
@@ -1,87 +0,0 @@
|
||||
using Bootstrap;
|
||||
using Core;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
// TODO: Yeet this class
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// One-off helper that shows/hides the Card System root based on scene loads.
|
||||
/// Attach this to your Card System root GameObject. It subscribes to SceneManagerService.SceneLoadCompleted
|
||||
/// and applies visibility: hidden in "StartingScene" (configurable), visible in all other gameplay scenes.
|
||||
/// </summary>
|
||||
public class CardSystemSceneVisibility : MonoBehaviour
|
||||
{
|
||||
[Header("Target Root")]
|
||||
[Tooltip("The GameObject to show/hide. Defaults to this GameObject if not assigned.")]
|
||||
[SerializeField] private GameObject targetRoot;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (targetRoot == null)
|
||||
targetRoot = gameObject;
|
||||
|
||||
// Defer subscription to after boot so SceneManagerService is guaranteed ready.
|
||||
BootCompletionService.RegisterInitAction(InitializePostBoot, priority: 95, name: "CardSystem Scene Visibility Init");
|
||||
}
|
||||
|
||||
private void InitializePostBoot()
|
||||
{
|
||||
var sceneSvc = SceneManagerService.Instance;
|
||||
if (sceneSvc == null)
|
||||
{
|
||||
Debug.LogWarning("[CardSystemSceneVisibility] SceneManagerService.Instance is null post-boot.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Subscribe to scene load completion notifications
|
||||
sceneSvc.SceneLoadCompleted += OnSceneLoaded;
|
||||
|
||||
// Apply initial state based on current gameplay scene
|
||||
ApplyVisibility(sceneSvc.CurrentGameplayScene);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
var sceneSvc = SceneManagerService.Instance;
|
||||
if (sceneSvc != null)
|
||||
{
|
||||
sceneSvc.SceneLoadCompleted -= OnSceneLoaded;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSceneLoaded(string sceneName)
|
||||
{
|
||||
ApplyVisibility(sceneName);
|
||||
}
|
||||
|
||||
private void ApplyVisibility(string sceneName)
|
||||
{
|
||||
// TODO: Implement actual visibility logic based on sceneName
|
||||
SetActiveSafe(true);
|
||||
// if (targetRoot == null)
|
||||
// return;
|
||||
//
|
||||
// if (string.IsNullOrEmpty(sceneName))
|
||||
// return;
|
||||
//
|
||||
// if (hideInBootstrapScene && sceneName == "BootstrapScene")
|
||||
// {
|
||||
// SetActiveSafe(false);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// bool shouldShow = sceneName != startingSceneName;
|
||||
// SetActiveSafe(shouldShow);
|
||||
}
|
||||
|
||||
private void SetActiveSafe(bool active)
|
||||
{
|
||||
if (targetRoot.activeSelf != active)
|
||||
{
|
||||
targetRoot.SetActive(active);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd47485d27c34e138bbc5fbd894a3dea
|
||||
timeCreated: 1761053493
|
||||
@@ -1,253 +0,0 @@
|
||||
using System;
|
||||
using AppleHills.Data.CardSystem;
|
||||
using Core;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UI.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles displaying and interacting with a single card in the UI.
|
||||
/// </summary>
|
||||
public class CardUIElement : MonoBehaviour
|
||||
{
|
||||
[Header("UI Elements")]
|
||||
[SerializeField] private TextMeshProUGUI cardNameText;
|
||||
[SerializeField] private Image cardImage;
|
||||
[SerializeField] private Image frameImage;
|
||||
[SerializeField] private Image backgroundImage;
|
||||
[SerializeField] private Image backgroundShape;
|
||||
|
||||
[Header("Card Data")]
|
||||
[SerializeField] private CardDefinition cardDefinition;
|
||||
[SerializeField] private CardData cardData;
|
||||
|
||||
[Header("Visual Settings")]
|
||||
[SerializeField] private CardVisualConfig visualConfig;
|
||||
|
||||
// Events
|
||||
public event Action<CardUIElement> OnCardClicked;
|
||||
|
||||
/// <summary>
|
||||
/// Sets up the card UI with the given card data
|
||||
/// </summary>
|
||||
public void SetupCard(CardData cardData)
|
||||
{
|
||||
Logging.Debug($"[CardUIElement] Setting up card with data: {cardData}");
|
||||
|
||||
this.cardData = cardData;
|
||||
|
||||
if (cardData == null)
|
||||
{
|
||||
Debug.LogError("[CardUIElement] Attempted to setup card with null data");
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateCardVisuals();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the card visuals based on the current card data
|
||||
/// </summary>
|
||||
private void UpdateCardVisuals()
|
||||
{
|
||||
if (cardData == null) return;
|
||||
|
||||
// Set basic text information
|
||||
if (cardNameText != null) cardNameText.text = cardData.Name;
|
||||
|
||||
// Set the card image
|
||||
if (cardImage != null)
|
||||
{
|
||||
if (cardData.CardImage != null)
|
||||
{
|
||||
cardImage.sprite = cardData.CardImage;
|
||||
cardImage.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cardImage.sprite = null;
|
||||
cardImage.enabled = false;
|
||||
// Don't log warnings for missing images - this is expected for new cards
|
||||
// and causes console spam in the editor
|
||||
}
|
||||
}
|
||||
|
||||
// Update frame color based on rarity
|
||||
UpdateFrameByRarity(cardData.Rarity);
|
||||
|
||||
// Update background color and shape based on zone
|
||||
UpdateBackgroundByZone(cardData.Zone);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the frame color based on card rarity
|
||||
/// </summary>
|
||||
private void UpdateFrameByRarity(CardRarity rarity)
|
||||
{
|
||||
if (frameImage == null) return;
|
||||
|
||||
// Get color from config if available, otherwise use default colors
|
||||
Color frameColor = visualConfig != null
|
||||
? visualConfig.GetRarityColor(rarity)
|
||||
: GetDefaultRarityColor(rarity);
|
||||
|
||||
frameImage.color = frameColor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the background color and shape based on card zone
|
||||
/// </summary>
|
||||
private void UpdateBackgroundByZone(CardZone zone)
|
||||
{
|
||||
// Update background color
|
||||
if (backgroundImage != null)
|
||||
{
|
||||
Color bgColor = visualConfig != null
|
||||
? visualConfig.GetZoneColor(zone)
|
||||
: GetDefaultZoneColor(zone);
|
||||
|
||||
backgroundImage.color = bgColor;
|
||||
}
|
||||
|
||||
// Update background shape
|
||||
if (backgroundShape != null && visualConfig != null)
|
||||
{
|
||||
Sprite shapeSprite = visualConfig.GetZoneShape(zone);
|
||||
if (shapeSprite != null)
|
||||
{
|
||||
backgroundShape.sprite = shapeSprite;
|
||||
backgroundShape.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
backgroundShape.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns default color for rarity if no config is available
|
||||
/// </summary>
|
||||
private Color GetDefaultRarityColor(CardRarity rarity)
|
||||
{
|
||||
switch (rarity)
|
||||
{
|
||||
case CardRarity.Common:
|
||||
return Color.gray;
|
||||
case CardRarity.Uncommon:
|
||||
return Color.green;
|
||||
case CardRarity.Rare:
|
||||
return Color.blue;
|
||||
case CardRarity.Epic:
|
||||
return new Color(0.5f, 0, 0.5f); // Purple
|
||||
case CardRarity.Legendary:
|
||||
return Color.yellow;
|
||||
default:
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns default color for zone if no config is available
|
||||
/// </summary>
|
||||
private Color GetDefaultZoneColor(CardZone zone)
|
||||
{
|
||||
// Default zone colors from CardDefinition
|
||||
switch (zone)
|
||||
{
|
||||
case CardZone.AppleHills:
|
||||
return new Color(0.8f, 0.9f, 0.8f); // Light green
|
||||
case CardZone.Quarry:
|
||||
return new Color(0.85f, 0.8f, 0.7f); // Sandy brown
|
||||
case CardZone.Forest:
|
||||
return new Color(0.6f, 0.8f, 0.6f); // Forest green
|
||||
case CardZone.Mountain:
|
||||
return new Color(0.7f, 0.7f, 0.9f); // Bluish
|
||||
case CardZone.Beach:
|
||||
return new Color(0.9f, 0.85f, 0.7f); // Sandy yellow
|
||||
default:
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the card is clicked
|
||||
/// </summary>
|
||||
public void OnClick()
|
||||
{
|
||||
OnCardClicked?.Invoke(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the card data associated with this UI element
|
||||
/// </summary>
|
||||
public CardData GetCardData()
|
||||
{
|
||||
return cardData;
|
||||
}
|
||||
|
||||
// Animation methods that can be called from UI events
|
||||
|
||||
/// <summary>
|
||||
/// Called when the card is revealed from a booster pack
|
||||
/// </summary>
|
||||
public void OnShowAnimation()
|
||||
{
|
||||
// Stub for card reveal animation
|
||||
Logging.Debug($"[CardUIElement] Showing card: {cardData?.Name}");
|
||||
// Could add animation code or call Animation Trigger here
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the card moves to the backpack after being revealed
|
||||
/// </summary>
|
||||
public void OnMoveToBackpackAnimation()
|
||||
{
|
||||
// Stub for animation when card moves to backpack
|
||||
Logging.Debug($"[CardUIElement] Moving card to backpack: {cardData?.Name}");
|
||||
// Could add animation code or call Animation Trigger here
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// <summary>
|
||||
/// Create card data from definition and update the UI
|
||||
/// </summary>
|
||||
public void CreateFromDefinition()
|
||||
{
|
||||
if (cardDefinition == null)
|
||||
{
|
||||
Logging.Warning("[CardUIElement] Cannot create card data: No card definition assigned");
|
||||
return;
|
||||
}
|
||||
|
||||
cardData = cardDefinition.CreateCardData();
|
||||
UpdateCardVisuals();
|
||||
|
||||
Logging.Debug($"[CardUIElement] Created card from definition: {cardData.Name}");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomEditor(typeof(CardUIElement))]
|
||||
public class CardUIElementEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
|
||||
CardUIElement cardUI = (CardUIElement)target;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
if (GUILayout.Button("Create From Definition"))
|
||||
{
|
||||
cardUI.CreateFromDefinition();
|
||||
EditorUtility.SetDirty(cardUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aed7c581bdb84200a05dd8a7df409ab0
|
||||
timeCreated: 1759923795
|
||||
Reference in New Issue
Block a user