25 changed files with 4411 additions and 423 deletions
|
After Width: | Height: | Size: 15 MiB |
@ -0,0 +1,149 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 8a00988947059b248a002975e072227b |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 12 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
flipGreenChannel: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
vTOnly: 0 |
|||
ignoreMipmapLimit: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 1 |
|||
mipBias: 0 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 0 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 2 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 1 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 8 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
flipbookRows: 1 |
|||
flipbookColumns: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
ignorePngGamma: 0 |
|||
applyGammaDecoding: 0 |
|||
swizzle: 50462976 |
|||
cookieLightType: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
ignorePlatformSupport: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
- serializedVersion: 3 |
|||
buildTarget: Standalone |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
ignorePlatformSupport: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
- serializedVersion: 3 |
|||
buildTarget: Server |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
ignorePlatformSupport: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: |
|||
- serializedVersion: 2 |
|||
name: "\u9876UI_0" |
|||
rect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 3467 |
|||
width: 7927 |
|||
height: 970 |
|||
alignment: 0 |
|||
pivot: {x: 0, y: 0} |
|||
border: {x: 0, y: 0, z: 0, w: 0} |
|||
outline: [] |
|||
physicsShape: [] |
|||
tessellationDetail: 0 |
|||
bones: [] |
|||
spriteID: 9a2ae2e761240e4428d05fc1e0267743 |
|||
internalID: 1455608431 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: 7ac8acd13f7a7d840b8a29c27118e87e |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
nameFileIdTable: |
|||
"\u9876UI_0": 1455608431 |
|||
mipmapLimitGroupName: |
|||
pSDRemoveMatte: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: df91b98f905145d47be72c65a37d4c02 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 5537996c2537a6d4daacc1d4ff899078 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 24c831f67ea4d1340be4f1d69519bd12 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: c2b451633a3769042be3e29875748a4a |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: ca8f972341fdd4c499f7a437b1d7413e |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 401449a7e63d3a34ea19223d1e86de9e |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,79 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class InFightLookCardManager : MonoBehaviour |
|||
{ |
|||
public List<int> cardList = new List<int>(); |
|||
public List<GameObject> cardGameObjectList = new List<GameObject>(); |
|||
public GameObject lookCardPrefab; |
|||
|
|||
public void ShowDeckCard() |
|||
{ |
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
Destroy(cardGameObjectList[i]); |
|||
} |
|||
cardGameObjectList.Clear(); |
|||
cardList.Clear(); |
|||
foreach (var card in TurnMaster.Instance.cardDeck.cardList) |
|||
{ |
|||
cardList.Add(card); |
|||
} |
|||
|
|||
GetComponent<RectTransform>().sizeDelta = new Vector2(GetComponent<RectTransform>().sizeDelta.x, cardList.Count / 5f * 220f + 45); |
|||
|
|||
for (int i = 0; i < cardList.Count; i++) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i], i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
} |
|||
|
|||
public void ShowUseCard() |
|||
{ |
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
Destroy(cardGameObjectList[i]); |
|||
} |
|||
cardGameObjectList.Clear(); |
|||
cardList.Clear(); |
|||
foreach (var card in TurnMaster.Instance.usedCard.usedCardList) |
|||
{ |
|||
cardList.Add(card); |
|||
} |
|||
|
|||
GetComponent<RectTransform>().sizeDelta = new Vector2(GetComponent<RectTransform>().sizeDelta.x, cardList.Count / 5f * 220f + 45); |
|||
|
|||
for (int i = 0; i < cardList.Count; i++) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i], i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
} |
|||
|
|||
public void ShowDeleteCard() |
|||
{ |
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
Destroy(cardGameObjectList[i]); |
|||
} |
|||
cardGameObjectList.Clear(); |
|||
cardList.Clear(); |
|||
foreach (var card in TurnMaster.Instance.usedCard.deleteCardList) |
|||
{ |
|||
cardList.Add(card); |
|||
} |
|||
|
|||
GetComponent<RectTransform>().sizeDelta = new Vector2(GetComponent<RectTransform>().sizeDelta.x, cardList.Count / 5f * 220f + 45); |
|||
|
|||
for (int i = 0; i < cardList.Count; i++) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i], i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: c28e6c7109d95c841a7143f6a4d10cb0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,143 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using UnityEngine; |
|||
|
|||
public class LookCardManager : MonoBehaviour |
|||
{ |
|||
public List<int> cardList = new List<int>(); |
|||
public List<GameObject> cardGameObjectList = new List<GameObject>(); |
|||
public GameObject lookCardPrefab; |
|||
|
|||
bool defaultSort =true;//(ÉýĐň)
|
|||
|
|||
public void ShowCard() |
|||
{ |
|||
|
|||
for(int i =0;i<cardGameObjectList .Count;i++) |
|||
{ |
|||
Destroy(cardGameObjectList[i]); |
|||
} |
|||
cardGameObjectList.Clear(); |
|||
cardList.Clear(); |
|||
foreach (var card in TurnMaster .Instance .cardDeck.cardDeck.cardDeckList ) |
|||
{ |
|||
cardList.Add(card); |
|||
} |
|||
|
|||
GetComponent<RectTransform>().sizeDelta = new Vector2(GetComponent<RectTransform>().sizeDelta.x, cardList.Count / 5f * 220f + 45); |
|||
|
|||
for (int i= 0;i<cardList .Count;i++) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i],i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
} |
|||
|
|||
public void SortWithCost() |
|||
{ |
|||
|
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
cardGameObjectList[i].transform .SetParent (transform .parent .parent ); |
|||
} |
|||
|
|||
List<CardEntity> cardEntities = new List<CardEntity>(); |
|||
foreach (var card in cardGameObjectList) |
|||
{ |
|||
cardEntities.Add(card.GetComponent<CardEntity>()); |
|||
} |
|||
|
|||
if(defaultSort == true ) |
|||
{ |
|||
cardEntities = cardEntities.OrderBy(classInfo => classInfo.cardOriginalData.Cost).ToList(); |
|||
defaultSort = false; |
|||
|
|||
} |
|||
else |
|||
{ |
|||
cardEntities = cardEntities.OrderByDescending(classInfo => classInfo.cardOriginalData.Cost).ToList(); |
|||
defaultSort = true; |
|||
} |
|||
// cardEntities.Sort((a, b) => { return int.Parse ( a.cost) > int.Parse(b.cost) ? 1 : -1; });
|
|||
|
|||
for (int i = 0; i < cardEntities.Count; i++) |
|||
{ |
|||
cardEntities[i].transform.SetParent(transform); |
|||
} |
|||
} |
|||
|
|||
public void SortWithType() |
|||
{ |
|||
|
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
cardGameObjectList[i].transform.SetParent(transform.parent.parent); |
|||
} |
|||
|
|||
List<CardEntity> cardEntities = new List<CardEntity>(); |
|||
foreach (var card in cardGameObjectList) |
|||
{ |
|||
cardEntities.Add(card.GetComponent<CardEntity>()); |
|||
} |
|||
|
|||
if (defaultSort == true) |
|||
{ |
|||
cardEntities = cardEntities.OrderBy(classInfo => classInfo.cardOriginalData.CarType).ToList(); |
|||
defaultSort = false; |
|||
|
|||
} |
|||
else |
|||
{ |
|||
cardEntities = cardEntities.OrderByDescending(classInfo => classInfo.cardOriginalData.CarType).ToList(); |
|||
defaultSort = true; |
|||
} |
|||
// cardEntities.Sort((a, b) => { return int.Parse ( a.cost) > int.Parse(b.cost) ? 1 : -1; });
|
|||
|
|||
for (int i = 0; i < cardEntities.Count; i++) |
|||
{ |
|||
cardEntities[i].transform.SetParent(transform); |
|||
} |
|||
} |
|||
|
|||
public void SortWithGetTime() |
|||
{ |
|||
|
|||
for (int i = 0; i < cardGameObjectList.Count; i++) |
|||
{ |
|||
Destroy(cardGameObjectList[i]); |
|||
} |
|||
cardGameObjectList.Clear(); |
|||
cardList.Clear(); |
|||
foreach (var card in TurnMaster.Instance.cardDeck.cardDeck.cardDeckList) |
|||
{ |
|||
cardList.Add(card); |
|||
} |
|||
|
|||
// GetComponent<RectTransform>().sizeDelta = new Vector2(GetComponent<RectTransform>().sizeDelta.x, cardList.Count / 5f * 220f + 45);
|
|||
|
|||
if(defaultSort ==true ) |
|||
{ |
|||
for (int i = 0; i < cardList.Count; i++) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i], i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
defaultSort = false; |
|||
} |
|||
else |
|||
{ |
|||
for (int i = cardList.Count-1; i >= 0; i--) |
|||
{ |
|||
var currentCard = Instantiate(lookCardPrefab, this.transform); |
|||
currentCard.GetComponent<CardEntity>().createCard(cardList[i], i); |
|||
cardGameObjectList.Add(currentCard); |
|||
} |
|||
defaultSort = true; |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 70f86f12b2f03f940b60a78f6b53088c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
Loading…
Reference in new issue