Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIFollow Class Reference
Inheritance diagram for UIFollow:

Public Member Functions

void SetTarget (Transform _trans)
 
void LateUpdate ()
 

Public Attributes

Transform target
 
Vector3 fixPos
 
bool followPos
 
Func< bool > endCondition
 

Detailed Description

Definition at line 4 of file UIFollow.cs.

Member Function Documentation

◆ LateUpdate()

void UIFollow.LateUpdate ( )
inline

Definition at line 19 of file UIFollow.cs.

20 {
21 if (followPos)
22 {
23 GameObject go = base.gameObject;
25 {
26 if (go != null)
27 {
28 base.transform.Rect().anchoredPosition = Camera.main.WorldToScreenPoint(fixPos) / BaseCore.Instance.uiScale;
29 }
30 });
31 }
32 else if (!target || !target.gameObject.activeSelf || (endCondition != null && endCondition()))
33 {
34 UnityEngine.Object.DestroyImmediate(base.gameObject);
35 }
36 else
37 {
38 base.transform.position = target.position + fixPos;
39 }
40 }
virtual float uiScale
Definition: BaseCore.cs:46
static BaseCore Instance
Definition: BaseCore.cs:11
List< Action > actionsLateUpdate
Definition: BaseCore.cs:29
bool followPos
Definition: UIFollow.cs:10
Vector3 fixPos
Definition: UIFollow.cs:8
Transform target
Definition: UIFollow.cs:6
Func< bool > endCondition
Definition: UIFollow.cs:12

References BaseCore.actionsLateUpdate, endCondition, fixPos, followPos, BaseCore.Instance, target, and BaseCore.uiScale.

Referenced by PopManager.CopyAll().

◆ SetTarget()

void UIFollow.SetTarget ( Transform  _trans)
inline

Definition at line 14 of file UIFollow.cs.

15 {
16 target = _trans;
17 }

References target.

Member Data Documentation

◆ endCondition

Func<bool> UIFollow.endCondition

Definition at line 12 of file UIFollow.cs.

Referenced by LateUpdate().

◆ fixPos

Vector3 UIFollow.fixPos

Definition at line 8 of file UIFollow.cs.

Referenced by LateUpdate().

◆ followPos

bool UIFollow.followPos

Definition at line 10 of file UIFollow.cs.

Referenced by LateUpdate().

◆ target

Transform UIFollow.target

Definition at line 6 of file UIFollow.cs.

Referenced by LateUpdate(), and SetTarget().


The documentation for this class was generated from the following file: