void Start() { schemeManifestScroll = scroRect.GetComponent <SchemeManifestScroll>(); if (itemData.special == true) { Button addManifest = transform.FindChild("view/AddManifest").GetComponent <Button>(); manifestImage = UITool.GetUIComponent <RawImage>(this.transform, "view"); manifestImage.enabled = false; addManifest.onClick.AddListener(AddManifestClick); } else { viewRect = UITool.GetUIComponent <RectTransform>(this.transform, "view"); manifestImage = UITool.GetUIComponent <RawImage>(this.transform, "view"); DrapButton effectBtn = manifestImage.gameObject.AddComponent <DrapButton>(); effectBtn.onPointerDownDele = onPointerDown; effectBtn.onPointerUpDele = onPointerUp; effectBtn.onDragDele = onDrag; effectBtn.onPointerClickDele = onClick; tranRect = this.GetComponent <RectTransform>(); tranRect.gameObject.SetActive(true); coll = new Collider2D [8]; manifestName = UITool.GetUIComponent <Text>(this.transform, "view/Text"); SetMainManifest = UITool.GetUIComponent <RectTransform>(this.transform, "view/ManifestImage"); } }
protected override void Awake() { image = BumUITool.GetUIComponent <RawImage>(this.transform, "RawImage"); DrapButton button = this.gameObject.AddComponent <DrapButton>(); button.onPointerDownDele = onPointerDown; button.onPointerUpDele = onPointerUp; button.onDragDele = onPointDrag; button.onPointerClickDele = onClick; }
protected override void Awake() { image = this.gameObject.GetComponent <RawImage>(); DrapButton button = this.gameObject.AddComponent <DrapButton>(); button.onPointerDownDele = onPointerDown; button.onPointerUpDele = onPointerUp; button.onDragDele = onPointDrag; button.onPointerUpDele = onClick; MaterialDelete = UITool.GetUIComponent <Button>(transform, "delete"); }
public void SetData(IStateMachine selectMachine) { //RawImage image = transform.GetComponent<RawImage>(); DrapButton button = gameObject.GetComponent <DrapButton>(); if (button == null) { button = gameObject.AddComponent <DrapButton>(); } button.onPointerDownDele = OnPointerDown; this.selectMachine = selectMachine; }
void Start() { view = this.transform.FindChild("view").GetComponent <RectTransform>(); DrapButton button = view.gameObject.AddComponent <DrapButton>(); button.onPointerDownDele = onPointerDown; button.onPointerUpDele = onPointerUp; button.onDragDele = onDrag; button.onPointerClickDele = onClick; uscroll = scroRect.GetComponent <UScrollList>(); rectTran = this.GetComponent <RectTransform>(); coll = new Collider2D[8]; offer = this.transform.FindChild("view/Offer").GetComponent <RectTransform>(); offer.GetComponent <Button>().onClick.AddListener(OpenOffer); }
protected override void Awake() { itemRect = this.GetComponent <RectTransform>(); DrapButton button = this.gameObject.AddComponent <DrapButton>(); button.onDragDele = onDrag; productImage = UITool.GetUIComponent <RawImage>(this.transform, "RawImage"); productName = UITool.GetUIComponent <Text>(this.transform, "name"); brand = UITool.GetUIComponent <Text>(this.transform, "brand"); unitPrice = UITool.GetUIComponent <Text>(this.transform, "unitPrice"); productNo = UITool.GetUIComponent <Text>(this.transform, "no"); add = UITool.GetUIComponent <Button>(this.transform, "number/Editor/addBtn"); add.onClick.AddListener(onAdd); reduce = UITool.GetUIComponent <Button>(this.transform, "number/Editor/reduceBtn"); reduce.onClick.AddListener(onReduce); itemDelete = UITool.GetUIComponent <Button>(this.transform, "delete"); itemDelete.onClick.AddListener(onItemDelete); editorNumber = UITool.GetUIComponent <Text>(this.transform, "number/Editor/numberText/number"); selectToggle = UITool.GetUIComponent <Toggle>(this.transform, "total"); selectToggle.onValueChanged.AddListener(onSelectToggle); totalText = UITool.GetUIComponent <Text>(this.transform, "total/Label"); }