Browse Source

卡牌特殊触发框

pull/100/head
45 10 months ago
parent
commit
dc2f4f0644
  1. 18
      ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset
  2. 22
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/Card_v04-Color.prefab
  3. 24
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/Card_v04-Common.prefab
  4. 16
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab
  5. 14
      ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab
  6. 42
      ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs
  7. 87
      ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/OutLineSourceHanSansCN-Normal SDF 1.asset
  8. 391752
      ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SIMKAI SDF 1.asset
  9. 8
      ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SIMKAI SDF 1.asset.meta
  10. 855
      ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SourceHanSansCN-Normal SDF.asset

18
ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset

@ -13,13 +13,11 @@ MonoBehaviour:
m_Name: cardDeckList
m_EditorClassIdentifier:
cardDeckList:
- 1001
- 1001
- 1001
- 1002
- 1002
- 1002
- 1003
- 1003
- 2001
- 2032
- 1005
- 2022
- 1005
- 1005
- 1005
- 1005
- 1005
- 1005

22
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/Card_v04-Color.prefab

@ -532,10 +532,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u83B7\u5F97\u751F\u547D\u503C\u4E0A\u9650\u4E00\u534A\u7684\u62A4\u76FE,,"
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 89ef1ec08151aa04cb52a99a61c265eb, type: 2}
m_sharedMaterial: {fileID: -4989954011452443200, guid: 89ef1ec08151aa04cb52a99a61c265eb,
m_fontAsset: {fileID: 11400000, guid: 6ec4515cd39fefb4c813238dc50b382a, type: 2}
m_sharedMaterial: {fileID: -510593548764063059, guid: 6ec4515cd39fefb4c813238dc50b382a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -560,13 +560,13 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontSize: 10
m_fontSizeBase: 10
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 1
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -1180,9 +1180,17 @@ MonoBehaviour:
cardDataSummary: {fileID: 688789690455570313}
animator: {fileID: 5188661188061946492}
borderAnim: {fileID: 4731515924597847675}
borderAnimColors:
- {fileID: 6166632618102080473}
- {fileID: 426148789256303708}
- {fileID: 5024996033405176357}
- {fileID: 3905537472925226589}
normalBorder: {r: 0.0627451, g: 0.6784314, b: 0.30980393, a: 1}
triggerBorder: {r: 0.99215686, g: 0.9843137, b: 0.05882353, a: 1}
currentCost: 0
currentCostType:
tempIsDisposable: 0
lastConditionBool: 0
--- !u!114 &5545682449418996990
MonoBehaviour:
m_ObjectHideFlags: 0
@ -2365,7 +2373,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8142106072463758673}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 52f1715f4c493c546b07ae92b9bfe499, type: 3}
m_Name:

24
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/Card_v04-Common.prefab

@ -532,10 +532,10 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u83B7\u5F97\u751F\u547D\u503C\u4E0A\u9650\u4E00\u534A\u7684\u62A4\u76FE,\u4E0B2\u56DE\u5408\u65E0\u6CD5\u83B7\u5F97\u62A4\u76FE,\u6D88\u8017;<link=color>red>10</link>,\u4E0B1\u56DE\u5408\u65E0\u6CD5\u83B7\u5F97\u62A4\u76FE"
m_text:
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 89ef1ec08151aa04cb52a99a61c265eb, type: 2}
m_sharedMaterial: {fileID: -4989954011452443200, guid: 89ef1ec08151aa04cb52a99a61c265eb,
m_fontAsset: {fileID: 11400000, guid: 6ec4515cd39fefb4c813238dc50b382a, type: 2}
m_sharedMaterial: {fileID: -510593548764063059, guid: 6ec4515cd39fefb4c813238dc50b382a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -560,14 +560,14 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontSize: 11
m_fontSizeBase: 11
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 1
m_HorizontalAlignment: 2
m_fontStyle: 0
m_HorizontalAlignment: 8
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
@ -1180,9 +1180,17 @@ MonoBehaviour:
cardDataSummary: {fileID: 688789690455570313}
animator: {fileID: 5188661188061946492}
borderAnim: {fileID: 4731515924597847675}
borderAnimColors:
- {fileID: 6166632618102080473}
- {fileID: 426148789256303708}
- {fileID: 5024996033405176357}
- {fileID: 3905537472925226589}
normalBorder: {r: 0.06087574, g: 0.6792453, b: 0.31080014, a: 1}
triggerBorder: {r: 0.990566, g: 0.98592716, b: 0.06074228, a: 1}
currentCost: 0
currentCostType:
tempIsDisposable: 0
lastConditionBool: 0
--- !u!114 &5545682449418996990
MonoBehaviour:
m_ObjectHideFlags: 0
@ -2365,7 +2373,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8142106072463758673}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 52f1715f4c493c546b07ae92b9bfe499, type: 3}
m_Name:

16
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Card_v04-0319.prefab

@ -501,7 +501,7 @@ RectTransform:
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.7879, y: 26.564493}
m_AnchoredPosition: {x: 0.7, y: 18}
m_SizeDelta: {x: 82.3894, y: 56.7551}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5031152783144563479
@ -534,8 +534,8 @@ MonoBehaviour:
m_Calls: []
m_text: "\u83B7\u5F97\u751F\u547D\u503C\u4E0A\u9650\u4E00\u534A\u7684\u62A4\u76FE,\u4E0B2\u56DE\u5408\u65E0\u6CD5\u83B7\u5F97\u62A4\u76FE,\u6D88\u8017;<link=color>red>10</link>,\u4E0B1\u56DE\u5408\u65E0\u6CD5\u83B7\u5F97\u62A4\u76FE"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 89ef1ec08151aa04cb52a99a61c265eb, type: 2}
m_sharedMaterial: {fileID: -4989954011452443200, guid: 89ef1ec08151aa04cb52a99a61c265eb,
m_fontAsset: {fileID: 11400000, guid: 6ec4515cd39fefb4c813238dc50b382a, type: 2}
m_sharedMaterial: {fileID: -510593548764063059, guid: 6ec4515cd39fefb4c813238dc50b382a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -560,13 +560,13 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 9
m_fontSizeBase: 9
m_fontSize: 11
m_fontSizeBase: 11
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 1
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -1182,9 +1182,13 @@ MonoBehaviour:
cardDataSummary: {fileID: 688789690455570313}
animator: {fileID: 5188661188061946492}
borderAnim: {fileID: 4731515924597847675}
borderAnimColors: []
normalBorder: {r: 0, g: 0, b: 0, a: 0}
triggerBorder: {r: 0, g: 0, b: 0, a: 0}
currentCost: 0
currentCostType:
tempIsDisposable: 1
lastConditionBool: 0
--- !u!114 &5545682449418996990
MonoBehaviour:
m_ObjectHideFlags: 0

14
ColorlessWorld-2024-4-2/Assets/Prefab/CardPrefab/ForLook/Color-Card_v04-0319.prefab

@ -534,8 +534,8 @@ MonoBehaviour:
m_Calls: []
m_text: "\u83B7\u5F97\u751F\u547D\u503C\u4E0A\u9650\u4E00\u534A\u7684\u62A4\u76FE,\u4E0B2\u56DE\u5408\u65E0\u6CD5\u83B7\u5F97\u62A4\u76FE,\u6D88\u8017;"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 89ef1ec08151aa04cb52a99a61c265eb, type: 2}
m_sharedMaterial: {fileID: -4989954011452443200, guid: 89ef1ec08151aa04cb52a99a61c265eb,
m_fontAsset: {fileID: 11400000, guid: 6ec4515cd39fefb4c813238dc50b382a, type: 2}
m_sharedMaterial: {fileID: -510593548764063059, guid: 6ec4515cd39fefb4c813238dc50b382a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -560,13 +560,13 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 8
m_fontSizeBase: 8
m_fontSize: 10
m_fontSizeBase: 10
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0
m_fontSizeMax: 0
m_fontStyle: 1
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
@ -1182,9 +1182,13 @@ MonoBehaviour:
cardDataSummary: {fileID: 688789690455570313}
animator: {fileID: 5188661188061946492}
borderAnim: {fileID: 4731515924597847675}
borderAnimColors: []
normalBorder: {r: 0, g: 0, b: 0, a: 0}
triggerBorder: {r: 0, g: 0, b: 0, a: 0}
currentCost: 0
currentCostType:
tempIsDisposable: 1
lastConditionBool: 0
--- !u!114 &5545682449418996990
MonoBehaviour:
m_ObjectHideFlags: 0

42
ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs

@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@ -9,7 +8,7 @@ using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Windows;
@ -100,11 +99,16 @@ public class CardEntity : MonoBehaviour
public Animator animator;
[Header("卡牌边框画器控件")]
public Animator borderAnim;
public List<Image> borderAnimColors;
public Color normalBorder;
public Color triggerBorder;
[Header("卡牌费用变化监测")]
int lastCost;
public int currentCost;
public string currentCostType;
public bool tempIsDisposable=false;
[Header("卡牌特殊效果检测")]
public bool lastConditionBool;
private void Start()
{
currentCost = cardOriginalData.Cost;
@ -115,6 +119,12 @@ public class CardEntity : MonoBehaviour
}
StartCoroutine(SyncVuleText());
//初始化卡牌边框颜色
foreach (var image in borderAnimColors )
{
image.color = normalBorder;
}
}
private void Update()
@ -810,13 +820,35 @@ public class CardEntity : MonoBehaviour
}
List<bool> allMatchList = new List<bool>();
int exclusiveConditionIndex = 0;
bool canexclusiveCondition=false;
if (conditionCheck())
// int exclusiveConditionIndex = 0;
// bool canexclusiveCondition=false;
bool conditionBool = conditionCheck();
if (conditionBool)
{
// Debug.Log("特殊效果已触发");
addDenyCondition();
addConditionFunAndVal();
}
if(conditionBool!=lastConditionBool )
{
lastConditionBool = conditionBool;
//改变颜色边框
if (conditionBool)
{
foreach (Image image in borderAnimColors)
{
image.color = triggerBorder;
}
}
else
{
foreach (Image image in borderAnimColors)
{
image.color = normalBorder;
}
}
}
/*for (int i = 0; i < cardOriginalData.conditionAndFunctionVal.Count; i++)
{
bool isAllMatch=true;

87
ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/OutLineSourceHanSansCN-Normal SDF 1.asset

File diff suppressed because one or more lines are too long

391752
ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SIMKAI SDF 1.asset

File diff suppressed because one or more lines are too long

8
ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SIMKAI SDF 1.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6ec4515cd39fefb4c813238dc50b382a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

855
ColorlessWorld-2024-4-2/Assets/TextMesh Pro/Resources/Fonts & Materials/SourceHanSansCN-Normal SDF.asset

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save