File tree Expand file tree Collapse file tree
QFramework.Unity2018+/Assets/QFramework
Toolkits/_CoreKit/ActionKit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "Id" : " " ,
3- "Version" : " v1.0.40 " ,
3+ "Version" : " v1.0.41 " ,
44 "Type" : 0 ,
55 "AccessRight" : 0 ,
66 "DownloadUrl" : " " ,
1111 ],
1212 "DocUrl" : " https://liangxiegame.com" ,
1313 "Readme" : {
14- "version" : " v1.0.40 " ,
15- "content" : " UIKit:重复 LoadPanel 代码删除(感谢高跟鞋、NormalKatt 提供反馈) " ,
14+ "version" : " v1.0.41 " ,
15+ "content" : " ActionKit 修复 Repeat 的 Sequence 没有正确回收的问题 " ,
1616 "author" : " liangxie" ,
17- "date" : " 2023 年 03 月 21 日 17:43 " ,
17+ "date" : " 2023 年 04 月 20 日 15:11 " ,
1818 "PackageId" : " "
1919 }
2020}
Original file line number Diff line number Diff line change @@ -18,6 +18,40 @@ private void Start()
1818 . Start ( this , ( ) =>
1919 {
2020 Debug . Log ( "Right click finished" ) ;
21+
22+ ActionKit . Repeat ( 5 )
23+ . Condition ( ( ) => Input . GetMouseButtonDown ( 1 ) )
24+ . Callback ( ( ) => Debug . Log ( "Mouse right clicked" ) )
25+ . Start ( this , ( ) =>
26+ {
27+ Debug . Log ( "Right click finished" ) ;
28+
29+ ActionKit . Repeat ( 5 )
30+ . Condition ( ( ) => Input . GetMouseButtonDown ( 1 ) )
31+ . Callback ( ( ) => Debug . Log ( "Mouse right clicked" ) )
32+ . Start ( this , ( ) =>
33+ {
34+ Debug . Log ( "Right click finished" ) ;
35+
36+ ActionKit . Repeat ( 5 )
37+ . Condition ( ( ) => Input . GetMouseButtonDown ( 1 ) )
38+ . Callback ( ( ) => Debug . Log ( "Mouse right clicked" ) )
39+ . Start ( this , ( ) =>
40+ {
41+ Debug . Log ( "Right click finished" ) ;
42+
43+ ActionKit . Repeat ( 5 )
44+ . Condition ( ( ) => Input . GetMouseButtonDown ( 1 ) )
45+ . Callback ( ( ) => Debug . Log ( "Mouse right clicked" ) )
46+ . Start ( this , ( ) =>
47+ {
48+ Debug . Log ( "Right click finished" ) ;
49+
50+
51+ } ) ;
52+ } ) ;
53+ } ) ;
54+ } ) ;
2155 } ) ;
2256 }
2357 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public interface IRepeat : ISequence
1616
1717 public class Repeat : IRepeat
1818 {
19- private Sequence mSequence = Sequence . Allocate ( ) ;
19+ private Sequence mSequence = null ;
2020
2121 private int mRepeatCount = - 1 ;
2222 private int mCurrentRepeatCount = 0 ;
@@ -31,6 +31,7 @@ private Repeat()
3131 public static Repeat Allocate ( int repeatCount = - 1 )
3232 {
3333 var repeat = mSimpleObjectPool . Allocate ( ) ;
34+ repeat . mSequence = Sequence . Allocate ( ) ;
3435 repeat . Deinited = false ;
3536 repeat . Reset ( ) ;
3637 repeat . mRepeatCount = repeatCount ;
You can’t perform that action at this time.
0 commit comments