public override void Render()
        {
            if (unitBubbleTimerIn.IsRunning || unitBubbleTimerIn.IsCompleted || unitBubbleTimerOut.IsRunning)
            {
                RenderManager.DrawQuad(
                    Key: "CONTEXT_MENU_CIRCLE",
                    Position: pos + BUBBLE_A_POS,
                    Scale: unitBubbleTimerOut.IsRunning ? BananaMath.Qerp(0.5f, 0.7f, 0.0f, unitBubbleTimerOut.Status) : BananaMath.Qerp(0, 0.7f, 0.5f, unitBubbleTimerIn.Status),
                    Origin: new Vector2(0.5f),
                    Col: isTouchingA ? Color.LightGray : Color.White);
                RenderManager.DrawQuad(
                    Key: "CONTEXT_MENU_CIRCLE",
                    Position: pos + BUBBLE_B_POS,
                    Scale: unitBubbleTimerOut.IsRunning ? BananaMath.Qerp(0.5f, 0.7f, 0.0f, unitBubbleTimerOut.Status) : BananaMath.Qerp(0, 0.7f, 0.5f, unitBubbleTimerIn.Status),
                    Origin: new Vector2(0.5f),
                    Col: isTouchingB ? Color.LightGray : Color.White);
            }

            if (unitCountBubbleTimerIn.IsRunning || unitCountBubbleTimerIn.IsCompleted || unitCountBubbleTimerOut.IsRunning)
            {
                if (touchedBubble != -1)
                {
                    for (int i = 0; i < 4; i++)
                    {
                        Vector2 bubblePos = (touchedBubble == BUBBLE_A_ID ? BUBBLE_A_POS : BUBBLE_B_POS) + COUNT_BUBBLES[i];
                        RenderManager.DrawQuad(
                            Key: "CONTEXT_MENU_CIRCLE",
                            Position: pos + bubblePos,
                            Scale: unitCountBubbleTimerOut.IsRunning ? BananaMath.Qerp(0.2f, 0.3f, 0.0f, unitCountBubbleTimerOut.Status) : BananaMath.Qerp(0, 0.3f, 0.2f, unitCountBubbleTimerIn.Status),
                            Origin: new Vector2(0.5f),
                            Col: isTouchingCount[i] ? Color.Gray : Color.LightGray);
                    }
                }
            }
        }
예제 #2
0
 public override void Render()
 {
     RenderManager.DrawQuad(Key: "DEBUG_BUILDING", Position: new Vector2(gridX * GlobalConstants.TILE_WIDTH, (gridY - 2) * GlobalConstants.TILE_HEIGHT));
 }