15 if( obscuringItemFader.Length > 0 )
17 for(
int i = 0; i < obscuringItemFader.Length; i++ )
19 obscuringItemFader[i].
FadeOut();
29 if( obscuringItemFader.Length > 0 )
31 for(
int i = 0; i < obscuringItemFader.Length; i++ )
33 obscuringItemFader[i].
FadeIn();
Used to obscure items when player is behind them. So that player can see the avatar clearly.
void FadeIn()
Start to fade in the object
void FadeOut()
Start to fade out the object
This class trigger fade in and out depending on the distance of the objects that needs to be fade out...
void OnTriggerEnter2D(Collider2D collision)
Get the gameobject we have collided with, and then get all the obscuring item fader components on it ...
void OnTriggerExit2D(Collider2D collision)
Get the gameobject we have collided with, and then get all the obscuring item fader components on it ...