public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var gold = DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();
            if (input is IntInput)
                temp = (IntInput)input;
            else
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";

            if (sender is Achievement /*|| sender is Objects.GameObjects.NPC*/)
            {
                var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);
                GameReference.WidgetDrawer.AddWidget(newGoldDisplay);
            }

            gold.AsInt += temp.Input;
            TryContinueList();
            return MethodResult.Success;
        }
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var      gold = EngineGlobals.DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();

            if (input is IntInput)
            {
                temp = (IntInput)input;
            }
            else
            {
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";
            }

            var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);


            GameReference.WidgetDrawer.AddWidget(newGoldDisplay);


            gold.AsInt += temp.Input;
            return(MethodResult.Success);
        }
Example #3
0
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var      gold = DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();

            if (input is IntInput)
            {
                temp = (IntInput)input;
            }
            else
            {
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";
            }

            if (sender is Achievement /*|| sender is Objects.GameObjects.NPC*/)
            {
                var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);
                GameReference.WidgetDrawer.AddWidget(newGoldDisplay);
            }

            gold.AsInt += temp.Input;
            TryContinueList();
            return(MethodResult.Success);
        }
        public static MethodResult AdjustGold(object sender, IEventInput input)
        {
            var gold = EngineGlobals.DataManager.GetVariable("{gold}");
            IntInput temp = new IntInput();
            if (input is IntInput)
                temp = (IntInput)input;
            else
                EquestriEngine.ErrorMessage = "Invalid input passed into Adjust Gold";

            var newGoldDisplay = new SystemWidgets.GoldDisplay(gold.AsInt, temp.Input);

            GameReference.WidgetDrawer.AddWidget(newGoldDisplay);

            gold.AsInt += temp.Input;
            return MethodResult.Success;
        }