public static IExecuteNodeChain Repeat <T>(this T selfbehaviour, int count = -1) where T : MonoBehaviour
        {
            var retNodeChain = new RepeatNodeChain(count);

            retNodeChain.Executer = selfbehaviour;
            // dispose when distroyed
            retNodeChain.DisposeWhenGameObjDestroyed();
            return(retNodeChain);
        }
Example #2
0
        public static IActionChain Repeat <T>(this T selfbehaviour, int count = -1) where T : MonoBehaviour
        {
            var retNodeChain = new RepeatNodeChain(count)
            {
                Executer = selfbehaviour
            };

            retNodeChain.AddTo(selfbehaviour);
            return(retNodeChain);
        }
Example #3
0
        public static IActionChain Repeat <T>(this T selfbehaviour, int count = -1) where T : MonoBehaviour
        {
            var retNodeChain = new RepeatNodeChain(count)
            {
                Executer = selfbehaviour
            };

            retNodeChain.DisposeWhenGameObjectDestroyed(selfbehaviour);
            return(retNodeChain);
        }