コード例 #1
0
ファイル: CharSelect.cs プロジェクト: cindyxu/soulstrand
    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;
    }
コード例 #2
0
ファイル: Message.cs プロジェクト: chrome99/My-First-Xna-Game
        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();
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: Message.cs プロジェクト: chrome99/My-First-Xna-Game
        public void CreateDialog(GameObject source, string text, bool canIgnoreMsg, bool notFromShop, ReturnFunction returnFunction)
        {
            //text
            currentText.text = text;
            dialog           = null;

            createDialog(source, canIgnoreMsg, notFromShop, returnFunction);
        }
コード例 #5
0
ファイル: Message.cs プロジェクト: chrome99/My-First-Xna-Game
        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);
        }