protected override void OnEnd()
        {
            base.OnEnd();

            BUIManager.UnsuppressMenus();
            BUIManager.RemoveUIElement(BattleTextBox);

            BUIManager = null;
        }
        public MessageBattleEvent(BattleUIManager bUIManager, string battleMessage, double waitDuration) : base(waitDuration)
        {
            BUIManager = bUIManager;

            BattleMessage = battleMessage;
            BattleTextBox = new TextBox(SpriteRenderer.Instance.WindowCenter, new Vector2(100, 50), BattleMessage);
            BattleTextBox.ScaleToText(AssetManager.Instance.TTYDFont);

            IsUnique = true;
        }
        public SweetTreatThrownStar(BattleUIManager bUIManager, Vector2 startPosition, Vector2 speed)
        {
            BUIManager = bUIManager;

            Position = startPosition;
            Origin   = new Vector2(.5f, .5f);

            CroppedTex2D = new CroppedTexture2D(AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.BattleGFX}.png"),
                                                new Rectangle(245, 986, 40, 37));

            Speed = speed;
        }
Esempio n. 4
0
        public SweetTreatRestorationElement(BattleUIManager bUIManager, RestoreTypes restorationType, double movementDur, Vector2 startPosition, Vector2 endPosition)
        {
            BUIManager = bUIManager;

            RestorationType = restorationType;
            MovementDur     = movementDur;

            StartPosition = startPosition;
            EndPosition   = endPosition;

            //Initialize
            Initialize();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="bUIManager">The BattleUIManager.</param>
        /// <param name="columnRows">The number of columns or rows to spawn elements on.</param>
        /// <param name="columnRowDiffVal">The X or Y position difference between each column or row.</param>
        /// <param name="movementDur">How long it takes the elements to move. This also represents how long they're on screen.</param>
        /// <param name="timeBetweenElements">How much time to wait before each element.</param>
        /// <param name="startSpawnPos">The start position the elements spawn.</param>
        /// <param name="endSpawnPos">The end position of the elements.</param>
        /// <param name="allowedRestorationTypes">The restoration types the spawner will create.</param>
        /// <param name="restorationTypeCounts">The counts for each restoration type. Define them in the same order as the permitted restoration types.</param>
        public SweetTreatElementSpawner(BattleUIManager bUIManager, int columnRows, float columnRowDiffVal, double movementDur, double timeBetweenElements,
                                        Vector2 startSpawnPos, Vector2 endSpawnPos, IList <RestoreTypes> allowedRestorationTypes, IList <int> restorationTypeCounts)
        {
            BUIManager = bUIManager;

            ColumnRows          = columnRows;
            ColumnRowDiffVal    = columnRowDiffVal;
            MovementDur         = movementDur;
            TimeBetweenElements = timeBetweenElements;

            StartSpawnPos = startSpawnPos;
            EndSpawnPos   = endSpawnPos;

            AllowedRestorationTypes.AddRange(allowedRestorationTypes);

            SetupRestorationDict(restorationTypeCounts);
        }
Esempio n. 6
0
        public TargetSelectionMenu(BattleUIManager bUIManager) : base(MenuTypes.Horizontal)
        {
            BUIManager = bUIManager;
            Texture2D cursorSheet = AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.UIRoot}/Cursor.png");

            Cursor = new ReverseAnimation(cursorSheet, AnimationGlobals.InfiniteLoop, true,
                                          new Animation.Frame(new Rectangle(4, 5, 14, 20), 110d),
                                          new Animation.Frame(new Rectangle(26, 5, 16, 20), 110d),
                                          new Animation.Frame(new Rectangle(49, 5, 20, 20), 110d),
                                          new Animation.Frame(new Rectangle(75, 5, 22, 16), 110d),
                                          new Animation.Frame(new Rectangle(105, 5, 21, 16), 110d));
            NameImage = new NineSlicedTexture2D(AssetManager.Instance.LoadRawTexture2D($"{ContentGlobals.BattleGFX}.png"),
                                                new Rectangle(457, 812, 32, 16), 7, 6, 7, 9);

            //Both games wrap the cursor
            WrapCursor = true;
        }
Esempio n. 7
0
        public override void EndInput()
        {
            base.EndInput();

            ElapsedTime = 0d;

            //Clean up any remaining stars
            for (int i = 0; i < StarsThrown.Count; i++)
            {
                StarsThrown.RemoveAt(i);
                i--;
            }

            IconSpawner.CleanUp();
            IconSpawner = null;

            HealingResponse = default(SweetTreatResponse);

            BUIManager = null;
        }
        public void CleanUp()
        {
            SelectionMenu = null;

            instance = null;
        }
Esempio n. 9
0
 public SweetTreatCommand(IActionCommandHandler commandHandler, BattleUIManager bUIManager) : base(commandHandler)
 {
     BUIManager = bUIManager;
 }
        public void Dispose()
        {
            SelectionMenu = null;

            instance = null;
        }