Logo
Explore Help
Sign In
juni/crystall-punk-14
1
0
Fork 0
You've already forked crystall-punk-14
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
6a08647375d4eb95bc7e81f31e76cd650ca73e81
crystall-punk-14/Content.Tests/Client/UserInterface/ItemSlotTest.cs

18 lines
484 B
C#
Raw Normal View History

Inventory Input (#503) * Create ItemSlotButton * Refactor inventory buttons Refactor so that KeyBind handling of inventory and hands are the same. * Refactor InventoryInterfaceController to call ItemSlotManager with entities This change allows HandsGUI and InventoryInterfaceController to just call ItemSlotManager.OnButtonPressed with an entity instead of a slot. * Add CooldownCircle to ItemSlotButton This allows Hands and Inventory to have cooldown circles on their ItemSlots. * Refactor HandsGUI to use ItemSlots This allows functionality and GUI to be the same between Inventory and Hands. Added clicking empty hand to switch ActiveHand to clicked hand. * Implement CooldownCircle in ItemSlotManager Reorganize files
2020-01-17 06:43:20 -08:00
using Content.Client.UserInterface;
using NUnit.Framework;
namespace Content.Tests.Client.UserInterface
{
[TestFixture]
public class ItemSlotTest
{
[Test]
public void TestCalculateCooldownLevel()
{
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(0.5f), 4);
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(1), 8);
Assert.AreEqual(ItemSlotManager.CalculateCooldownLevel(0), 0);
}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 30ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API