File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Assets/JCSUnity/Scripts/Events/Destroy
docs/ScriptReference/Events/Destroy Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,21 @@ public JCS_FadeObject FirstFadeObject()
9999 return null ;
100100 }
101101
102+ /// <summary>
103+ /// Destroy game object by using fade out.
104+ /// </summary>
105+ public void DestroyFade ( )
106+ {
107+ float fadeTime = mDestroyTime - mFadeTime ;
108+
109+ // 防止重新撥放.
110+ if ( mTimer < fadeTime )
111+ {
112+ // 立馬開始 fade 消失.
113+ mTimer = fadeTime ;
114+ }
115+ }
116+
102117 /// <summary>
103118 /// Fade out for all the fade objects in list.
104119 /// </summary>
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Destroy the game object by time.
1515
1616## Functions
1717
18- | Name | Description |
19- | :----------------| :--------------------------------|
20- | FirstFadeObject | Retrieve the first fade object. |
18+ | Name | Description |
19+ | :----------------| :---------------------------------------|
20+ | FirstFadeObject | Retrieve the first fade object. |
21+ | DestroyFade | Destroy game object by using fade out. |
You can’t perform that action at this time.
0 commit comments