private void OnPickUp(PickUpAbleComponent arg0) { var ropeElement = arg0.GetComponentInParent <RopeElement>(); if (ropeElement) { ropeSelected = ropeElement; } }
private void OnPickUpElement(PickUpAbleComponent arg0) { var detachItem = arg0.GetComponentInParent <DetachItem>(); if (detachItem) { Debug.Log("PickUp:" + arg0); detachItem.UnNotice(detachItem.transform); } }
private void OnPickStay(PickUpAbleComponent arg0) { if (!Active) { return; } var placeElement = arg0.GetComponentInParent <PlaceElement>(); if (placeElement) { TryPlaceObject(placeElement); } }
private void OnPickTwinceRight(PickUpAbleComponent obj) { if (!Active) { return; } var item = obj.GetComponentInParent <LinkItem>(); if (item) { ElementController.Instence.ClearExtraCreated(); } linkItem = null; }
void OnPickStay(PickUpAbleComponent obj) { if (!Active) { return; } var item = obj.GetComponentInParent <LinkItem>(); if (item) { LinkUtil.ClearActivedLinkPort(item); linkConnectCtrl.TryConnect(); pickCtrl.PickStay(); } linkItem = null; }
/// <summary> /// 解除连接 /// </summary> /// <param name="obj"></param> void OnPickTwinceLeft(PickUpAbleComponent obj) { if (!Active) { return; } var item = obj.GetComponentInParent <LinkItem>(); if (item) { this.linkItem = item; if (linkItem && !linkItem.Used) { linkConnectCtrl.SetActiveItem(linkItem, true); } } }
/// <summary> /// 放下 /// </summary> /// <param name="obj"></param> void OnPickDown(PickUpAbleComponent obj) { if (!Active) { return; } var item = obj.GetComponentInParent <LinkItem>(); if (item) { LinkUtil.ClearActivedLinkPort(linkItem); if (linkItem) { linkConnectCtrl.SetDisableItem(); } } this.linkItem = null; }
void OnPickUp(PickUpAbleComponent obj) { if (!Active) { return; } var item = obj.GetComponentInParent <LinkItem>(); if (item) { this.linkItem = item; if (linkItem) { linkConnectCtrl.SetActiveItem(linkItem, false); //显示可以所有可以安装的点 LinkUtil.TryActiveLinkPorts(linkItem); } } }
private void OnPickStay(PickUpAbleComponent item) { var chargeTool = item.GetComponentInParent <ChargeTool>(); if (chargeTool) { var currTool = chargeTool; if (chargeResource != null) { var value = Mathf.Min(currTool.capacity, chargeResource.current); var type = chargeResource.type; currTool.RetriveFeature <PickUpAbleFeature>().PickUpAble = false; currTool.LoadData(chargeResource.transform.position, new ChargeData(type, value), () => { currTool.RetriveFeature <PickUpAbleFeature>().PickUpAble = true; }); chargeResource.Subtruct(value, () => { }); highter.UnHighLightTarget(chargeResource.gameObject); lastMatchChargeResource = chargeResource = null; } else if (chargeObj != null) { var data = currTool.data; ChargeData worpData = chargeObj.JudgeLeft(data); if (!string.IsNullOrEmpty(worpData.type)) { currTool.RetriveFeature <PickUpAbleFeature>().PickUpAble = false; currTool.OnCharge(chargeObj.transform.position, worpData.value, () => { currTool.RetriveFeature <PickUpAbleFeature>().PickUpAble = true; }); chargeObj.Charge(worpData, () => { chargeObj.JudgeComplete(); }); } highter.UnHighLightTarget(chargeObj.gameObject); lastMatchChargeObj = null; } } }
private void OnPickDownElement(PickUpAbleComponent arg0) { var detachItem = arg0.GetComponentInParent <DetachItem>(); DetachTargetItem(detachItem); }