| | |
| | | using UnityEngine; |
| | | using UnityEngine.EventSystems; |
| | | using UnityEngine.UI; |
| | | using KTGMGemClient; |
| | | |
| | | public class ImageFire2 : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler |
| | | public class ImageFire2 : GuideImageBase, IDragHandler, IBeginDragHandler, IEndDragHandler |
| | | { |
| | | bool isDraging; |
| | | public bool IsDraging |
| | | { |
| | | get |
| | | { |
| | | return isDraging; |
| | | } |
| | | } |
| | | |
| | | public void OnBeginDrag(PointerEventData eventData) |
| | | { |
| | | isDraging = true; |
| | |
| | | { |
| | | //合成宝石 |
| | | Debug.Log("合成宝石"); |
| | | imageFire1.Add(); |
| | | //imageFire1.GetComponent<ImageFire1>().Add(); |
| | | gameObject.SetActive(false); |
| | | } |
| | | else |
| | |
| | | |
| | | } |
| | | |
| | | ImageFire1 imageFire1; |
| | | GameObject imageFire1; |
| | | Image tmpImage; |
| | | |
| | | Vector2 pos; |
| | | |
| | | RectTransform rectTransform; |
| | | // Start is called before the first frame update |
| | | void Start() |
| | | //Vector3 startP; |
| | | public Vector2 GetStartP |
| | | { |
| | | get |
| | | { |
| | | return pos; |
| | | } |
| | | } |
| | | // Start is called before the first frame update |
| | | private void Awake() |
| | | { |
| | | //startP = transform.position; |
| | | |
| | | //imageFire1 = transform.parent.Find("Image_Fire1").GetComponent<ImageFire1>(); |
| | | tmpImage = GetComponent<Image>(); |
| | | rectTransform = GetComponent<RectTransform>(); |
| | | pos = rectTransform.anchoredPosition; |
| | | } |
| | | |
| | | public void SetTarget(ImageFire1 target) |
| | | public override void SetTarget(GameObject target) |
| | | { |
| | | imageFire1 = target; |
| | | } |