protected override void OnDraw()
        {
            if (AllBombsThrown == false)
            {
                Cursor.Draw();
            }

            //Debug.DebugDrawLine(StartPosition, Cursor.Position, Color.Red, .8f, 2, true);

            ThrownCursor?.Draw();
        }
Esempio n. 2
0
        public override void Draw()
        {
            if (ActionCmd?.AcceptingInput == false)
            {
                return;
            }

            if (ActionCmd.AllBombsThrown == false)
            {
                Cursor.Draw();
            }

            ThrownCursor?.Draw();
        }
        public override void Draw()
        {
            if (ActionCmd.AcceptingInput == false)
            {
                return;
            }

            PowerLiftGrid.Draw();
            Cursor.Draw();

            DrawGrid();

            //Draw the boosts
            DrawBoosts();

            //Draw time remaining (debug)
            SpriteRenderer.Instance.DrawUIText(AssetManager.Instance.TTYDFont, Math.Round(ActionCmd.CommandTime - ActionCmd.ElapsedCommandTime, 0).ToString(), new Vector2(250, 130), Color.White, .7f);
        }
        public override void Draw()
        {
            if (ActionCmd?.AcceptingInput == false)
            {
                return;
            }

            string text  = "NO!";
            Color  color = Color.Red;

            if (ActionCmd.WithinRange == true)
            {
                text  = "OKAY!";
                color = Color.Green;
            }

            SpriteRenderer.Instance.DrawUIText(AssetManager.Instance.TTYDFont, text, new Vector2(300, 150), color, .7f);

            BigCursor.Draw();
            SmallCursor.Draw();

            if (ActionCmd.WithinRange == true)
            {
                Vector2 prevScale = BigCursor.Scale;

                //Cap the scale so it can be seen clearly at all times
                const float maxScale = .8f;

                //Get the absolute value of the distance from the cursor to the center
                //Divide by half the SuccessRect's width since we're scaling based on how close it is to the center
                float diff  = Math.Abs(ActionCmd.SmallCursorPos.X - ActionCmd.SuccessRect.Center.X) / (ActionCmd.SuccessRect.Width / 2f);
                float scale = UtilityGlobals.Clamp(diff, 0f, maxScale);

                BigCursor.Scale = new Vector2(scale);
                BigCursor.Draw();

                BigCursor.Scale = prevScale;
            }
        }
        public override void Draw()
        {
            if (ActionCmd?.AcceptingInput == false)
            {
                return;
            }

            Cursor.Draw();

            MarioHPIcon.Draw();
            MarioHPText.Draw();
            FPIcon.Draw();
            FPText.Draw();
            if (ShowPartnerInfo == true)
            {
                PartnerHPIcon.Draw();
                PartnerHPText.Draw();
            }

            for (int i = 0; i < ActionCmd.StarsThrown.Count; i++)
            {
                ActionCmd.StarsThrown[i].Draw();
            }
        }