| | |
| | | } |
| | | |
| | | |
| | | public void InitForCamera(Image target, float x, float y) |
| | | public void InitForCamera(Image target, float x, float y, Vector2 offect) |
| | | { |
| | | this.target = target; |
| | | if (eventPenetrate != null) |
| | |
| | | } |
| | | |
| | | Vector2 center = target.GetComponent<RectTransform>().anchoredPosition; |
| | | center += offect; |
| | | material.SetVector("_Center", center); |
| | | material.SetFloat("_SliderX", x); |
| | | material.SetFloat("_SliderY", y); |
| | | |
| | | } |
| | | |
| | | public void InitForCamera(Image target, Vector2 center, float x, float y) |
| | | { |
| | | this.target = target; |
| | | if (eventPenetrate != null) |
| | | { |
| | | eventPenetrate.SetTargetImage(target); |
| | | } |
| | | |
| | | material.SetVector("_Center", center); |
| | | material.SetFloat("_SliderX", x); |