Changed font

This commit is contained in:
Max 2025-03-07 10:35:06 +01:00
parent d3e2d425bf
commit a0ec711c4a
12 changed files with 1700 additions and 42 deletions

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2416b501165384949a1b4375962448e2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca1c3c099fa736146a634d8577a3badf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View file

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: dea933cb5aeaba14f9a99fbc1d26ba5d
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Morris Roman
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View file

@ -13,7 +13,7 @@ public class Player : MonoBehaviour
[SerializeField] private int maxHealth;
[SerializeField] private int diamonds;
[SerializeField] private GameObject rooms;
private int _healthIndex = 0;
private int _healthIndex;
private readonly int[] _healthBar = {0, 0, -1, -2, -4, -6, -9, -12, -16, -20};
private void OnEnable()
@ -29,7 +29,9 @@ public class Player : MonoBehaviour
RoomRewards.DamageDealt -= TakeDamage;
}
private void Start() {
private void Start()
{
_healthIndex = 0;
UpdateGUI();
}

View file

@ -24,22 +24,9 @@ namespace UI
[SerializeField] private ArmorAbility armorAbility;
[SerializeField] private Player player;
public static UIManager Instance { get; private set; }
private Dictionary<Die, Button> _dieToButtonMapping = new Dictionary<Die, Button>();
void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
DontDestroyOnLoad(gameObject);
}
private void OnEnable()
{
chestPopUpController = chestPopUpControllerGO.GetComponent<ChestPopUpController>();

View file

@ -3,9 +3,9 @@
<ui:VisualElement name="Base" style="flex-grow: 1; height: auto; flex-direction: row; align-items: stretch; justify-content: space-between;">
<ui:VisualElement name="DungeonThumbnail" picking-mode="Ignore" style="flex-grow: 1; position: absolute; width: 67%; height: 100%; right: 0; top: 0;" />
<ui:VisualElement name="Menu" style="flex-grow: 1; width: 33%; background-color: rgb(56, 56, 56); bottom: 0; top: 0; position: relative; left: 0; max-width: 33%;">
<ui:Label text="Dungeon Name" name="DungeonName" class="MenuHeader MenuHTwo" style="-unity-text-align: upper-center; color: rgb(255, 255, 255);" />
<ui:Label text="Dungeon Name" name="DungeonName" class="MenuHeader MenuHTwo" style="-unity-text-align: upper-center; color: rgb(255, 255, 255); -unity-font-definition: url(&quot;project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&amp;guid=ca1c3c099fa736146a634d8577a3badf&amp;type=2#MorrisRoman-Black SDF&quot;);" />
<ui:VisualElement style="flex-grow: 1;">
<ui:Label text="High Scores" name="HighScores" class="MenuHThree" style="-unity-text-align: upper-center; color: rgb(255, 255, 255);" />
<ui:Label text="High Scores" name="HighScores" class="MenuHThree" style="-unity-text-align: upper-center; color: rgb(255, 255, 255); -unity-font-definition: url(&quot;project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&amp;guid=ca1c3c099fa736146a634d8577a3badf&amp;type=2#MorrisRoman-Black SDF&quot;);" />
<ui:ListView name="HighScoresListView" allow-add="false" allow-remove="false" show-bound-collection-size="false" virtualization-method="DynamicHeight" class="MenuText" style="flex-grow: 1; color: rgb(255, 255, 255); padding-left: 30px; padding-right: 30px;" />
</ui:VisualElement>
</ui:VisualElement>
@ -16,6 +16,6 @@
<ui:Button text="Next" name="Next" class="button border" style="-unity-text-align: middle-left;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:Button text="How To Play" name="Rules" class="border" style="position: absolute; top: 0; right: 0; background-color: rgb(182, 127, 194);" />
<ui:Button text="How To Play" name="Rules" class="border MenuText" style="position: absolute; top: 0; right: 0; background-color: rgb(182, 127, 194);" />
</ui:VisualElement>
</ui:UXML>

View file

@ -4,10 +4,10 @@
<engine:VisualElement style="flex-grow: 1; width: 50%; height: auto; align-items: center; justify-content: space-around;">
<engine:VisualElement name="box" class="border" style="flex-grow: 0; width: 600px; height: 450px; background-color: rgb(125, 125, 125); justify-content: space-between; padding-top: 50px; padding-right: 50px; padding-bottom: 50px; padding-left: 50px;">
<engine:VisualElement name="Title" style="flex-grow: 0; justify-content: center; height: auto;">
<engine:Label text="Title" name="Title" class="MenuHTwo" style="-unity-text-align: upper-center;" />
<engine:Label text="Title" name="Title" class="MenuHTwo MenuHOne" style="-unity-text-align: upper-center;" />
<engine:Label text="Label" name="Message" class="MenuText" style="-unity-text-align: upper-center; text-overflow: clip;" />
</engine:VisualElement>
<engine:VisualElement name="NameInput" style="flex-grow: 1; align-items: center; justify-content: center; flex-direction: row;">
<engine:VisualElement name="NameInput" class="MenuText" style="flex-grow: 1; align-items: center; justify-content: center; flex-direction: row;">
<engine:Label text="Name" style="-unity-text-align: upper-center;" />
<engine:TextField placeholder-text="AAA" max-length="3" name="NameField" class="border" style="flex-grow: 0; flex-shrink: 0; justify-content: flex-start; align-items: center; flex-direction: row;" />
</engine:VisualElement>
@ -15,19 +15,19 @@
<engine:VisualElement name="VisualElement" style="flex-grow: 0; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); justify-content: flex-end;">
<engine:VisualElement name="DiamondScoreBox" style="flex-grow: 0; align-items: center; justify-content: center; flex-direction: row;">
<engine:VisualElement name="DiamondImageBox" style="flex-grow: 0; width: 30px; height: 30px; flex-shrink: 0;" />
<engine:Label text="Label" name="PointsFromDiamond" style="-unity-text-align: upper-center;" />
<engine:Label text="Label" name="PointsFromDiamond" class="MenuText" style="-unity-text-align: upper-center;" />
</engine:VisualElement>
<engine:VisualElement name="HealthScoreBox" style="flex-grow: 0; align-items: center; justify-content: center; flex-direction: row;">
<engine:VisualElement name="HealthImageBox" style="flex-grow: 0; background-size: 50px 50px; flex-shrink: 0; width: 20px; height: 20px;" />
<engine:Label text="Label" name="PointsFromHealth" style="-unity-text-align: upper-center;" />
<engine:Label text="Label" name="PointsFromHealth" class="MenuText" style="-unity-text-align: upper-center;" />
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="VisualElement" style="flex-grow: 0; width: 50%; border-top-width: 2px; border-left-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0);">
<engine:Label text="Label" name="ScoreSum" style="-unity-text-align: upper-center;" />
<engine:Label text="Label" name="ScoreSum" class="MenuText" style="-unity-text-align: upper-center;" />
</engine:VisualElement>
</engine:VisualElement>
<engine:Button text="Save" name="Save" class="border button" style="position: absolute; right: 3px; bottom: 3px; font-size: 18px; background-color: rgb(87, 167, 0); color: rgb(0, 0, 0);" />
<engine:Button name="Close" text="X" class="CloseButton" />
<engine:Button text="Save" name="Save" class="border button MenuText" style="position: absolute; right: 3px; bottom: 3px; font-size: 18px; background-color: rgb(87, 167, 0); color: rgb(0, 0, 0);" />
<engine:Button name="Close" text="X" class="CloseButton MenuText" />
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>

View file

@ -84,22 +84,22 @@
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="Bottom" style="flex-grow: 1; flex-direction: row; flex-shrink: 1; height: 20%; max-width: 100%; justify-content: flex-start; align-items: flex-end; align-self: stretch;">
<engine:VisualElement name="Bottom" style="flex-grow: 0; flex-direction: row; flex-shrink: 1; height: auto; max-width: 100%; justify-content: flex-start; align-items: flex-end; align-self: stretch;">
<engine:VisualElement name="DiamondCountBox" class="border margin" style="flex-grow: 0; width: 106px; height: 50px; background-color: rgb(188, 188, 188); align-self: flex-end; flex-direction: row; justify-content: space-between;">
<engine:VisualElement name="Diamond" style="flex-grow: 0; background-image: url(&quot;project://database/Assets/Sprites/Loot/Crystal%20(1x1)%201.png?fileID=2800000&amp;guid=12c75eb8a2e326b4e9c47b9f7cb06a2c&amp;type=3#Crystal (1x1) 1&quot;); height: 50px; width: 50px; flex-shrink: 0; align-self: center;" />
<engine:VisualElement style="flex-grow: 1; justify-content: center;">
<engine:Label text="0" name="DiamondCount" style="-unity-text-align: middle-center; font-size: 38px;" />
<engine:Label text="0" name="DiamondCount" class="MenuText" style="-unity-text-align: middle-center; font-size: 38px;" />
</engine:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="DiceRoller" style="flex-grow: 0; align-self: flex-end; flex-direction: row-reverse; position: absolute; bottom: 0; left: 0; right: 0; justify-content: center;">
<engine:Button text="Roll" name="RollPass" class="button" style="align-self: center; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; height: 50px; margin-left: 11px; margin-bottom: 3px; width: 106px;" />
<engine:Button text="Roll" name="RollPass" class="button MenuText" style="align-self: center; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; height: 50px; margin-left: 11px; margin-bottom: 3px; width: 106px;" />
<engine:GroupBox name="Dice" style="flex-direction: row; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; padding-left: 0;">
<engine:Button text="1" name="BlackDie" class="die black margin" />
<engine:Button text="1" enabled="true" class="die white used margin" />
<engine:Button text="1" class="die white margin" />
<engine:Button text="1" class="die white margin" />
<engine:Button text="1" class="die white margin" />
<engine:Button text="1" name="BlackDie" class="die black margin MenuText" />
<engine:Button text="1" enabled="true" class="die white used margin MenuText" />
<engine:Button text="1" class="die white margin MenuText" />
<engine:Button text="1" class="die white margin MenuText" />
<engine:Button text="1" class="die white margin MenuText" />
</engine:GroupBox>
</engine:VisualElement>
</engine:VisualElement>

View file

@ -1,38 +1,38 @@
<engine:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:engine="UnityEngine.UIElements" xmlns:editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="project://database/Assets/UI/Styles/style1.uss?fileID=7433441132597879392&amp;guid=97546bb1d1d93d84e9b4ef0c8ae11a0e&amp;type=3#style1" />
<Style src="project://database/Assets/rules.uss?fileID=7433441132597879392&amp;guid=37df2aec7be296542a3f7694158ff548&amp;type=3#rules" />
<engine:VisualElement name="VisualElement" style="flex-grow: 1; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; align-items: center; -unity-font-style: normal; background-color: rgba(0, 0, 0, 0.49); padding-top: 50px; padding-right: 50px; padding-bottom: 50px; padding-left: 50px;">
<engine:VisualElement name="VisualElement" style="flex-grow: 1; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; align-items: center; background-color: rgba(0, 0, 0, 0.49); padding-top: 50px; padding-right: 50px; padding-bottom: 50px; padding-left: 50px;">
<engine:VisualElement name="Page" class="border" style="flex-grow: 1; width: 700px; height: 500px; background-color: rgb(182, 127, 194); padding-top: 20px; padding-right: 6px; padding-bottom: 20px; padding-left: 20px;">
<engine:Label text="How To Play" class="MenuHOne" style="-unity-text-align: upper-center; flex-grow: 0; flex-direction: row; margin-bottom: 16px; margin-top: 0;" />
<engine:ScrollView horizontal-scroller-visibility="Auto" vertical-scroller-visibility="AlwaysVisible" style="flex-grow: 1;">
<engine:VisualElement name="Rolling" style="flex-grow: 1;">
<engine:Label text="Roll Explore Repeat" name="RollExploreRepeat" class="MenuHTwo" style="text-overflow: clip; white-space: normal;" />
<engine:Label text="Roll Explore Repeat" name="RollExploreRepeat" class="MenuHTwo" style="text-overflow: clip; white-space: normal; -unity-font-definition: url(&quot;project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&amp;guid=ca1c3c099fa736146a634d8577a3badf&amp;type=2#MorrisRoman-Black SDF&quot;);" />
<engine:Label text="Roll the dice. Select two. Unlock a room. Repeat.&#10;" parse-escape-sequences="true" class="MenuText" style="white-space: normal; -unity-font-style: normal;" />
<engine:Label text="If you don&apos;t unlock two rooms with the rolled dice you will take damage." class="MenuText" style="-unity-font-style: normal;" />
</engine:VisualElement>
<engine:VisualElement name="KillMonsters" style="flex-grow: 1;">
<engine:Label text="Kill All Monsters" name="Label" class="MenuHTwo" />
<engine:Label text="Kill All Monsters" name="Label" class="MenuHTwo" style="-unity-font-definition: url(&quot;project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&amp;guid=ca1c3c099fa736146a634d8577a3badf&amp;type=2#MorrisRoman-Black SDF&quot;);" />
<engine:Label text="Kill monsters by unlocking their rooms until all their health boxes are checked." class="MenuText" />
<engine:Label text="If you kill all the monsters in the dungeon you win! The more Diamonds you collect and the less Damage you take the higher your score at the end." class="MenuText" />
</engine:VisualElement>
<engine:VisualElement name="Abilites" style="flex-grow: 1;">
<engine:Label text="Abilities" class="MenuHTwo" />
<engine:Label text="Found in chests." />
<engine:Label text="Abilities" class="MenuHTwo" style="-unity-font-definition: url(&quot;project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&amp;guid=ca1c3c099fa736146a634d8577a3badf&amp;type=2#MorrisRoman-Black SDF&quot;);" />
<engine:Label text="Found in chests." class="MenuText" />
<engine:VisualElement name="BlackDie" class="ability">
<engine:VisualElement class="ability-image" style="flex-grow: 0; background-image: url(&quot;project://database/Assets/Sprites/No%20Edges.png?fileID=21300000&amp;guid=982f0bccdf239df48af0a465f9ce7536&amp;type=3#No Edges&quot;); width: 50px; height: 50px;" />
<engine:Label text="Let&apos;s you use the black die to unlock a room. You start with three uses." name="BlackDieText" class="MenuText" />
</engine:VisualElement>
<engine:VisualElement name="Key" class="ability">
<engine:VisualElement class="ability-image" style="flex-grow: 0; background-image: url(&quot;project://database/Assets/Sprites/Key.png?fileID=2800000&amp;guid=99e2733a78fd7a543b2adc84e3d4d3b4&amp;type=3#Key&quot;); width: 50px; height: 50px;" />
<engine:Label text="Unlock a room." name="KeyText" />
<engine:Label text="Unlock a room." name="KeyText" class="MenuText" />
</engine:VisualElement>
<engine:VisualElement name="Armor" class="ability">
<engine:VisualElement class="ability-image" style="flex-grow: 0; width: 50px; height: 50px; background-image: url(&quot;project://database/Assets/Sprites/Armor.png?fileID=-2757887451555568444&amp;guid=cd864920aacb45b4eaf6bd3c70bb6625&amp;type=3#Armor_0&quot;);" />
<engine:Label text="Blocks damage." name="ArmorText" style="-unity-text-align: upper-left;" />
<engine:Label text="Blocks damage." name="ArmorText" class="MenuText" style="-unity-text-align: upper-left;" />
</engine:VisualElement>
</engine:VisualElement>
</engine:ScrollView>
<engine:Button text="X" name="Close" class="CloseButton" />
<engine:Button text="X" name="Close" class="CloseButton MenuText" />
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View file

@ -1,15 +1,18 @@
.MenuHTwo {
-unity-font-definition: url("project://database/Library/unity%20default%20resources?fileID=10102&guid=0000000000000000e000000000000000&type=0#LegacyRuntime");
-unity-font-definition: url('project://database/Assets/Fonts/Ancient%20Medium%20SDF.asset?fileID=11400000&guid=71760cc034e237343ad5129770398005&type=2#Ancient Medium SDF');
-unity-font-style: normal;
font-size: 39px;
}
.MenuHThree {
font-size: 25px;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
}
.MenuText {
white-space: normal;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
font-size: 16px;
}
.unity-toggle__checkmark {
@ -45,6 +48,7 @@
.MenuHThree {
font-size: 25px;
-unity-font-definition: url('project://database/Assets/Fonts/Ancient%20Medium%20SDF.asset?fileID=11400000&guid=71760cc034e237343ad5129770398005&type=2#Ancient Medium SDF');
}
.CloseButton {
@ -92,6 +96,7 @@
padding-bottom: 5px;
padding-left: 5px;
font-size: 31px;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
}
.unity-base-text-field__input {
@ -134,6 +139,11 @@
align-items: center;
}
.MenuText {
white-space: normal;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
}
.unity-scroller__low-button {
visibility: hidden;
display: flex;
@ -171,4 +181,14 @@
.MenuHOne {
font-size: 55px;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
}
.MenuText {
white-space: normal;
-unity-font-definition: url("project://database/Assets/Fonts/MorrisRoman-Black%20SDF.asset?fileID=11400000&guid=ca1c3c099fa736146a634d8577a3badf&type=2#MorrisRoman-Black SDF");
}
.CloseButton:hover {
background-color: rgb(255, 32, 32);
}