|
|
|
@ -13,30 +13,90 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag |
|
|
|
public Transform originalParent; |
|
|
|
public Vector3 originalpoint; |
|
|
|
public EventSystem eventSystem; |
|
|
|
bool canUse = true;//决定卡牌是否可以释放
|
|
|
|
bool choosed;//标识卡牌是否被选中
|
|
|
|
|
|
|
|
[Header("贝塞尔曲线瞄准")] |
|
|
|
public GameObject ainPanle; |
|
|
|
|
|
|
|
[Header("影响格参数")] |
|
|
|
public MapUnity currentNode;//瞄准的格子
|
|
|
|
public List<MapUnity> influencePreviewPool; |
|
|
|
|
|
|
|
|
|
|
|
//[Header("卡牌属性")]
|
|
|
|
private CardEntity cardEntity; |
|
|
|
|
|
|
|
void Start() |
|
|
|
{ |
|
|
|
eventSystem = GameObject.FindObjectOfType<EventSystem>(); |
|
|
|
cardEntity=GetComponent<CardEntity>(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void Update() |
|
|
|
{ |
|
|
|
handleRightClickCancel(); |
|
|
|
|
|
|
|
} |
|
|
|
//检查卡牌的费用是否可以释放
|
|
|
|
private void costCheck() |
|
|
|
{ |
|
|
|
Debug.Log("当前费用:" + TurnMaster.Instance.currentCost); |
|
|
|
Debug.Log("总费用:" + Usermanager.Instance.totalCost); |
|
|
|
if (TurnMaster.Instance.currentCost - cardEntity.cardOriginalData.Cost < 0) |
|
|
|
{ |
|
|
|
Debug.Log("费用不足"); |
|
|
|
cardEntity.costEnough = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void resetComponentPosition() |
|
|
|
{ |
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
//遍历影响池变色
|
|
|
|
for (int i = 0; i < cardEntity.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
cardEntity.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
cardEntity.influencePreviewPool.Clear(); |
|
|
|
|
|
|
|
|
|
|
|
//其他位置都归位
|
|
|
|
transform.SetParent(originalParent); |
|
|
|
transform.localPosition = originalpoint; |
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//右键取消释放
|
|
|
|
private void handleRightClickCancel() |
|
|
|
{ |
|
|
|
|
|
|
|
if (choosed && Mouse.current.rightButton.wasPressedThisFrame) |
|
|
|
{ |
|
|
|
Debug.Log("取消释放"); |
|
|
|
canUse = false;//取消释放
|
|
|
|
ainPanle.SetActive(false); |
|
|
|
resetComponentPosition(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public void OnBeginDrag(PointerEventData eventData) |
|
|
|
{ |
|
|
|
// if (GameObject.Find("CardPanel") != null)
|
|
|
|
// graphicRaycaster = GameObject.Find("CardPanel").GetComponent<GraphicRaycaster>();
|
|
|
|
costCheck(); |
|
|
|
if (!cardEntity.costEnough) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
choosed = true; |
|
|
|
|
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = false; |
|
|
|
|
|
|
|
@ -47,32 +107,19 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag |
|
|
|
transform.position = eventData.position; |
|
|
|
|
|
|
|
//根据卡牌数据决定是否调用曲线
|
|
|
|
|
|
|
|
|
|
|
|
ainPanle.SetActive(true); |
|
|
|
|
|
|
|
//todo-统一确定锚点位置
|
|
|
|
|
|
|
|
//重新调用范围预览--以后要写到卡牌效果里,现在默认影响1格
|
|
|
|
GameManager.Instance.player.StepPreviewInfluencedNode(1); |
|
|
|
if (cardEntity.cardOriginalData.CastingRange != 0) |
|
|
|
{ |
|
|
|
//释放范围为0则不需要调用曲线
|
|
|
|
ainPanle.SetActive(true); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
ainPanle.SetActive(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void OnDrag(PointerEventData eventData) |
|
|
|
private void ainPanleWork(PointerEventData eventData) |
|
|
|
{ |
|
|
|
/* Vector3 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition); |
|
|
|
pos.z = 0; |
|
|
|
transform.position = pos;*/ |
|
|
|
// transform.position = eventData.position;
|
|
|
|
|
|
|
|
|
|
|
|
//selecton = eventData.pointerCurrentRaycast.gameObject;
|
|
|
|
|
|
|
|
//返回射线碰到的物品名称
|
|
|
|
// if (eventData.pointerCurrentRaycast.gameObject != null)
|
|
|
|
// Debug.Log(eventData.pointerCurrentRaycast.gameObject.name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//射线检测瞄准的地图节点,判断是否可放置和改变放置影响区
|
|
|
|
Ray ray = Camera.main.ScreenPointToRay(Mouse.current.position.value); |
|
|
|
if (eventData.pointerCurrentRaycast.gameObject != null) |
|
|
|
@ -83,72 +130,68 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag |
|
|
|
//检测到跟上次瞄准地方不同,更新
|
|
|
|
if (currentNode == null || raycastHit.collider.transform.gameObject != currentNode.gameObject) |
|
|
|
{ |
|
|
|
for (int i = 0; i < influencePreviewPool.Count; i++) |
|
|
|
for (int i = 0; i < cardEntity.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
influencePreviewPool[i].influenced = false; |
|
|
|
cardEntity.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
influencePreviewPool.Clear(); |
|
|
|
cardEntity.influencePreviewPool.Clear(); |
|
|
|
currentNode = raycastHit.collider.transform.GetComponent<MapUnity>(); |
|
|
|
|
|
|
|
//重新调用范围预览
|
|
|
|
GameManager.Instance.player.StepPreviewInfluencedNode(1); |
|
|
|
GameManager.Instance.player.StepPreviewInfluencedNode(cardEntity.cardOriginalData.CastingRange); |
|
|
|
Debug.Log(cardEntity.cardOriginalData.CastingRange); |
|
|
|
//预览影响范围
|
|
|
|
if (currentNode.influenced) |
|
|
|
{ |
|
|
|
//根据卡牌属性改变影响池
|
|
|
|
influencePreviewPool.Add(currentNode); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode); |
|
|
|
Vector3 face = currentNode.transform.position - GameManager.Instance.playerOn.transform.position; |
|
|
|
float euler = Vector3.SignedAngle(-GameManager.Instance.playerOn.transform.forward, face, GameManager.Instance.playerOn.transform.up) + 180; |
|
|
|
Debug.Log(euler); |
|
|
|
if (euler > 0 && euler < 45) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[0] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[0]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[0]); |
|
|
|
if (currentNode.unitPool[4] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[4]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[4]); |
|
|
|
} |
|
|
|
else if (euler > 45 && euler < 135) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[1] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[1]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[1]); |
|
|
|
if (currentNode.unitPool[5] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[5]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[5]); |
|
|
|
} |
|
|
|
else if (euler > 135 && euler < 180) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[2] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[2]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[2]); |
|
|
|
if (currentNode.unitPool[0] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[0]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[0]); |
|
|
|
} |
|
|
|
else if (euler > 180 && euler < 225) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[1] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[1]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[1]); |
|
|
|
if (currentNode.unitPool[3] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[3]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[3]); |
|
|
|
} |
|
|
|
else if (euler > 225 && euler < 315) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[2] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[2]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[2]); |
|
|
|
if (currentNode.unitPool[4] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[4]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[4]); |
|
|
|
} |
|
|
|
else if (euler > 315 && euler < 360) |
|
|
|
{ |
|
|
|
if (currentNode.unitPool[3] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[3]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[3]); |
|
|
|
if (currentNode.unitPool[5] != null) |
|
|
|
influencePreviewPool.Add(currentNode.unitPool[5]); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode.unitPool[5]); |
|
|
|
} |
|
|
|
//influencePreviewPool.Add(currentNode);
|
|
|
|
//遍历影响池变色
|
|
|
|
for (int i = 0; i < influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
influencePreviewPool[i].influenced = true; |
|
|
|
influencePreviewPool[i].choossedMark.GetComponent<Renderer>().material = influencePreviewPool[i].yellow; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -156,113 +199,169 @@ public class CardDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDrag |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Debug.Log("结束影响数值" + cardEntity.influencePreviewPool.Count); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void OnEndDrag(PointerEventData eventData) |
|
|
|
private void noAinPanleWork(PointerEventData eventData) |
|
|
|
{ |
|
|
|
|
|
|
|
Ray ray = Camera.main.ScreenPointToRay(Mouse.current.position.value); |
|
|
|
if (eventData.pointerCurrentRaycast.gameObject != null) |
|
|
|
{ |
|
|
|
if (eventData.pointerCurrentRaycast.gameObject.name == "Card") |
|
|
|
if (Physics.Raycast(ray, out RaycastHit raycastHit)) |
|
|
|
{ |
|
|
|
transform.SetParent(eventData.pointerCurrentRaycast.gameObject.transform.parent); |
|
|
|
transform.position = eventData.pointerCurrentRaycast.gameObject.transform.position; |
|
|
|
eventData.pointerCurrentRaycast.gameObject.transform.position = originalParent.position; |
|
|
|
eventData.pointerCurrentRaycast.gameObject.transform.SetParent(originalParent); |
|
|
|
|
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
currentNode = raycastHit.collider.transform.GetComponent<MapUnity>(); |
|
|
|
cardEntity.influencePreviewPool.Add(currentNode); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
public void OnDrag(PointerEventData eventData) |
|
|
|
{ |
|
|
|
if (!cardEntity.costEnough) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
else if (eventData.pointerCurrentRaycast.gameObject.name == "cardSlot") |
|
|
|
{ |
|
|
|
transform.SetParent(eventData.pointerCurrentRaycast.gameObject.transform); |
|
|
|
transform.position = eventData.pointerCurrentRaycast.gameObject.transform.position; |
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
if (cardEntity.cardOriginalData.CastingRange != 0) |
|
|
|
{ |
|
|
|
ainPanleWork(eventData); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//没有范围不需要射线吧,因为不需要指定目标点?
|
|
|
|
// noAinPanleWork(eventData);
|
|
|
|
} |
|
|
|
dyeing(); |
|
|
|
|
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
private void dyeing() |
|
|
|
{ |
|
|
|
//遍历影响池变色
|
|
|
|
for (int i = 0; i < cardEntity.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
cardEntity.influencePreviewPool[i].influenced = true; |
|
|
|
cardEntity.influencePreviewPool[i].choossedMark.GetComponent<Renderer>().material = cardEntity.influencePreviewPool[i].yellow; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
|
|
|
|
//检测碰撞的地图节点是否被影响(可释放)
|
|
|
|
if (currentNode == null || currentNode.influenced == false) |
|
|
|
public void OnEndDrag(PointerEventData eventData) |
|
|
|
{ |
|
|
|
if (!cardEntity.costEnough) |
|
|
|
{ |
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
return; |
|
|
|
} |
|
|
|
else if (currentNode.influenced) |
|
|
|
choosed = false; |
|
|
|
if (canUse) |
|
|
|
{ |
|
|
|
|
|
|
|
//卡牌释放效果
|
|
|
|
CardEntity cardEntity = this.GetComponent<CardEntity>(); |
|
|
|
cardEntity.use(); |
|
|
|
Debug.Log(Usermanager.Instance.Health); |
|
|
|
//临时效果--将颜色变成玩家颜色
|
|
|
|
for (int i = 0; i < influencePreviewPool.Count; i++) |
|
|
|
Debug.Log("进入影响数值" + cardEntity.influencePreviewPool.Count); |
|
|
|
if (eventData.pointerCurrentRaycast.gameObject != null) |
|
|
|
{ |
|
|
|
influencePreviewPool[i].whoColour = MapUnity.WhoColour.playerColour; |
|
|
|
//造成伤害
|
|
|
|
if (influencePreviewPool[i].enemyNode != null) |
|
|
|
if (eventData.pointerCurrentRaycast.gameObject.name == "Card") |
|
|
|
{ |
|
|
|
influencePreviewPool[i].enemyNode.EnemyState.currentHP -= 50; |
|
|
|
Debug.Log(influencePreviewPool[i].enemyNode.EnemyState.currentHP); |
|
|
|
if (influencePreviewPool[i].enemyNode.EnemyState.currentHP <= 0) |
|
|
|
transform.SetParent(eventData.pointerCurrentRaycast.gameObject.transform.parent); |
|
|
|
transform.position = eventData.pointerCurrentRaycast.gameObject.transform.position; |
|
|
|
eventData.pointerCurrentRaycast.gameObject.transform.position = originalParent.position; |
|
|
|
eventData.pointerCurrentRaycast.gameObject.transform.SetParent(originalParent); |
|
|
|
|
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
|
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
influencePreviewPool[i].enemyNode.OnDeath(); |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
//GameManager.Instance.player.influencePreviewPool.Clear();
|
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
//临时效果结束
|
|
|
|
else if (eventData.pointerCurrentRaycast.gameObject.name == "cardSlot") |
|
|
|
{ |
|
|
|
transform.SetParent(eventData.pointerCurrentRaycast.gameObject.transform); |
|
|
|
transform.position = eventData.pointerCurrentRaycast.gameObject.transform.position; |
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
|
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
//GameManager.Instance.player.influencePreviewPool.Clear();
|
|
|
|
|
|
|
|
//遍历影响池变色
|
|
|
|
for (int i = 0; i < influencePreviewPool.Count; i++) |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (ainPanle.activeSelf) |
|
|
|
{ |
|
|
|
influencePreviewPool[i].influenced = false; |
|
|
|
ainPanle.SetActive(false);//关闭贝塞尔曲线
|
|
|
|
} |
|
|
|
influencePreviewPool.Clear(); |
|
|
|
|
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
//先判断该卡牌的类型是否是需要范围
|
|
|
|
if (cardEntity.cardOriginalData.CastingRange != 0) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
//检测碰撞的地图节点是否被影响(可释放)
|
|
|
|
if (currentNode == null || currentNode.influenced == false) |
|
|
|
{ |
|
|
|
//遍历范围预览池消除影响色(红色,卡牌的释放范围)
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
//GameManager.Instance.player.influencePreviewPool.Clear();
|
|
|
|
} |
|
|
|
else if (currentNode.influenced) |
|
|
|
{ |
|
|
|
|
|
|
|
//临时效果--将其加入墓地并销毁实体
|
|
|
|
TurnMaster.Instance.usedCard.usedCardList.Add(this.gameObject.GetComponent<CardEntity>().CardId); |
|
|
|
Destroy(this.gameObject); |
|
|
|
} |
|
|
|
//卡牌释放效果
|
|
|
|
cardEntity.use(); |
|
|
|
Debug.Log("玩家盾量:" + Usermanager.Instance.Shield); |
|
|
|
|
|
|
|
//临时效果--将其加入墓地并销毁实体
|
|
|
|
TurnMaster.Instance.usedCard.usedCardList.Add(this.gameObject.GetComponent<CardEntity>().CardId); |
|
|
|
Destroy(this.gameObject); |
|
|
|
} |
|
|
|
//遍历范围预览池消除影响色
|
|
|
|
for (int i = 0; i < GameManager.Instance.player.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
GameManager.Instance.player.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
GameManager.Instance.player.influencePreviewPool.Clear(); |
|
|
|
//遍历影响池变色
|
|
|
|
for (int i = 0; i < cardEntity.influencePreviewPool.Count; i++) |
|
|
|
{ |
|
|
|
cardEntity.influencePreviewPool[i].influenced = false; |
|
|
|
} |
|
|
|
cardEntity.influencePreviewPool.Clear(); |
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
|
|
|
|
//其他位置都归位
|
|
|
|
transform.SetParent(originalParent); |
|
|
|
transform.localPosition = originalpoint; |
|
|
|
return; |
|
|
|
}//范围类,需要指定被影响的节点才能释放
|
|
|
|
else |
|
|
|
{ |
|
|
|
//卡牌释放效果
|
|
|
|
cardEntity.use(); |
|
|
|
Debug.Log("玩家盾量:" + Usermanager.Instance.Shield); |
|
|
|
|
|
|
|
GetComponent<CanvasGroup>().blocksRaycasts = true; |
|
|
|
//临时效果--将其加入墓地并销毁实体
|
|
|
|
TurnMaster.Instance.usedCard.usedCardList.Add(this.gameObject.GetComponent<CardEntity>().CardId); |
|
|
|
Destroy(this.gameObject); |
|
|
|
|
|
|
|
//其他位置都归位
|
|
|
|
transform.SetParent(originalParent); |
|
|
|
transform.localPosition = originalpoint; |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
}//无范围类,直接释放
|
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
canUse = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|