Пример #1
0
        public static async Task <bool> UsePortal(int actorSNO, int sourceWorldDynamicId)
        {
            if (_usePortalCoroutine == null || _usePortalActorSNO != actorSNO || _usePortalSourceWorldDynamicId != sourceWorldDynamicId)
            {
                _usePortalCoroutine            = new UsePortalCoroutine(actorSNO, sourceWorldDynamicId);
                _usePortalActorSNO             = actorSNO;
                _usePortalSourceWorldDynamicId = sourceWorldDynamicId;
            }

            if (await _usePortalCoroutine.GetCoroutine())
            {
                _usePortalCoroutine = null;
                return(true);
            }
            return(false);
        }
Пример #2
0
        public static async Task<bool> UsePortal(int actorSNO, int sourceWorldDynamicId)
        {
            if (_usePortalCoroutine == null || _usePortalActorSNO != actorSNO || _usePortalSourceWorldDynamicId != sourceWorldDynamicId)
            {
                _usePortalCoroutine = new UsePortalCoroutine(actorSNO, sourceWorldDynamicId);
                _usePortalActorSNO = actorSNO;
                _usePortalSourceWorldDynamicId = sourceWorldDynamicId;
            }

            if (await _usePortalCoroutine.GetCoroutine())
            {
                _usePortalCoroutine = null;
                return true;
            }
            return false;
        }