CooldownUI

版本 v1.0.2·更新於 2026-03-07

A universal UI library for displaying cooldowns, timers, and status indicators above players. Easy to integrate into your ROUNDS mods.

模組介紹 作者原文

CooldownUI

A universal UI library for ROUNDS that provides easy-to-use cooldown timers, status indicators, and text displays above players.

Features

  • Cooldown Timers - Display countdown with color transition (red → green)
  • Active Duration - Show remaining active time (cyan color)
  • Custom Text - Display any text with custom colors
  • Icons - Text icons (symbols) and sprite icons next to timers
  • Auto-Stacking - Multiple timers automatically stack vertically
  • Dynamic Scale Compensation - UI maintains constant size even when player scales up/down
  • Standardized Size - Consistent text size across all mods using this library
  • Performance - Efficient TextMeshPro rendering with built-in outline

Usage

Add as Dependency

In your mod's manifest.json:

{

"dependencies": [

"BellusFennec-CooldownUI-1.0.1"

]

}

In your plugin class:

[BepInDependency("com.rounds.cooldownui", BepInDependency.DependencyFlags.HardDependency)]

Basic Examples

Creating a Cooldown Timer

using CooldownUILib;

public class MyCardMono: MonoBehaviour

{

private CooldownUI cooldownUI;

private Player player;

private float cooldown = 5f;

private float cooldownTimer = 0f;

void Start()

{

player = GetComponent();

// Create UI attached to player

cooldownUI = CooldownUI.Create(player.transform);

// Optional: Set an icon

cooldownUI.SetIcon("⚡", Color.yellow);

}

void Update()

{

if (cooldownTimer > 0f)

{

cooldownTimer -= Time.deltaTime;

cooldownUI.ShowCooldown(cooldownTimer, cooldown);

}

else

{

cooldownUI.Hide();

}

}

void OnDestroy()

{

if (cooldownUI!= null)

{

Destroy(cooldownUI.gameObject);

}

}

}

Showing Active Duration

// Show remaining active time (cyan color)

cooldownUI.ShowActive(remainingTime);

Custom Text Display

// Show custom text

cooldownUI.ShowText("READY", Color.green);

cooldownUI.ShowText("x3", Color.white); // Stack count

cooldownUI.ShowText("BLOCKED", Color.red);

// Convenience methods

cooldownUI.ShowReady(); // Shows "READY" in green

cooldownUI.ShowStacks(3); // Shows "x3"

cooldownUI.ShowStacks(5, Color.yellow);

Icon Support

CooldownUI supports from Noto Sans Symbols font family.

Icon that are displayed correctly:

{ "Arrows", new { "←", "↑", "→", "↓", "↔", "↕", "➤" } },

{ "NumberForms", new { "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ", "Ⅹ" } },

{ "Combat", new { "⚔", "⚒", "⚓", "☠", "⚙", "⚗", "⚖", "⛏", "⛓", "⛊", "⚰", "⛨" } },

{ "Magic", new { "⚡", "❄", "☀", "☁", "☂", "☃", "✴", "❋", "☼" } },

{ "Hearts", new { "❤", "♥", "♡", "❥" } },

{ "Status", new { "✓", "✔", "✗", "✘", "⚠" } },

{ "Stars", new { "★", "☆", "✦", "✧", "✪", "✫", "✬", "✭", "✮", "✯" } },

{ "Shapes", new { "●", "○", "■", "▲", "△", "▼", "▽", "◆", "◇" } },

{ "Numbers", new { "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "⑩" } },

{ "Cards", new { "♠", "♡", "♢", "♣", "♤", "♥", "♦", "♧" } },

{ "Music", new { "♩", "♪", "♫", "♬" } },

{ "Math", new { "+", "±", "×", "÷", "=", "-" } },

{ "Progress", new { "⏱", "⌛" } },

{ "Misc", new { "☯", "☮", "⚛", "☢", "☣", "⚕", "⚜" } }

check, there may be more of them.

Text Icons (Symbols)

cooldownUI.SetIcon("⬆", Color.green); // Arrow up

cooldownUI.SetIcon("⬇", Color.red);

cooldownUI.SetIcon("①", Color.white); // Circled 1

cooldownUI.SetIcon("☯", Color.white); // Yin yang

Sprite Icons

// Use custom sprite as icon

cooldownUI.SetIconSprite(mySprite, Color.white);

// Clear sprite icon

cooldownUI.ClearIconSprite();

Icon Configuration

// Position icon on left or right of timer

cooldownUI.SetIconPosition(IconPosition.Left); // Default

cooldownUI.SetIconPosition(IconPosition.Right);

// Sync icon color with timer (red→green during cooldown)

cooldownUI.SetIconColorSync(true);

// Hide icon when showing "READY"

cooldownUI.SetHideIconOnReady(true);

// Scale icon (0.1 to 3.0)

cooldownUI.SetIconScale(1.5f);

// Clear any icon

cooldownUI.ClearIcon();

Advanced Usage

Custom Colors

// Set custom state colors

cooldownUI.SetColors(

ready: Color.cyan, // When cooldown complete

cooldown: Color.magenta, // Dur

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_ROUNDSwillis81808-UnboundLib

檔案與校驗

檔案名稱
CooldownUI-1.0.2.zip
檔案大小
321.8 KiB