public void OnPress(bool isPressed) { if (CurrentInfo != null) { TargetInfo target = CurrentInfo.Targets.Find(e => e.type == eTutorialType.Drag); if (target != null) { if (string.IsNullOrEmpty(target.gameobject) == false) { GameObject target_obj = GameObject.Find(target.gameobject); if (target_obj != null) { m_DragLayout = target_obj.GetComponentInParent <MainLayout>(); if (m_DragLayout != null) { m_DragLayout.ProcessPress(); if (m_DragLayout.DragContainer == null || m_DragLayout.DragContainer.CharacterAsset.Asset.name != target.gameobject) { m_DragLayout.ProcessRelease(); m_DragLayout = null; } else { //TweenPosition tween = m_Prefabs[0].GetComponent<TweenPosition>(); //Vector3 pos = m_Prefabs[0].transform.localPosition; //tween.from = pos; //pos.x += target.drag_x; //pos.y += target.drag_y; //tween.to = pos; //tween.PlayForward(); } } } } } } }