Browse Source

修改无范围卡数值预览

pull/75/head
45 1 year ago
parent
commit
1659541fc3
  1. 1
      ColorlessWorld-2024-4-2/Assets/GameDate/cardDeckList.asset
  2. 137
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBlack.mat
  3. 8
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBlack.mat.meta
  4. 3
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBule.mat
  5. 4
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeGreen.mat
  6. 6
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeRed.mat
  7. 4
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeRedWhite.mat
  8. 4
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/EnemyColour.mat
  9. 8
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/HightLight.mat
  10. 1
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/MapUnity _2.prefab
  11. 4
      ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/enemyMark.mat
  12. 18
      ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs
  13. 22
      ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardEntity.cs
  14. 44
      ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs
  15. 5
      ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs

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

@ -18,3 +18,4 @@ MonoBehaviour:
- 1003 - 1003
- 1004 - 1004
- 2001 - 2001
- 1035

137
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBlack.mat

@ -0,0 +1,137 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3723055246666905880
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CastPreRangeBlack
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 0.017326381, b: 0.3207547, a: 0.95686275}
- _Color: {r: 0, g: 0.017326381, b: 0.32075468, a: 0.95686275}
- _EmissionColor: {r: 2, g: 0, b: 0.021570206, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

8
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBlack.mat.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 81001e79f776fc64cab816ecbdf1c685
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

3
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeBule.mat

@ -26,10 +26,9 @@ Material:
m_ModifiedSerializedProperties: 0 m_ModifiedSerializedProperties: 0
m_ValidKeywords: m_ValidKeywords:
- _ALPHAPREMULTIPLY_ON - _ALPHAPREMULTIPLY_ON
- _EMISSION
- _SURFACE_TYPE_TRANSPARENT - _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: [] m_InvalidKeywords: []
m_LightmapFlags: 2 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000 m_CustomRenderQueue: 3000

4
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeGreen.mat

@ -131,8 +131,8 @@ Material:
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZWrite: 0 - _ZWrite: 0
m_Colors: m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.64864874, a: 0.3529412} - _BaseColor: {r: 0, g: 1, b: 0.64705896, a: 0.87058824}
- _Color: {r: 0, g: 1, b: 0.64864874, a: 0.3529412} - _Color: {r: 0, g: 1, b: 0.6470589, a: 0.87058824}
- _EmissionColor: {r: 0.034264863, g: 0.20754719, b: 0.11331992, a: 1} - _EmissionColor: {r: 0.034264863, g: 0.20754719, b: 0.11331992, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

6
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeRed.mat

@ -131,8 +131,8 @@ Material:
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZWrite: 0 - _ZWrite: 0
m_Colors: m_Colors:
- _BaseColor: {r: 1, g: 0.110657394, b: 0, a: 0.3529412} - _BaseColor: {r: 1, g: 0.11065731, b: 0, a: 0.95686275}
- _Color: {r: 1, g: 0.11065737, b: 0, a: 0.3529412} - _Color: {r: 1, g: 0.11065727, b: 0, a: 0.95686275}
- _EmissionColor: {r: 0.3207547, g: 0, b: 0.01491883, a: 1} - _EmissionColor: {r: 2, g: 0, b: 0.021570206, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

4
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/CastPreRangeRedWhite.mat

@ -131,8 +131,8 @@ Material:
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZWrite: 0 - _ZWrite: 0
m_Colors: m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 0.3529412} - _BaseColor: {r: 0.8113208, g: 0.8113208, b: 0.8113208, a: 0.87058824}
- _Color: {r: 1, g: 1, b: 1, a: 0.3529412} - _Color: {r: 0.8113207, g: 0.8113207, b: 0.8113207, a: 0.87058824}
- _EmissionColor: {r: 0.3773585, g: 0.3773585, b: 0.3773585, a: 1} - _EmissionColor: {r: 0.3773585, g: 0.3773585, b: 0.3773585, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

4
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/EnemyColour.mat

@ -16,7 +16,7 @@ Material:
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: 2001
stringTagMap: stringTagMap:
RenderType: Opaque RenderType: Opaque
disabledShaderPasses: [] disabledShaderPasses: []
@ -102,7 +102,7 @@ Material:
- _Metallic: 0 - _Metallic: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.005 - _Parallax: 0.005
- _QueueOffset: 0 - _QueueOffset: 1
- _ReceiveShadows: 1 - _ReceiveShadows: 1
- _Smoothness: 0.5 - _Smoothness: 0.5
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0

8
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/HightLight.mat

@ -30,7 +30,7 @@ Material:
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000 m_CustomRenderQueue: 3001
stringTagMap: stringTagMap:
RenderType: Transparent RenderType: Transparent
disabledShaderPasses: disabledShaderPasses:
@ -118,7 +118,7 @@ Material:
- _Metallic: 0.5 - _Metallic: 0.5
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.005 - _Parallax: 0.005
- _QueueOffset: 0 - _QueueOffset: 1
- _ReceiveShadows: 1 - _ReceiveShadows: 1
- _Smoothness: 0.5 - _Smoothness: 0.5
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
@ -129,8 +129,8 @@ Material:
- _WorkflowMode: 1 - _WorkflowMode: 1
- _ZWrite: 0 - _ZWrite: 0
m_Colors: m_Colors:
- _BaseColor: {r: 1, g: 0, b: 0, a: 0.60784316} - _BaseColor: {r: 0, g: 0.6132076, b: 0.37218037, a: 0.60784316}
- _Color: {r: 1, g: 0, b: 0, a: 0.60784316} - _Color: {r: 0, g: 0.6132076, b: 0.37218034, a: 0.60784316}
- _EmissionColor: {r: 32.110424, g: 0, b: 0, a: 1} - _EmissionColor: {r: 32.110424, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

1
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/MapUnity _2.prefab

@ -590,6 +590,7 @@ MonoBehaviour:
greenPre: {fileID: 2100000, guid: e4d58776fca90ec49aa2c7d259c73e27, type: 2} greenPre: {fileID: 2100000, guid: e4d58776fca90ec49aa2c7d259c73e27, type: 2}
bluePre: {fileID: 2100000, guid: 32e8efb5b9333064a9cb9bff03ccf536, type: 2} bluePre: {fileID: 2100000, guid: 32e8efb5b9333064a9cb9bff03ccf536, type: 2}
whitePre: {fileID: 2100000, guid: 93c7db93411fa374b8c5d1799b69e58c, type: 2} whitePre: {fileID: 2100000, guid: 93c7db93411fa374b8c5d1799b69e58c, type: 2}
blackPre: {fileID: 2100000, guid: 81001e79f776fc64cab816ecbdf1c685, type: 2}
whoColourPlane: {fileID: 7818877686521749494} whoColourPlane: {fileID: 7818877686521749494}
colourBrokenParticle: {fileID: 0} colourBrokenParticle: {fileID: 0}
CylinderFloor: {fileID: 8109433587480074365} CylinderFloor: {fileID: 8109433587480074365}

4
ColorlessWorld-2024-4-2/Assets/Prefab/MapNodePrefab/enemyMark.mat

@ -20,7 +20,7 @@ Material:
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000 m_CustomRenderQueue: 3001
stringTagMap: stringTagMap:
RenderType: Transparent RenderType: Transparent
disabledShaderPasses: disabledShaderPasses:
@ -108,7 +108,7 @@ Material:
- _Metallic: 0.5 - _Metallic: 0.5
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.005 - _Parallax: 0.005
- _QueueOffset: 0 - _QueueOffset: 1
- _ReceiveShadows: 1 - _ReceiveShadows: 1
- _Smoothness: 0.5 - _Smoothness: 0.5
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0

18
ColorlessWorld-2024-4-2/Assets/Scripts/Card/CardDrag.cs

@ -194,7 +194,11 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag
ready = true; ready = true;
} }
transform.localPosition = cardOnMouseEnter.originPoint;// + new Vector3(0, 30, 0); transform.localPosition = cardOnMouseEnter.originPoint;// + new Vector3(0, 30, 0);
// transform.localScale = new Vector3(1, 1, 1); // transform.localScale = new Vector3(1, 1, 1);
//注册拖拽卡牌信息
GameManager.Instance.currentCardEntity = cardEntity;
GameManager.Instance.currentMapNode = currentNode;
if (cardEntity.cardOriginalData.CastingRange != 0) if (cardEntity.cardOriginalData.CastingRange != 0)
{ {
ainPanleWork(eventData); ainPanleWork(eventData);
@ -438,11 +442,7 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag
mapUnity.influenced = false; mapUnity.influenced = false;
} }
cardEntity.influencePreviewPool.Clear(); cardEntity.influencePreviewPool.Clear();
currentNode = raycastHit.collider.transform.GetComponent<MapUnity>(); currentNode = raycastHit.collider.transform.GetComponent<MapUnity>();
//注册拖拽卡牌信息
GameManager.Instance.currentCardEntity = cardEntity;
GameManager .Instance .currentMapNode = currentNode;
//ÖŘĐÂľ÷ÓáśÎ§Ô¤ŔŔ //ÖŘĐÂľ÷ÓáśÎ§Ô¤ŔŔ
//GameManager.Instance.player.StepPreviewInfluencedNode(cardEntity.cardOriginalData.CastingRange); //GameManager.Instance.player.StepPreviewInfluencedNode(cardEntity.cardOriginalData.CastingRange);
int castRange = cardEntity.cardOriginalData.CastingRange; int castRange = cardEntity.cardOriginalData.CastingRange;
@ -508,7 +508,11 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag
cardEntity.influencePreviewPool.Add(currentNode); cardEntity.influencePreviewPool.Add(currentNode);
} }
}*/ }*/
getNodeTools.setEffectRangePreview(cardEntity.cardOriginalData.EffectRange, 30.0f, currentNode, cardEntity); getNodeTools.setEffectRangePreview(cardEntity.cardOriginalData.EffectRange, 30.0f, currentNode, cardEntity);
//更新效果作用范围内怪物虚血
EnemyManager.Instance.ShowExpHp_Observer(cardEntity.influencePreviewPool);
//更新涂色预览材质
SettlementManager.Instance.PreviewSwitchColor(cardEntity.cardOriginalData, GameManager .Instance .playerOn );
} }
public void OnDrag(PointerEventData eventData) public void OnDrag(PointerEventData eventData)

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

@ -152,18 +152,17 @@ public class CardEntity : MonoBehaviour
//debug卡名 //debug卡名
//Debug.Log("打出"+cardOriginalData.ChineseName); //Debug.Log("打出"+cardOriginalData.ChineseName);
//Debug.Log("结算时候influencePreviewPool大小" + influencePreviewPool.Count); //Debug.Log("结算时候influencePreviewPool大小" + influencePreviewPool.Count);
//헌뇜渡응�
//깁저緞捲넥긴�
foreach (MapUnity mapUnity in influencePreviewPool)
{
mapUnity.influenced = false;
}
GameManager.Instance.SyncColourCountUI();
//结算效果 //结算效果
//生成子弹节点 //生成子弹节点
if(cardOriginalData.CastingRange>0) if (cardOriginalData.CastingRange>0)
{ {
//清除预览色
//遍历影响池变色
foreach (MapUnity mapUnity in influencePreviewPool)
{
mapUnity.influenced = false;
}
GameManager.Instance.SyncColourCountUI();
//遍历范围预览池消除影响色 //遍历范围预览池消除影响色
Debug.Log("清除前红色格数:" + GameManager.Instance.player.influencePreviewPool.Count); Debug.Log("清除前红色格数:" + GameManager.Instance.player.influencePreviewPool.Count);
@ -174,11 +173,10 @@ public class CardEntity : MonoBehaviour
MapUnityManager.Instance.castPool.Clear(); MapUnityManager.Instance.castPool.Clear();
var bulle = Instantiate(cardBulletPrefab, transform.position, cardBulletPrefab.transform.localRotation); var bulle = Instantiate(cardBulletPrefab, transform.position, cardBulletPrefab.transform.localRotation);
Debug.Log("发射1");
yield return StartCoroutine(bulle.GetComponent<BulletNode>().MoveToDestination(GetComponent<CardDrag>().currentNode.transform.position,GameManager .Instance .player .transform .position )); yield return StartCoroutine(bulle.GetComponent<BulletNode>().MoveToDestination(GetComponent<CardDrag>().currentNode.transform.position,GameManager .Instance .player .transform .position ));
} }
Debug.Log("发射2");
yield return StartCoroutine(DestructionManager.Instance.startDestoryAndUseCard(this.gameObject, cardOriginalData, influencePreviewPool, cardIndex, targetNode)); yield return StartCoroutine(DestructionManager.Instance.startDestoryAndUseCard(this.gameObject, cardOriginalData, influencePreviewPool, cardIndex, targetNode));
} }

44
ColorlessWorld-2024-4-2/Assets/Scripts/GameManager.cs

@ -1,6 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@ -247,6 +248,17 @@ public class GameManager : Singleton<GameManager>
sumMiddleText.text = whiteNodeCount.ToString(); sumMiddleText.text = whiteNodeCount.ToString();
sumRightText.text = blackNodeCount.ToString(); sumRightText.text = blackNodeCount.ToString();
float totoalNode = redNodeCount + blueNodeCount + greenNodeCount + whiteNodeCount + blackNodeCount; float totoalNode = redNodeCount + blueNodeCount + greenNodeCount + whiteNodeCount + blackNodeCount;
//ÎÄ×ÖλÖÃ
float length = barBox.sizeDelta.x;
redText.transform.localPosition = new Vector3((length * (Red.fillAmount - 1)) * 0.5f, 0, 0);
greenText.transform.localPosition = new Vector3(length * 0.5f * (Green.fillAmount + Red.fillAmount - 1), 0, 0);
blueText.transform.localPosition = new Vector3(length * 0.5f * (Bule.fillAmount + Green.fillAmount - 1), 0, 0);
whiteText.transform.localPosition = new Vector3(length * 0.5f * (White.fillAmount + Bule.fillAmount - 1), 0, 0);
blackText.transform.localPosition = new Vector3(length * 0.5f * White.fillAmount, 0, 0);
sumPlayerText.transform.localPosition = new Vector3(length * (Bule.fillAmount - 1) * 0.5f, 150, 0);
sumMiddleText.transform.localPosition = new Vector3(whiteText.transform.localPosition.x, 150, 0);
sumRightText.transform.localPosition = new Vector3(blackText.transform.localPosition.x, 150, 0);
//晇伎 //晇伎
Red.fillAmount = redNodeCountLatest / totoalNode; Red.fillAmount = redNodeCountLatest / totoalNode;
Green.fillAmount = Red.fillAmount + greenNodeCountLatest / totoalNode; Green.fillAmount = Red.fillAmount + greenNodeCountLatest / totoalNode;
@ -254,8 +266,23 @@ public class GameManager : Singleton<GameManager>
White.fillAmount = Bule.fillAmount + whiteNodeCountLatest / totoalNode; White.fillAmount = Bule.fillAmount + whiteNodeCountLatest / totoalNode;
// Black.fillAmount = Bule.fillAmount + blackNodeCountLatest / totoalNode; // Black.fillAmount = Bule.fillAmount + blackNodeCountLatest / totoalNode;
//啎擬芨伎 //啎擬芨伎
if (onDrag && currentCardEntity != null && currentMapNode != null && currentMapNode .influenced ==true) if (onDrag && currentCardEntity != null )
{ {
if(currentCardEntity.cardOriginalData.CastingRange != 0)
{
if( currentMapNode != null && currentMapNode.influenced == true)
{
}
else
{
return;
}
}
else
{
currentMapNode = playerOn;
}
List<int> ints = SettlementManager.Instance.PreviewColorMapUnity(currentCardEntity.cardOriginalData, currentMapNode); List<int> ints = SettlementManager.Instance.PreviewColorMapUnity(currentCardEntity.cardOriginalData, currentMapNode);
for (int i = 0; i < ints.Count; i++) for (int i = 0; i < ints.Count; i++)
{ {
@ -382,17 +409,6 @@ public class GameManager : Singleton<GameManager>
sumRightTextPre.gameObject.SetActive(false); sumRightTextPre.gameObject.SetActive(false);
} }
//ÎÄ×ÖλÖÃ
float length = barBox.sizeDelta.x;
redText.transform.localPosition = new Vector3((length * (Red.fillAmount-1))*0.5f, 0, 0);
greenText.transform.localPosition = new Vector3(length * 0.5f * (Green.fillAmount + Red.fillAmount - 1), 0, 0);
blueText.transform.localPosition = new Vector3(length * 0.5f * (Bule.fillAmount + Green.fillAmount - 1), 0, 0);
whiteText .transform .localPosition = new Vector3 (length * 0.5f * (White.fillAmount + Bule.fillAmount - 1), 0, 0);
blackText.transform.localPosition= new Vector3 (length * 0.5f * White.fillAmount , 0, 0);
sumPlayerText .transform .localPosition = new Vector3 (length * (Bule.fillAmount - 1) * 0.5f,150,0);
sumMiddleText.transform.localPosition = new Vector3(whiteText.transform.localPosition.x, 150, 0);
sumRightText.transform.localPosition = new Vector3(blackText.transform.localPosition.x, 150, 0);
//怮栠 //怮栠
string advColor = MapUnityManager.Instance.getAdvNode(); string advColor = MapUnityManager.Instance.getAdvNode();
if(lastSunColor != advColor ) if(lastSunColor != advColor )
@ -426,9 +442,7 @@ public class GameManager : Singleton<GameManager>
sunImage.color = Color.gray; sunImage.color = Color.gray;
break; break;
} }
} }
} }
//苀數部華晇伎 //苀數部華晇伎

5
ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs

@ -49,7 +49,7 @@ public class MapUnity : MonoBehaviour
public Material greenPre; public Material greenPre;
public Material bluePre; public Material bluePre;
public Material whitePre; public Material whitePre;
public Material blackPre;
[Header("第窐ⅸ醱")] [Header("第窐ⅸ醱")]
public GameObject whoColourPlane;//第窐ⅸ醱 public GameObject whoColourPlane;//第窐ⅸ醱
public ParticleSystem colourBrokenParticle; public ParticleSystem colourBrokenParticle;
@ -183,6 +183,9 @@ public class MapUnity : MonoBehaviour
case 4: case 4:
playerMark.meshRenderer.material = greenPre; playerMark.meshRenderer.material = greenPre;
break; break;
case 5:
playerMark.meshRenderer.material = blackPre;
break;
} }
} }
public void RegisterUnit() public void RegisterUnit()

Loading…
Cancel
Save