/// <summary> /// 移除依附的卡片 /// ref : https://www.yuque.com/u314548/fc6a5l/dozp0e /// </summary> /// <param name="flockAgent"></param> private void RemoveRefCard(FlockAgent flockAgent) { Debug.Log("移除依附的卡片: " + flockAgent.gameObject + " status : " + flockAgent.flockStatus); // 会出现flockAgent为normal的情况 if (flockAgent.flockStatus == FlockStatusEnum.TOHIDE) { // 停止移动与缩小动画 flockAgent.flockTweenerManager.Get(FlockTweenerManager.Kinnect_Choose_Move).Kill(); flockAgent.flockTweenerManager.Get(FlockTweenerManager.Kinnect_Choose_Scale).Kill(); flockAgent.RecoverToOriginPosition(); //Debug.Log(flockAgent.gameObject.name + " status TOHIDE: " + flockAgent.flockStatus); } else if (flockAgent.flockStatus == FlockStatusEnum.HIDE) { if (flockAgent.GetCardAgent.CardStatus == CardStatusEnum.GENERATE) { Debug.Log(flockAgent.GetCardAgent.gameObject.name + " 正在生成中,进行销毁"); // 停止放大动画并关闭 flockAgent.GetCardAgent.SetDisableEffect(true); flockAgent.GetCardAgent.CancelGoToFront(() => { }); flockAgent.GetCardAgent.DoCloseDirect(); } else { Debug.Log(flockAgent.GetCardAgent.gameObject.name + " 其他状态,进行销毁 - " + flockAgent.GetCardAgent.CardStatus); flockAgent.GetCardAgent.SetDisableEffect(true); flockAgent.GetCardAgent.DoCloseDirect(); } } }