Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master
| | |
| | | - component: {fileID: 5505873235187401071} |
| | | - component: {fileID: 8891851379930425690} |
| | | - component: {fileID: 6418061980042100442} |
| | | - component: {fileID: 444226696059011278} |
| | | m_Layer: 5 |
| | | m_Name: DropCoinImage |
| | | m_TagString: Untagged |
| | |
| | | m_OnClick: |
| | | m_PersistentCalls: |
| | | m_Calls: [] |
| | | --- !u!114 &444226696059011278 |
| | | MonoBehaviour: |
| | | m_ObjectHideFlags: 0 |
| | | m_CorrespondingSourceObject: {fileID: 0} |
| | | m_PrefabInstance: {fileID: 0} |
| | | m_PrefabAsset: {fileID: 0} |
| | | m_GameObject: {fileID: 5908441539477700656} |
| | | m_Enabled: 1 |
| | | m_EditorHideFlags: 0 |
| | | m_Script: {fileID: 11500000, guid: 5775d385a42ffed458ba3c509a45b09f, type: 3} |
| | | m_Name: |
| | | m_EditorClassIdentifier: |
| | | --- !u!1 &5908441539751368294 |
| | | GameObject: |
| | | m_ObjectHideFlags: 0 |
| | |
| | | m_GameObject: {fileID: 1227610056024535752} |
| | | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
| | | m_LocalPosition: {x: 0, y: 0, z: 0} |
| | | m_LocalScale: {x: 1, y: 1, z: 1} |
| | | m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} |
| | | m_Children: [] |
| | | m_Father: {fileID: 0} |
| | | m_RootOrder: 0 |
| | | 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: -105, y: 0} |
| | | m_SizeDelta: {x: 67, y: 67} |
| | | m_AnchoredPosition: {x: 0, y: 0} |
| | | m_SizeDelta: {x: 52, y: 58} |
| | | m_Pivot: {x: 0.5, y: 0.5} |
| | | --- !u!222 &8351290247369744125 |
| | | CanvasRenderer: |
| | |
| | | m_EditorClassIdentifier: |
| | | m_Material: {fileID: 0} |
| | | m_Color: {r: 1, g: 1, b: 1, a: 1} |
| | | m_RaycastTarget: 1 |
| | | m_RaycastTarget: 0 |
| | | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} |
| | | m_Maskable: 1 |
| | | m_OnCullStateChanged: |
| | | m_PersistentCalls: |
| | | m_Calls: [] |
| | | m_Sprite: {fileID: 21300000, guid: 22253e4af58f9504ea78ba1dd24ff910, type: 3} |
| | | m_Sprite: {fileID: 21300000, guid: f95a7e975f487ac4b932bea4f52cc966, type: 3} |
| | | m_Type: 0 |
| | | m_PreserveAspect: 0 |
| | | m_FillCenter: 1 |
| | |
| | | //Debug.Log($"需要处理掉落特效 rate:{rate} EndlessLevelManager.instance.DropRate:{EndlessLevelManager.instance.DropRate}"); |
| | | if (rate <= EndlessLevelManager.instance.DropRate) |
| | | { |
| | | PlayDropCoinPS(agent.position); |
| | | } |
| | | } |
| | | PlayDropCoinPS(agent.position); |
| | | |
| | | EndlessLevelManager.instance.Currency.AddCurrency(lootDropped); |
| | | PlayDropGold(lootDropped, agent.position); |
| | |
| | | |
| | | } |
| | | |
| | | public void FlyIcon(Transform ts, Sprite sp, Vector3 startP, Vector3 endP, bool useBezier) |
| | | public void FlyIcon(Transform ts, Sprite sp, Vector3 startP, Vector3 endP, bool useBezier, int count) |
| | | { |
| | | StartCoroutine(CreateIcon(ts, sp, startP, endP, useBezier)); |
| | | StartCoroutine(CreateIcon(ts, sp, startP, endP, useBezier, count)); |
| | | } |
| | | |
| | | IEnumerator CreateIcon(Transform ts, Sprite sp, Vector3 startP, Vector3 endP, bool useBezier) |
| | | IEnumerator CreateIcon(Transform ts, Sprite sp, Vector3 startP, Vector3 endP, bool useBezier, int count) |
| | | { |
| | | FlyImage fly; |
| | | |
| | |
| | | // } |
| | | // yield return new WaitForSeconds(0.2f); |
| | | |
| | | for (int i = 0; i < 15; i++) |
| | | |
| | | for (int i = 0; i < count; i++) |
| | | { |
| | | fly = CreateIcon(ts); |
| | | fly.SetDestination(sp, startP, endP, useBezier); |
| | |
| | | void Awake() |
| | | { |
| | | tmpBtn = transform.GetComponent<Button>(); |
| | | flyImage = transform.GetComponent<FlyImage>(); |
| | | //flyImage = transform.GetComponent<FlyImage>(); |
| | | tmpBtn.onClick.AddListener(OnClick); |
| | | } |
| | | |
| | |
| | | } |
| | | bool countdown; |
| | | float timer; |
| | | |
| | | |
| | | public void Init() |
| | | { |
| | | timer = 0; |
| | |
| | | { |
| | | tmpBtn.interactable = false; |
| | | RectTransform end = GameObject.Find("UICamera/MainUI/FlyEndPos").GetComponent<RectTransform>(); |
| | | flyImage.SetDestination(null, transform.position, end.position, true); |
| | | |
| | | //金币飞动 增加多少个金币,制造多少个 |
| | | TowerDefense.Level.EndlessDropManager.instance.FlyIcon( |
| | | transform.parent, |
| | | null, |
| | | transform.position, |
| | | end.position, |
| | | true, |
| | | TowerDefense.Level.EndlessLevelManager.instance.DropCoin); |
| | | Core.Utilities.Poolable.TryPool(gameObject); |
| | | //flyImage.SetDestination(null, transform.position, end.position, true); |
| | | } |
| | | } |
| | |
| | | public GameObject drapIcon; |
| | | public void OnClick() |
| | | { |
| | | if (isBox) |
| | | { |
| | | EndlessDropManager.instance.FlyIcon(transform.parent, Icon.sprite, transform.position, (propBtn.transform as RectTransform).position, true); |
| | | } |
| | | else |
| | | { |
| | | FlyImage fly = EndlessDropManager.instance.CreateIcon(transform.parent); |
| | | fly.SetDestination(Icon.sprite, transform.position, (propBtn.transform as RectTransform).position, false); |
| | | } |
| | | if (ClickDropEvent != null) |
| | | ClickDropEvent(DropData); |
| | | // if (isBox) |
| | | // { |
| | | // EndlessDropManager.instance.FlyIcon(transform.parent, Icon.sprite, transform.position, (propBtn.transform as RectTransform).position, true); |
| | | // } |
| | | // else |
| | | // { |
| | | // FlyImage fly = EndlessDropManager.instance.CreateIcon(transform.parent); |
| | | // fly.SetDestination(Icon.sprite, transform.position, (propBtn.transform as RectTransform).position, false); |
| | | // } |
| | | // if (ClickDropEvent != null) |
| | | // ClickDropEvent(DropData); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | private void Close() |
| | | { |
| | | Debug.Log("到终点了,可以消失了" + EndlessLevelManager.instance.DropCoin); |
| | | //Debug.Log("到终点了,可以消失了" + EndlessLevelManager.instance.DropCoin); |
| | | |
| | | //gameObject.SetActive(false); |
| | | gameObject.SetActive(false); |
| | | |
| | | EndlessLevelManager.instance.Currency.AddCurrency(EndlessLevelManager.instance.DropCoin); |
| | | EndlessLevelManager.instance.Currency.AddCurrency(1);//每个金币增加1 |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.PlayGetGoldPS); |
| | | Core.Utilities.Poolable.TryPool(gameObject); |
| | | //Core.Utilities.Poolable.TryPool(gameObject); |
| | | } |
| | | |
| | | /// <summary> |