// Use this for initialization void Start() { mAuthCallback = (bool success) => { Debug.Log("In Auth callback, success = " + success); mSigningIn = false; if (success) { NavigationUtil.ShowMainMenu(); } else { Debug.Log("Auth failed!!"); } }; // enable debug logs (note: we do this because this is a sample; // on your production app, you probably don't want this turned // on by default, as it will fill the user's logs with debug info). var config = new PlayGamesClientConfiguration.Builder() .WithInvitationDelegate(InvitationManager.Instance.OnInvitationReceived) .Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.DebugLogEnabled = true; // try silent authentication if (mAuthOnStart) { Authorize(true); } }
public void Init(FlexibleMenuModifyItemUI.MenuType menuType, object obj, System.Action<object> acceptedCallback) { this.m_MenuType = menuType; this.m_Object = obj; this.m_AcceptedCallback = acceptedCallback; this.m_IsInitialized = true; }
public bool Load(LoaderRequest request, System.Action<LoaderResponse> callback = null, object extraData = null) { if (request == null || string.IsNullOrEmpty(request.url)) { return false; } else { LoaderResponse response = null; if (cacheMap.TryGetValue(request.url, out response)) { Debug.Log("CacheLoader complete:" + request.url); if (callback != null) { response.extraData = extraData; callback(response); } return true; } else { if (loader.Load(request, LoaderCallback, extraData)) { this.callback = callback; return true; } else { return false; } } } }
public override void OnClose() { this.m_Object = (object) null; this.m_AcceptedCallback = (System.Action<object>) null; this.m_IsInitialized = false; EditorApplication.RequestRepaintAllViews(); }
public void TestDoActionExceedThreadPool() { long[] data = new long[] { 1, 3 }; System.Action<long[]> act = new System.Action<long[]>((args) => { for (int i = 0; i < data.Length; i++) { data[i] = 1; } Thread.Sleep(500); }); long[] data2 = new long[] { 1, 3 }; System.Action<long[]> act2 = new System.Action<long[]>((args) => { for (int i = 0; i < data2.Length; i++) { data2[i] = 2; } Thread.Sleep(500); }); ThreadPoolUtil.Instance.DoAction<long>(act, data); ThreadPoolUtil.Instance.DoAction<long>(act2, data2); ThreadPoolUtil.Instance.WaitAll(); Assert.Equal(string.Join(",", data), "1,1"); Assert.Equal(string.Join(",", data2), "2,2"); }
static ULDebug() { #if UNITY Log = Logger.Log; LogError = Logger.LogError; #endif }
public void AddHandler(System.Action<ObservableTargetData> handler) { if (handler == null) return; if (_callback == null) this.RegisterTargetTriggerEventHandler(); _callback += handler; }
public void RemoveHandler(System.Action<ObservableTargetData> handler) { if (handler == null) return; _callback -= handler; if (_callback == null) this.UnregisterTargetTriggerEventHandler(); }
/// Repeatable perform an action each frame for x amount of seconds until a condition is met. /// Takes the action to perform, the condition for completion and the maximum amount of time each frame /// to spend performing the action public TimedTick( System.Action action, System.Func<bool> stopCondition, float time = .1f ) { start_ = Time.realtimeSinceStartup; action_ = action; stopCondition_ = stopCondition; maxTime_ = time; }
public void OnPointerClick(PointerEventData eventData) { if (EmptyClickAction != null) { EmptyClickAction(); EmptyClickAction = null; } }
public void Show(bool instantTransition, Action onComplete) { elements.enabled = true; Transition (transitionIn, instantTransition, onComplete); OnShow (); }
public HostWindow(Window window, IStatusBar statusBar = null, System.Action<CloseResult> onClosed = null) { _statusBar = statusBar; _window = window; _onClosed = onClosed; if (_statusBar == null) _statusBar = window as IStatusBar; }
public void SetThread(Fresvii.AppSteroid.Models.Thread thread, bool isApp, System.Action<Fresvii.AppSteroid.Models.Thread> OnClickCell) { this.OnClickCell = OnClickCell; this.isApp = isApp; UpdateThread(thread); }
public TreeFilter( ITreeNodeStream input, RecognizerSharedState state ) : base( input, state ) { originalAdaptor = input.TreeAdaptor; originalTokenStream = input.TokenStream; topdown_action = () => Topdown(); bottomup_action = () => Bottomup(); }
public void Initialize(RenderTexture texture, System.Action callback) { this.targetTexture = texture; this.callback = callback; this.StartCoroutine(this.Render()); }
public void Init(List<ExposablePopupMenu.ItemData> items, float itemSpacing, float minWidthOfPopup, ExposablePopupMenu.PopupButtonData popupButtonData, System.Action<ExposablePopupMenu.ItemData> selectionChangedCallback) { this.m_Items = items; this.m_ItemSpacing = itemSpacing; this.m_PopupButtonData = popupButtonData; this.m_SelectionChangedCallback = selectionChangedCallback; this.m_MinWidthOfPopup = minWidthOfPopup; this.CalcWidths(); }
public LoadingScreen(Action loadMethod, Data.UI.Interfaces.IGameScreen next) : base(true,false) { multiThreaded = false; fadeBlack = false; _loadMethod = loadMethod; nextScreen = next; }
void System.IDisposable.Dispose() { if (this.GetType() == typeof(RadicalWaitHandle)) { _complete = false; _callback = null; _pool.Release(this); } }
public void execute(System.Action<bool> eventCallback) { callback = eventCallback; HTTPRequest req = new HTTPRequest("POST", url); req.addHeader("Content-Type", "application/json"); req.setPayload(jsonData); HTTPManager.sendRequest(req, HTTPCallback, retryDelayTable, deadlineDelay); }
public ProgressDialog(Window parent, string title, string message, System.Action<ProgressDialog> action) { InitializeComponent(); this.Owner = parent; this.Title = title; messageLabel.Text = message; m_action = action; }
public void SetParams(float radius, System.Func<GameObject, bool> checkTrigger, System.Action callBack) { _checkTrigger = checkTrigger; _callBack = callBack; _radius = radius; SphereCollider co = gameObject.AddComponent<SphereCollider>(); co.radius = radius; co.isTrigger = true; }
public CharacterModel( string name, int speed, Vector3 startPos, System.Action OnChangeResources, IPosition pos ) { this.name = name; this.speed = speed; this.startPos = startPos; this.OnChangeResources = OnChangeResources; this.pos = pos; this.pos.Position = startPos; coins = 0; crystals = 0; track = 1; }
public void Hide(bool instantTransition, Action onComplete) { OnHide (); Transition (transitionOut, instantTransition, () => { elements.enabled = false; if (onComplete != null) onComplete (); }); }
public void Confirm(string question, System.Action confirmationAction) { this.confirmationAction = confirmationAction; var message = ((localizedText != null) && localizedText.ContainsField(question)) ? localizedText[question] : question; if (confirmationPanel == null || confirmationText == null) { Debug.LogError("The confirmation panel isn't assigned to StoryManager!", this); OkConfirm(); } else { confirmationPanel.gameObject.SetActive(true); confirmationText.text = message; } }
public LoadingScreen(Action loadMethod, Data.UI.Interfaces.IGameScreen next, TimedAction updateMethod, TimedAction drawMethod) : base(true, false) { multiThreaded = true; nextScreen = next; _loadMethod = loadMethod; _drawMethod = drawMethod; _updateMathod = updateMethod; }
private void RegisterListeners() { if (_triggered) return; ObservableTargetData targ; var d = new System.Action<ObservableTargetData>(this.OnTriggerActivated); for (int i = 0; i < _observedTargets.Length; i++) { targ = _observedTargets[i]; targ.AddHandler(d); } }
public void TestDoAction() { long[] data = new long[] { 1, 3 }; System.Action<long[]> act = new System.Action<long[]>((args) => { for (int i = 0; i < data.Length; i++) { data[i] = 1; } }); ThreadPoolUtil.Instance.DoAction<long>(act, data); ThreadPoolUtil.Instance.WaitAll(); Assert.Equal(string.Join(",", data), "1,1"); }
public MainWindowCommand(Action killApplication, AppSettings appSettings) { var selfPlugin = new SelfPlugin(); var loader = new PluginLoader(selfPlugin); var persistanceHelper = new PersistanceHelper(selfPlugin.XStream); appSettings.AppHotkeys = persistanceHelper.LoadOrSaveAndLoad<Hotkeys>(Paths.Instance.AppHotkeys, new KeyboardShortcutChangeCommand(appSettings).Execute); Hotkeys hotkeys = appSettings.AppHotkeys; displayHotkey = hotkeys.DisplayHotKey; controller = new MainWindowController(loader.LaunchablePlugins, loader.CharacterPlugins, loader.LaunchableHandlers, selfPlugin, persistanceHelper, appSettings); this.killApplication = killApplication; appSettings.HotkeysChanged += HandleHotkeysChanged; window = new MainWindow(controller); }
public SingleTask(IEnumerator enumerator) { if (enumerator is TaskCollection || enumerator is SingleTask) _enumerator = enumerator; else { _task = new SerialTaskCollection(); _task.Add(enumerator); _enumerator = _task.GetEnumerator(); } _onComplete = null; }
/// <summary> /// 聚集子bundle /// </summary> /// <param name="onComplete"></param> internal void CollectSubBundles(System.Action onComplete) { OnCompleteEvent = onComplete; if (hasDependBundle) { subBundles = new Bundle[dependBundles.Length]; foreach (var v in dependBundles) AssetBundleLoadManager.LoadBundle(v.assetName, this.OnLoadBundle, true); } else { CallComplete(); } }
bool ClampToNavmeshInternalFull(ref Vector3 position) { int closestNodeInPath = 0; float closestDist = float.PositiveInfinity; bool closestIsInPath = false; TriangleMeshNode closestNode = null; // If we still couldn't find a good node // Check all nodes in the whole path // We are checking for if any node is destroyed in the loop // So we can reset this counter checkForDestroyedNodesCounter = 0; for (int i = 0, t = nodes.Count; i < t; i++) { if (nodes[i].Destroyed) { return(true); } Vector3 close = nodes[i].ClosestPointOnNode(position); float d = (close - position).sqrMagnitude; if (d < closestDist) { closestDist = d; closestNodeInPath = i; closestNode = nodes[i]; closestIsInPath = true; } } // Loop through all neighbours of all nodes in the path // and find the closet point on them // We cannot just look on the ones in the path since it is impossible // to know if we are outside the navmesh completely or if we have just // stepped in to an adjacent node // Need to make a copy because ref parameters cannot be used inside delegates var posCopy = position; int containingIndex = nodes.Count - 1; int closestIsNeighbourOf = 0; System.Action <GraphNode> del = node => { // Check so that this neighbour we are processing is neither the node after the current node or the node before the current node in the path // This is done for optimization, we have already checked those nodes earlier if (!(containingIndex > 0 && node == nodes[containingIndex - 1]) && !(containingIndex < nodes.Count - 1 && node == nodes[containingIndex + 1])) { // Check if the neighbour was a mesh node var triNode = node as TriangleMeshNode; if (triNode != null) { // Find the distance to the closest point on it from our current position var close = triNode.ClosestPointOnNode(posCopy); float dist = (close - posCopy).sqrMagnitude; // Is that distance better than the best distance seen so far if (dist < closestDist) { closestDist = dist; closestIsNeighbourOf = containingIndex; closestNode = triNode; closestIsInPath = false; } } } }; // Loop through all the nodes in the path in reverse order // The callback needs to know about the index, so we store it // in a local variable which it can read for (; containingIndex >= 0; containingIndex--) { // Loop through all neighbours of the node nodes[containingIndex].GetConnections(del); } // Check if the closest node // was on the path already or if we need to adjust it if (closestIsInPath) { // If we have found a node // Snap to the closest point in XZ space (keep the Y coordinate) // If we would have snapped to the closest point in 3D space, the agent // might slow down when traversing slopes currentNode = closestNodeInPath; position = nodes[closestNodeInPath].ClosestPointOnNodeXZ(position); } else { // Snap to the closest point in XZ space on the node position = closestNode.ClosestPointOnNodeXZ(position); // We have found a node containing the position, but it is outside the funnel // Recalculate the funnel to include this node exactStart = position; UpdateFunnelCorridor(closestIsNeighbourOf, closestNode); // Restart from the first node in the updated path currentNode = 0; } return(false); }
private void OnEnable() { OnCreated += LevelManager.Instance.OnBlockCreated; OnCollected += LevelManager.Instance.OnBlockCollected; }
/// <summary> /// Executes the specified function upon click of the close/cancel button /// </summary> /// <param name="action">Action.</param> public void SetOnCancelListener(System.Action action) { Debug.LogError("Not implemented for a timed dialog!"); }
public override void Unsubscribe(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.presence.UnsubscribeRequest request, System.Action <bnet.protocol.NoData> done) { switch (request.EntityId.GetHighIdType()) { case EntityIdHelper.HighIdType.AccountId: var account = AccountManager.GetAccountByPersistentID(request.EntityId.Low); // The client will probably make sure it doesn't unsubscribe to a null ID, but just to make sure.. if (account != null) { account.RemoveSubscriber(this.Client); Logger.Trace("Unsubscribe() {0} {1}", this.Client, account); } break; case EntityIdHelper.HighIdType.GameAccountId: var gameaccount = GameAccountManager.GetAccountByPersistentID(request.EntityId.Low); if (gameaccount != null) { gameaccount.RemoveSubscriber(this.Client); Logger.Trace("Unsubscribe() {0} {1}", this.Client, gameaccount); } break; default: Logger.Warn("Recieved an unhandled Presence.Unsubscribe request with type {0} (0x{1})", request.EntityId.GetHighIdType(), request.EntityId.High.ToString("X16")); break; } var builder = bnet.protocol.NoData.CreateBuilder(); done(builder.Build()); }
public override void Update(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.presence.UpdateRequest request, System.Action <bnet.protocol.NoData> done) { //Logger.Warn("request:\n{0}", request.ToString()); // This "UpdateRequest" is not, as it may seem, a request to update the client on the state of an object, // but instead the *client* requesting to change fields on an object that it has subscribed to. // Check docs/rpc/presence.txt in branch wip-docs (or master) switch (request.EntityId.GetHighIdType()) { case EntityIdHelper.HighIdType.AccountId: var account = AccountManager.GetAccountByPersistentID(request.EntityId.Low); Logger.Trace("Update() {0} {1} - {2} Operations", this.Client, account, request.FieldOperationCount); Logger.Warn("No AccountManager updater."); break; case EntityIdHelper.HighIdType.GameAccountId: var gameaccount = GameAccountManager.GetAccountByPersistentID(request.EntityId.Low); var trace = string.Format("Update() {0} {1} - {2} Operations", this.Client, gameaccount, request.FieldOperationCount); foreach (var fieldOp in request.FieldOperationList) { trace += string.Format("\t{0}, {1}, {2}", (FieldKeyHelper.Program)fieldOp.Field.Key.Program, (FieldKeyHelper.OriginatingClass)fieldOp.Field.Key.Group, fieldOp.Field.Key.Field); gameaccount.Update(fieldOp); } Logger.Trace(trace); break; default: Logger.Warn("Recieved an unhandled Presence.Update request with type {0} (0x{1})", request.EntityId.GetHighIdType(), request.EntityId.High.ToString("X16")); break; } var builder = bnet.protocol.NoData.CreateBuilder(); done(builder.Build()); }
/// <summary> /// Loads the multi async. /// </summary> /// <returns>The multi async.</returns> /// <param name="paths">Paths.</param> /// <param name="callback">Callback.</param> public static Coroutine LoadMultiAsync(string[] paths, System.Action <Object[]> callback) { return(StartCoroutine(DoLoadMultiAsync(paths, callback))); }
/// <summary> /// Loads the async. /// </summary> /// <returns>The async.</returns> /// <param name="path">Path.</param> /// <param name="type">Type.</param> /// <param name="callback">Callback.</param> public static Coroutine LoadAsync(string path, System.Type type, System.Action <Object> callback) { return(StartCoroutine(DoLoadAsync(path, type, callback))); }
public void LoadPage(string page, System.Action <UIPageBase> func, bool hidePage = false) { for (int idx = 0; idx < LoadedPages.Count; idx++) { if (LoadedPages[idx] != null && LoadedPages[idx].name == page) { func(LoadedPages[idx]); } } if (!string.IsNullOrEmpty(page)) { string assetName = page + "Page"; string abName = AppConst.ResDir + "Prefabs/UI/Page/" + assetName + ".prefab"; ResManager.LoadPrefab(abName, delegate(UnityEngine.Object[] objs) { if (objs.Length == 0) { return; } GameObject newPageGameObject = objs[0] as GameObject; if (newPageGameObject != null) { newPageGameObject = UIUtils.AddChild(PageRoot, newPageGameObject); if (newPageGameObject.activeSelf == true) { Debug.Log("newPageGameObject activity true:" + newPageGameObject.name); } else { Debug.Log("newPageGameObject activity false:" + newPageGameObject.name); } if (newPageGameObject != null) { UIPageBase newPage = newPageGameObject.GetComponent <UIPageBase>(); if (newPage != null) { LoadedPages.Add(newPage); // Allow the Page to initialize itself newPage.InitializePage(); // Hide the Page if requested if (hidePage == true) { newPage.HidePage(); } func(newPage); } else { Debug.LogWarning("UISystem::LoadPage() Failed to instance new Page with name: " + page); } } else { Debug.LogWarning("UISystem::LoadPage() Failed to add new Page to parent UISystem with name: " + page); } } else { Debug.LogWarning("UISystem::LoadPage() Failed to load new Page with name: " + page); } }); } else { Debug.LogWarning("UISystem::LoadPage() No Page Data for Page with name: " + page); } }
public void ConfirmCloseTabRequest(System.Action <bool> confirmationCallback) { confirmationCallback(true); }
public override void SubscribeToUserManager(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.user_manager.SubscribeToUserManagerRequest request, System.Action <bnet.protocol.user_manager.SubscribeToUserManagerResponse> done) { Logger.Trace("SubscribeToUserManager()"); // temp hack: send him all online players on server where he should be normally get list of player he met in his last few games /raist. var builder = SubscribeToUserManagerResponse.CreateBuilder(); foreach (var player in OnlinePlayers.Players) { if (player == this.Client) { continue; // Don't add the requester to the list } var recentPlayer = RecentPlayer.CreateBuilder(); if (player.CurrentToon != null) { recentPlayer.SetPlayer(player.CurrentToon.BnetEntityID); Logger.Warn("RecentPlayer => " + player.CurrentToon); builder.AddRecentPlayers(recentPlayer); } } done(builder.Build()); }
public override void OnGameStartLoaded(System.Action afterInit) { base.OnGameStartLoaded(afterInit); afterInit(); }
public void Read(string target = null, string variable = null, System.Action <string> action = null) { manager.DirectReadFromArduino(target, variable, action: action); manager.ReadWriteArduino(target); }
public override CommandResult OnExecute( ICommandSource src, ICommandArgs args ) { if ( args.IsEmpty ) { if ( src.IsConsole ) { return CommandResult.ShowUsage(); } } else if ( !src.HasPermission( Permission + ".other" ) ) { return CommandResult.Lang( EssLang.COMMAND_NO_PERMISSION ); } var player = args.Length > 0 ? args[0].ToPlayer : src.ToPlayer(); if ( player == null ) { return CommandResult.Lang( EssLang.PLAYER_NOT_FOUND, args[0] ); } var playerInventory = player.Inventory; // "Remove "models" of items from player "body"" player.Channel.send( "tellSlot", ESteamCall.ALL, ESteamPacket.UPDATE_RELIABLE_BUFFER, (byte) 0, (byte) 0, new byte[0] ); player.Channel.send( "tellSlot", ESteamCall.ALL, ESteamPacket.UPDATE_RELIABLE_BUFFER, (byte) 1, (byte) 0, new byte[0] ); // Remove items for ( byte page = 0; page < 8; page++ ) { var count = playerInventory.getItemCount( page ); for ( byte index = 0; index < count; index++ ) { playerInventory.removeItem( page, 0 ); } } // Remove clothes // Remove unequipped cloths System.Action removeUnequipped = () => { for ( byte i = 0; i < playerInventory.getItemCount( 2 ); i++ ) { playerInventory.removeItem( 2, 0 ); } }; // Unequip & remove from inventory player.UnturnedPlayer.clothing.askWearBackpack( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearGlasses( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearHat( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearPants( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearMask( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearShirt( 0, 0, new byte[0], true ); removeUnequipped(); player.UnturnedPlayer.clothing.askWearVest( 0, 0, new byte[0], true ); removeUnequipped(); EssLang.INVENTORY_CLEAN.SendTo( player ); return CommandResult.Success(); }
public void Launch(System.Action onEnd) { time = 0; launched = true; EndAction = onEnd; }
void Push_System_Action_UnityEngine_AsyncOperation(IntPtr L, System.Action <UnityEngine.AsyncOperation> o) { ToLua.Push(L, o); }
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddNegotiate(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, System.Action <Microsoft.AspNetCore.Authentication.Negotiate.NegotiateOptions> configureOptions) { throw null; }
/// <summary> /// Loads the scene async. /// </summary> /// <returns>The scene async.</returns> /// <param name="name">Name.</param> /// <param name="callback">Callback.</param> public static Coroutine LoadSceneAsync(string name, System.Action <bool> callback) { XBundleManager.Instance.ReleaseSceneCachedBundleOnSceneSwitch(); return(XCoroutine.Run(DoLoadSceneAsync(name, callback))); }
public Microsoft.AspNetCore.TestHost.RequestBuilder And(System.Action <System.Net.Http.HttpRequestMessage> configure) { throw null; }
/// <summary> /// Dos the load async. /// </summary> /// <returns>The load async.</returns> /// <param name="path">Path.</param> /// <param name="type">Type.</param> /// <param name="callback">Callback.</param> private static IEnumerator DoLoadAsync(string path, System.Type type, System.Action <Object> callback) { if (string.IsNullOrEmpty(path)) { GLog.LogError("[XRes::Load] sent empty/null path!"); yield break; } string name = path.ToLower(); UnityEngine.Object obj = Find(name); if (!obj) { XSheet.XAssetInfo info = XSheet.Instance.Find(name); if (info != null) { switch (info.locationType) { case XSheet.XLocationType.Resource: ResourceRequest request = null; if (type == typeof(XBufferAsset)) { request = Resources.LoadAsync <TextAsset>(name); yield return(request); XBufferAsset asset = ScriptableObject.CreateInstance <XBufferAsset>(); asset.init((TextAsset)request.asset); obj = asset; } else { request = Resources.LoadAsync(name, type); yield return(request); obj = request.asset; } break; case XSheet.XLocationType.Bundle: yield return(XBundleManager.Instance.LoadAssetAsync(info, type, delegate(Object result) { obj = result; })); break; case XSheet.XLocationType.Data: string fileUrl = XSheet.GetLocalFileUrl(System.IO.Path.Combine(Application.persistentDataPath, info.fullName)); WWW fileLoader = new WWW(fileUrl); yield return(fileLoader); if (!string.IsNullOrEmpty(fileLoader.error)) { XBufferAsset asset = ScriptableObject.CreateInstance <XBufferAsset>(); asset.init( fileLoader.bytes ); if (type == typeof(Texture2D)) { Texture2D texture = new Texture2D(1, 1); texture.LoadImage(asset.bytes); obj = texture; } else { obj = asset; } } break; case XSheet.XLocationType.Streaming: string streamUrl = XSheet.GetLocalFileUrl(System.IO.Path.Combine(Application.streamingAssetsPath, info.fullName)); if (Application.platform != RuntimePlatform.Android) { streamUrl = XSheet.GetLocalFileUrl(streamUrl); } WWW streamLoader = new WWW(streamUrl); yield return(streamLoader); if (!string.IsNullOrEmpty(streamLoader.error)) { XBufferAsset asset = ScriptableObject.CreateInstance <XBufferAsset>(); asset.init( streamLoader.bytes ); if (type == typeof(Texture2D)) { Texture2D texture = new Texture2D(1, 1); texture.LoadImage(asset.bytes); obj = texture; } else { obj = asset; } } break; } } else { ResourceRequest request = Resources.LoadAsync(name, type); yield return(request); obj = request.asset; } if (!obj) { if (info != null) { GLog.LogError("[XRes.Load] Can't find {0} in Location({1})", name, info.locationType); } else { GLog.LogError("[XRes.Load] Can't find {0} in Resources", name); } } } callback(obj); }
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureTestServices(this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, System.Action <Microsoft.Extensions.DependencyInjection.IServiceCollection> servicesConfiguration) { throw null; }
/// <summary> /// Loads the async. /// </summary> /// <returns>The async.</returns> /// <param name="path">Path.</param> /// <param name="callback">Callback.</param> /// <typeparam name="T">The 1st type parameter.</typeparam> public static Coroutine LoadAsync <T>(string path, System.Action <Object> callback) where T : Object { return(LoadAsync(path, typeof(T), callback)); }
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureTestContainer <TContainer>(this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, System.Action <TContainer> servicesConfiguration) { throw null; }
public override void Subscribe(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.presence.SubscribeRequest request, System.Action <bnet.protocol.NoData> done) { switch (request.EntityId.GetHighIdType()) { case EntityIdHelper.HighIdType.AccountId: var account = AccountManager.GetAccountByPersistentID(request.EntityId.Low); if (account != null) { Logger.Trace("Subscribe() {0} {1}", this.Client, account); account.AddSubscriber(this.Client, request.ObjectId); } break; case EntityIdHelper.HighIdType.GameAccountId: var gameaccount = GameAccountManager.GetAccountByPersistentID(request.EntityId.Low); if (gameaccount != null) { Logger.Trace("Subscribe() {0} {1}", this.Client, gameaccount); gameaccount.AddSubscriber(this.Client, request.ObjectId); } break; default: Logger.Warn("Recieved an unhandled Presence.Subscribe request with type {0} (0x{1})", request.EntityId.GetHighIdType(), request.EntityId.High.ToString("X16")); break; } var builder = bnet.protocol.NoData.CreateBuilder(); done(builder.Build()); }
private IEnumerator Delay(System.Action <bool> done) { yield return(new WaitForSeconds(0.5f)); done(true); }
private void OnDestroy() { selectedDelegate = null; }
public void FinishHud() { gameObject.SetActive(false); confirmationAction = null; backAction = null; }
public System.Threading.Tasks.Task <Microsoft.AspNetCore.Http.HttpContext> SendAsync(System.Action <Microsoft.AspNetCore.Http.HttpContext> configureContext, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public GUIButton(string text, U.Vector3 position, U.Rect rect, System.Action onClick, U.FontStyle fontStyle = U.FontStyle.Normal, U.Color? color = null) : base(text, position, rect, fontStyle, color) { this.onClick = onClick; }
public GUIButton(string text, U.Vector3 position, System.Action onClick, U.Color? color = null) : base(text, position, color) { this.onClick = onClick; }
/// <summary> /// Executes the specified function upon successful hide of the popup /// </summary> /// <param name="action">Action.</param> public void SetOnDismissListener(System.Action action) { this.onDismissAction = action; }