예제 #1
0
        private static CoroutineLock CreateCoroutineLock(this CoroutineLockComponent self, int coroutineLockType, long key, int time, int level)
        {
            CoroutineLock coroutineLock = self.AddChildWithId <CoroutineLock, int, long, int>(++self.idGenerator, coroutineLockType, key, level, true);

            if (time > 0)
            {
                self.AddTimer(TimeHelper.ClientFrameTime() + time, coroutineLock);
            }
            return(coroutineLock);
        }
예제 #2
0
        public static CoroutineLock CreateCoroutineLock(this CoroutineLockComponent self, CoroutineLockType coroutineLockType, long key, int time, int count)
        {
            CoroutineLock coroutineLock = EntityFactory.CreateWithId <CoroutineLock, CoroutineLockType, long, int>(self.Domain, ++self.idGenerator, coroutineLockType, key, count, true);

            if (time > 0)
            {
                self.AddTimer(TimeHelper.ClientFrameTime() + time, coroutineLock);
            }
            return(coroutineLock);
        }