public void Select(DungeonCharacter dc, ReturnFunction rf, CancelFunction cf) { rfunc = rf; cfunc = cf; dchar = dc; options = OptionsFor(dc); selIndex = 0; screenPos = Camera.mainCamera.WorldToScreenPoint(dc.entity.tile.worldPos); screenPos.y = Screen.height - screenPos.y; selecting = true; }
private void createDialog(GameObject source, bool canIgnoreMsg, bool notFromShop, ReturnFunction returnFunction) { //variables this.source = source; this.canIgnoreMsg = canIgnoreMsg; this.notFromShop = notFromShop; this.returnFunction = returnFunction; lastTextIndex = 0; //window setWindowSize(); window.SetWindowAbove(source.bounds); useKeyReleased = false; //currentText.position += Vector2.Zero; window.Revive(); }
private void AsyncInvokeMethod(MethodInfo method, IModule module, object[] parameters, ModuleCallReturnFunction ReturnFunction) { if (ReturnFunction == null) { Log.Trace("Calling async invoke method in module with no return call"); ReturnFunction = new ModuleCallReturnFunction(NoReturnCall); } object ret = null; if (method.ReturnType.ToString().ToLower() == "void") { Log.Trace("Invoking module method with no return"); method.Invoke(module, parameters); } else { Log.Trace("Invoking module method and collecting return value"); ret = method.Invoke(module, parameters); } Log.Trace("Invoking the return function after the async call"); ReturnFunction.Invoke(ret); }
public void CreateDialog(GameObject source, string text, bool canIgnoreMsg, bool notFromShop, ReturnFunction returnFunction) { //text currentText.text = text; dialog = null; createDialog(source, canIgnoreMsg, notFromShop, returnFunction); }
public void CreateDialog(GameObject source, List <string> dialog, bool canIgnoreMsg, bool notFromShop, ReturnFunction returnFunction) { //text currentText.text = dialog[0]; this.dialog = dialog; createDialog(source, canIgnoreMsg, notFromShop, returnFunction); }