Compare commits

...

2 commits

Author SHA1 Message Date
Max
3651adbef8 Implemented end of game screen 2025-03-04 17:02:03 +01:00
Max
ac10c8a2fc Fixed dungeon thumbnail to better fit in view 2025-03-03 16:32:58 +01:00
26 changed files with 20042 additions and 19367 deletions

View file

@ -15,3 +15,5 @@ MonoBehaviour:
DungeonName: Abomination Vault DungeonName: Abomination Vault
Thumbnail: {fileID: 21300000, guid: 64f388d4f370f6d4db97a9fd30afb6a9, type: 3} Thumbnail: {fileID: 21300000, guid: 64f388d4f370f6d4db97a9fd30afb6a9, type: 3}
SceneName: 01_30x30_5_monster SceneName: 01_30x30_5_monster
WinMessage: Now you may return to Otari a hero!
DieMessage: Who will be left to save the town of Otari?

View file

@ -15,3 +15,5 @@ MonoBehaviour:
DungeonName: Tomb of Annihilation DungeonName: Tomb of Annihilation
Thumbnail: {fileID: 21300000, guid: 2d9ec4bca04e08448924650a381b2041, type: 3} Thumbnail: {fileID: 21300000, guid: 2d9ec4bca04e08448924650a381b2041, type: 3}
SceneName: 02_30x30_5_monster SceneName: 02_30x30_5_monster
WinMessage: The curse is broken, but the scars remain
DieMessage: You were warned

View file

@ -15,3 +15,5 @@ MonoBehaviour:
DungeonName: Descent Into Avernus DungeonName: Descent Into Avernus
Thumbnail: {fileID: 21300000, guid: ef152ae0fa820c2429781e262a724da4, type: 3} Thumbnail: {fileID: 21300000, guid: ef152ae0fa820c2429781e262a724da4, type: 3}
SceneName: 03_30x30_5_monster SceneName: 03_30x30_5_monster
WinMessage: You killed them all... but at what cost?
DieMessage: You weren't the first and won't be the last...

View file

@ -738,11 +738,11 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3} - target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.60255843 value: -0.925
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3} - target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: -0.26261055 value: -0.602
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3} - target: {fileID: 2193341219983027770, guid: 22049de4837a00441afd046eadbf8e27, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z

View file

@ -247,6 +247,7 @@ MonoBehaviour:
canvas: {fileID: 0} canvas: {fileID: 0}
hudController: {fileID: 337186334} hudController: {fileID: 337186334}
chestPopUpControllerGO: {fileID: 1772543306} chestPopUpControllerGO: {fileID: 1772543306}
endOfGamePupUpGO: {fileID: 1034870746}
chestPopUpController: {fileID: 1772543309} chestPopUpController: {fileID: 1772543309}
diceGO: {fileID: 379942240} diceGO: {fileID: 379942240}
diceRoller: {fileID: 2128537222} diceRoller: {fileID: 2128537222}
@ -1695,6 +1696,72 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a942e4ca1244b054b8ca96ded24fb63a, type: 3} m_Script: {fileID: 11500000, guid: a942e4ca1244b054b8ca96ded24fb63a, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!1 &1034870746
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1034870749}
- component: {fileID: 1034870748}
- component: {fileID: 1034870747}
m_Layer: 5
m_Name: EndOfGamePopUp
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!114 &1034870747
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034870746}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad2e64e6a9233f54a90f666bbbc029d8, type: 3}
m_Name:
m_EditorClassIdentifier:
diamondSprite: {fileID: 21300000, guid: 12c75eb8a2e326b4e9c47b9f7cb06a2c, type: 3}
healthSprite: {fileID: 21300000, guid: 251a73d312e38e24d970c06b9ea50c5f, type: 3}
--- !u!114 &1034870748
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034870746}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PanelSettings: {fileID: 11400000, guid: 79ea83e6353cc60439227b4505222385, type: 2}
m_ParentUI: {fileID: 0}
sourceAsset: {fileID: 9197481963319205126, guid: e1d19b3943ed8e44d8bc9777d6088c10, type: 3}
m_SortingOrder: 0
m_WorldSpaceSizeMode: 1
m_WorldSpaceWidth: 1920
m_WorldSpaceHeight: 1080
--- !u!4 &1034870749
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034870746}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1180479345 --- !u!1001 &1180479345
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2031,6 +2098,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 1417835872} - component: {fileID: 1417835872}
- component: {fileID: 1417835871} - component: {fileID: 1417835871}
- component: {fileID: 1417835873}
m_Layer: 0 m_Layer: 0
m_Name: GameManager m_Name: GameManager
m_TagString: Untagged m_TagString: Untagged
@ -2054,6 +2122,7 @@ MonoBehaviour:
diceRoller: {fileID: 2128537222} diceRoller: {fileID: 2128537222}
passManager: {fileID: 2128537221} passManager: {fileID: 2128537221}
player: {fileID: 386902759} player: {fileID: 386902759}
dungeonData: {fileID: 0}
--- !u!4 &1417835872 --- !u!4 &1417835872
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2069,6 +2138,19 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1417835873
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417835870}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c900817c8cb721946b8efc4fbe6f7ef0, type: 3}
m_Name:
m_EditorClassIdentifier:
dungeonData: {fileID: 0}
--- !u!1001 &1577335134 --- !u!1001 &1577335134
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2907,3 +2989,4 @@ SceneRoots:
- {fileID: 1772543308} - {fileID: 1772543308}
- {fileID: 2128537223} - {fileID: 2128537223}
- {fileID: 748138896} - {fileID: 748138896}
- {fileID: 1034870749}

View file

@ -48,6 +48,8 @@ MonoBehaviour:
instantiationMode: 0 instantiationMode: 0
- dependency: {fileID: 2800000, guid: b3525a13bc009d14598c4f13e35df6bd, type: 3} - dependency: {fileID: 2800000, guid: b3525a13bc009d14598c4f13e35df6bd, type: 3}
instantiationMode: 0 instantiationMode: 0
- dependency: {fileID: 9197481963319205126, guid: e1d19b3943ed8e44d8bc9777d6088c10, type: 3}
instantiationMode: 1
- dependency: {fileID: 6167039396952026974, guid: 5e46b071ca9c11745a7893c22faf6976, type: 3} - dependency: {fileID: 6167039396952026974, guid: 5e46b071ca9c11745a7893c22faf6976, type: 3}
instantiationMode: 1 instantiationMode: 1
- dependency: {fileID: 7433441132597879392, guid: 97546bb1d1d93d84e9b4ef0c8ae11a0e, type: 3} - dependency: {fileID: 7433441132597879392, guid: 97546bb1d1d93d84e9b4ef0c8ae11a0e, type: 3}

View file

@ -9,5 +9,7 @@ namespace DungeonSelection
public string DungeonName; public string DungeonName;
public Sprite Thumbnail; public Sprite Thumbnail;
public string SceneName; public string SceneName;
public string WinMessage;
public string DieMessage;
} }
} }

View file

@ -8,6 +8,5 @@ namespace DungeonSelection
public static Action NextDungeonClicked; public static Action NextDungeonClicked;
public static Action PreviousDungeonClicked; public static Action PreviousDungeonClicked;
public static Action<DungeonData> EnterDungeonClicked; public static Action<DungeonData> EnterDungeonClicked;
} }
} }

View file

@ -3,9 +3,33 @@ using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
using System.Collections.Generic; using System.Collections.Generic;
using Abilities; using Abilities;
using DungeonSelection;
using TMPro; using TMPro;
using Unity.VisualScripting; using Unity.VisualScripting;
public class EndOfGameEventArgs : EventArgs
{
public EndOfGameEventArgs(
string message,
bool died,
int diamonds,
int pointsFromHealth,
int finalScore)
{
Message = message;
Died = died;
Diamonds = diamonds;
PointsFromHealth = pointsFromHealth;
FinalScore = finalScore;
}
public bool Died { get; private set; }
public int Diamonds { get; private set; }
public readonly int DiamondsMultiplier = 3;
public int PointsFromHealth { get; private set; }
public int FinalScore { get; private set; }
public string Message { get; private set; }
}
public enum GameState public enum GameState
{ {
RollDice, RollDice,
@ -21,12 +45,28 @@ public class GameManager : MonoBehaviour
[SerializeField] private DiceRoller diceRoller; [SerializeField] private DiceRoller diceRoller;
[SerializeField] private PassManager passManager; [SerializeField] private PassManager passManager;
[SerializeField] private Player player; [SerializeField] private Player player;
[SerializeField] private DungeonData dungeonData;
private DicePair _dicePairOne = new(); private DicePair _dicePairOne = new();
private DicePair _dicePairTwo = new(); private DicePair _dicePairTwo = new();
private int monstersLeft = 0; // Includes boss monster. Used for detecting end of game.
public static event Action<GameState> StateChanged; public static event Action<GameState> StateChanged;
public static event Action<DicePair> DiceSelected; public static event Action<DicePair> DiceSelected;
public static event Action DiceUnselected; public static event Action DiceUnselected;
public static event EventHandler<EndOfGameEventArgs> EndOfGame;
private void OnEnable()
{
MonsterRoom.MonsterRoomExplored += HandleMonsterRoomExplored;
player.Died += HandlePlayerDied;
}
private void OnDisable()
{
MonsterRoom.MonsterRoomExplored -= HandleMonsterRoomExplored;
player.Died -= HandlePlayerDied;
}
// Start is called once before the first execution of Update after the MonoBehaviour is created // Start is called once before the first execution of Update after the MonoBehaviour is created
void Start() void Start()
@ -36,7 +76,12 @@ public class GameManager : MonoBehaviour
rooms = GameObject.FindWithTag("RoomsParent"); rooms = GameObject.FindWithTag("RoomsParent");
foreach (Transform roomTransform in rooms.transform) foreach (Transform roomTransform in rooms.transform)
{ {
roomTransform.gameObject.GetComponent<Room>().RoomExploredByDice += HandleRoomExploredByDice; Room roomComponent = roomTransform.gameObject.GetComponent<Room>();
roomComponent.RoomExploredByDice += HandleRoomExploredByDice;
if (roomComponent is MonsterRoom)
{
monstersLeft++;
}
} }
foreach (Transform diceTransform in diceRoller.dice.transform) foreach (Transform diceTransform in diceRoller.dice.transform)
{ {
@ -149,4 +194,49 @@ public class GameManager : MonoBehaviour
return; return;
} }
} }
private void HandleMonsterRoomExplored()
{
monstersLeft--;
if (monstersLeft <= 0)
{
ResolveEndOfGame(true);
}
}
private void HandlePlayerDied()
{
ResolveEndOfGame(false);
}
private void ResolveEndOfGame(bool allMonstersKilled)
{
string message;
if (allMonstersKilled)
{
message = dungeonData.WinMessage;
}
else
{
message = dungeonData.DieMessage;
}
int finalScore = CalculateScore();
Debug.Log($"Final score: {finalScore}");
EndOfGame?.Invoke(this, new EndOfGameEventArgs(
message,
!allMonstersKilled,
player.GetDiamondCount(),
player.GetHealthScore(),
finalScore));
}
private int CalculateScore()
{
int sum = 0;
sum += player.GetDiamondCount() * 3;
sum += player.GetHealthScore();
return sum;
}
} }

View file

@ -0,0 +1,30 @@
using System;
using DungeonSelection;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LeaveDungeonHandler : MonoBehaviour
{
[SerializeField] private DungeonData dungeonData;
private void OnEnable()
{
EndGameController.LeaveDungeonClicked += LeaveDungeon;
EndGameController.SaveScoreClicked += SaveScore;
}
private void OnDisable()
{
EndGameController.LeaveDungeonClicked -= LeaveDungeon;
EndGameController.SaveScoreClicked -= SaveScore;
}
private void SaveScore(string name, int score)
{
Debug.Log($"{name} | {score}");
}
private void LeaveDungeon()
{
SceneManager.LoadScene(0);
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c900817c8cb721946b8efc4fbe6f7ef0

View file

@ -8,6 +8,7 @@ public class Player : MonoBehaviour
public event Action<int> DiamondCountUpdated; public event Action<int> DiamondCountUpdated;
public event Action<int> HealthUpdated; public event Action<int> HealthUpdated;
public event Action<int> DamageTaken; public event Action<int> DamageTaken;
public event Action Died;
[SerializeField] private int maxHealth; [SerializeField] private int maxHealth;
[SerializeField] private int diamonds; [SerializeField] private int diamonds;
@ -32,6 +33,16 @@ public class Player : MonoBehaviour
UpdateGUI(); UpdateGUI();
} }
public int GetDiamondCount()
{
return diamonds;
}
public int GetHealthScore()
{
return _healthBar[_healthIndex];
}
public void AddDiamonds(int count) public void AddDiamonds(int count)
{ {
diamonds += count; diamonds += count;
@ -44,6 +55,14 @@ public class Player : MonoBehaviour
{ {
_healthIndex += damage; _healthIndex += damage;
UpdateGUI(); UpdateGUI();
if (_healthIndex == _healthBar.Length - 1)
{
Died?.Invoke();
}
}
else
{
Died?.Invoke();
} }
DamageTaken?.Invoke(damage); DamageTaken?.Invoke(damage);
} }

View file

@ -1,7 +1,9 @@
using System;
using UnityEngine; using UnityEngine;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using TMPro; using TMPro;
using Unity.VisualScripting;
using UnityEngine.UIElements; using UnityEngine.UIElements;
using Toggle = UnityEngine.UI.Toggle; using Toggle = UnityEngine.UI.Toggle;
@ -10,7 +12,9 @@ public class MonsterRoom : Room
[SerializeField] private GameObject numberTextObject; [SerializeField] private GameObject numberTextObject;
[SerializeField] private GameObject healthTickObject; [SerializeField] private GameObject healthTickObject;
[SerializeField] private int _health; // Number of times the room needs to be unlocked before becoming explored. [SerializeField] private int _health; // Number of times the room needs to be unlocked before becoming explored.
public static event Action MonsterRoomExplored;
private GameObject[] _healthTicks; private GameObject[] _healthTicks;
protected override void InitializeRoom() { protected override void InitializeRoom() {
base.InitializeRoom(); base.InitializeRoom();
@ -53,10 +57,12 @@ public class MonsterRoom : Room
if (_health == 0) if (_health == 0)
{ {
_isExplored = true; _isExplored = true;
UnhighlightRoomAsOption(); UnhighlightRoomAsOption();
TriggerRoomRewards(); TriggerRoomRewards();
SetExploredGUI(); SetExploredGUI();
MonsterRoomExplored?.Invoke();
} }
} }

View file

@ -28,7 +28,6 @@ public class DungeonSelectMenuController : MonoBehaviour
_start = root.Q<Button>("Start"); _start = root.Q<Button>("Start");
_start.clicked += StartClicked; _start.clicked += StartClicked;
_dungeonName = root.Q<Label>("DungeonName"); _dungeonName = root.Q<Label>("DungeonName");
GameEvents.ShowingDungeon += ShowDungeon; GameEvents.ShowingDungeon += ShowDungeon;
GameEvents.ShowingFirstDugeon += () => SetPreviousButtonEnabled(false); GameEvents.ShowingFirstDugeon += () => SetPreviousButtonEnabled(false);

View file

@ -0,0 +1,83 @@
using System;
using DungeonSelection;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UIElements;
public class EndGameController : MonoBehaviour
{
public static event Action LeaveDungeonClicked;
public static event Action<string, int> SaveScoreClicked;
private const string WIN_MESSAGE = "You Won";
private const string DIE_MESSAGE = "You Died";
[SerializeField] private Sprite diamondSprite;
[SerializeField] private Sprite healthSprite;
private Label _title;
private Label _message;
private Label _diamondPoints;
private Label _pointsFromHealth;
private Label _scoreSum;
private VisualElement _diamondImageBox;
private VisualElement _healthImageBox;
private TextField _nameField;
private int _score;
private void OnEnable()
{
VisualElement root = GetComponent<UIDocument>().rootVisualElement;
Button save = root.Q<Button>("Save");
save.clicked += HandleSaveClicked;
Button close = root.Q<Button>("Close");
close.clicked += HandleCloseClicked;
_diamondPoints = root.Q<Label>("PointsFromDiamond");
_pointsFromHealth = root.Q<Label>("PointsFromHealth");
_scoreSum = root.Q<Label>("ScoreSum");
_diamondImageBox = root.Q<VisualElement>("DiamondImageBox");
_healthImageBox = root.Q<VisualElement>("HealthImageBox");
_title = root.Q<Label>("Title");
_message = root.Q<Label>("Message");
_nameField = root.Q<TextField>("NameField");
Image diamondImage = new Image();
diamondImage.image = diamondSprite.texture;
diamondImage.scaleMode = ScaleMode.ScaleToFit;
_diamondImageBox.Add(diamondImage);
Image healthImage = new Image();
healthImage.image = healthSprite.texture;
healthImage.scaleMode = ScaleMode.ScaleToFit;
_healthImageBox.Add(healthImage);
}
public void PopulateEndOfGamePopUp(EndOfGameEventArgs args)
{
if (args.Died)
{
_title.text = DIE_MESSAGE;
}
else
{
_title.text = WIN_MESSAGE;
}
_message.text = args.Message;
_diamondPoints.text = $"{args.Diamonds} X {args.DiamondsMultiplier}";
_pointsFromHealth.text = args.PointsFromHealth.ToString();
_score = args.FinalScore;
_scoreSum.text = _score.ToString();
}
private void HandleCloseClicked()
{
LeaveDungeonClicked?.Invoke();
}
private void HandleSaveClicked()
{
SaveScoreClicked?.Invoke(_nameField.value, _score);
LeaveDungeonClicked?.Invoke();
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ad2e64e6a9233f54a90f666bbbc029d8

View file

@ -12,6 +12,7 @@ namespace UI
[SerializeField] private GameObject canvas; [SerializeField] private GameObject canvas;
[FormerlySerializedAs("hud")] [SerializeField] private InGameHUDController hudController; [FormerlySerializedAs("hud")] [SerializeField] private InGameHUDController hudController;
[SerializeField] private GameObject chestPopUpControllerGO; [SerializeField] private GameObject chestPopUpControllerGO;
[SerializeField] private GameObject endOfGamePupUpGO;
[SerializeField] private ChestPopUpController chestPopUpController; [SerializeField] private ChestPopUpController chestPopUpController;
[SerializeField] private GameObject diceGO; [SerializeField] private GameObject diceGO;
[SerializeField] private DiceRoller diceRoller; [SerializeField] private DiceRoller diceRoller;
@ -45,6 +46,8 @@ namespace UI
RoomRewards.ChestRewarded += HandleChestRewarded; RoomRewards.ChestRewarded += HandleChestRewarded;
GameManager.EndOfGame += HandleEndOfGame;
chestPopUpController.BlackDieSelected += chestRewardSelection.HandleBlackDiceSelected; chestPopUpController.BlackDieSelected += chestRewardSelection.HandleBlackDiceSelected;
chestPopUpController.KeySelected += chestRewardSelection.HandleTorchSelected; chestPopUpController.KeySelected += chestRewardSelection.HandleTorchSelected;
chestPopUpController.ArmorAndDiamondSelected += chestRewardSelection.HandleDiamondAndLifeSelected; chestPopUpController.ArmorAndDiamondSelected += chestRewardSelection.HandleDiamondAndLifeSelected;
@ -136,5 +139,11 @@ namespace UI
{ {
chestPopUpControllerGO.SetActive(true); chestPopUpControllerGO.SetActive(true);
} }
private void HandleEndOfGame(object sender, EndOfGameEventArgs args)
{
endOfGamePupUpGO.SetActive(true);
endOfGamePupUpGO.GetComponent<EndGameController>().PopulateEndOfGamePopUp(args);
}
} }
} }

View file

@ -52,8 +52,8 @@ TextureImporter:
spriteMode: 1 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 9
spritePivot: {x: 0.5, y: 0.5} spritePivot: {x: 0, y: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
@ -137,7 +137,7 @@ TextureImporter:
width: 10 width: 10
height: 19 height: 19
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
customData: customData:
outline: [] outline: []
@ -159,7 +159,7 @@ TextureImporter:
width: 167 width: 167
height: 228 height: 228
alignment: 0 alignment: 0
pivot: {x: 0, y: 0} pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0} border: {x: 0, y: 0, z: 0, w: 0}
customData: customData:
outline: [] outline: []
@ -177,7 +177,7 @@ TextureImporter:
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: 5e97eb03825dee720800000000000000 spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 1537655665
vertices: [] vertices: []
indices: indices:
edges: [] edges: []

View file

@ -1,7 +1,7 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False"> <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" 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/UI/Styles/style1.uss?fileID=7433441132597879392&amp;guid=97546bb1d1d93d84e9b4ef0c8ae11a0e&amp;type=3#style1" />
<ui:VisualElement name="Base" style="flex-grow: 1; height: auto; flex-direction: row; align-items: stretch; justify-content: space-between;"> <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: 100%; height: 100%;" /> <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: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);" />
<ui:VisualElement style="flex-grow: 1;"> <ui:VisualElement style="flex-grow: 1;">

View file

@ -0,0 +1,34 @@
<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" />
<engine:VisualElement name="root" style="flex-grow: 1; align-items: center; background-color: rgba(0, 0, 0, 0.49);">
<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="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: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>
<engine:VisualElement name="Score" style="flex-grow: 1; justify-content: center; align-items: center;">
<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: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: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: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:VisualElement>
</engine:VisualElement>
</engine:VisualElement>
</engine:UXML>

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e1d19b3943ed8e44d8bc9777d6088c10
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View file

@ -42,7 +42,12 @@
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.border { .MenuHThree {
font-size: 25px;
}
.CloseButton {
background-color: rgba(0, 0, 0, 0);
border-top-width: 2px; border-top-width: 2px;
border-right-width: 2px; border-right-width: 2px;
border-bottom-width: 2px; border-bottom-width: 2px;
@ -51,10 +56,25 @@
border-top-right-radius: 7px; border-top-right-radius: 7px;
border-bottom-right-radius: 7px; border-bottom-right-radius: 7px;
border-bottom-left-radius: 7px; border-bottom-left-radius: 7px;
font-size: 22px;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
padding-top: 5px;
padding-right: 5px;
padding-bottom: 5px;
padding-left: 5px;
right: 5px;
top: 5px;
color: rgb(0, 0, 0);
width: 30px;
height: 30px;
border-left-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0);
border-right-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0);
border-top-color: rgb(0, 0, 0); border-top-color: rgb(0, 0, 0);
border-bottom-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0);
position: absolute;
} }
.button { .button {
@ -72,3 +92,27 @@
padding-left: 5px; padding-left: 5px;
font-size: 31px; font-size: 31px;
} }
.unity-base-text-field__input {
background-color: rgba(238, 15, 15, 0);
color: rgb(0, 0, 0);
border-top-width: 0;
border-right-width: 0;
border-bottom-width: 0;
border-left-width: 0;
}
.border {
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
border-bottom-right-radius: 7px;
border-bottom-left-radius: 7px;
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);
}

View file

@ -11,6 +11,12 @@ EditorBuildSettings:
- enabled: 1 - enabled: 1
path: Assets/Scenes/Dungeons/01_30x30_5_monster.unity path: Assets/Scenes/Dungeons/01_30x30_5_monster.unity
guid: 3a70533bacac8d843b6716c71b72367a guid: 3a70533bacac8d843b6716c71b72367a
- enabled: 1
path: Assets/Scenes/Dungeons/02_30x30_5_monster.unity
guid: a6c2871e0aa3bab4686a2032a3f9ddf2
- enabled: 1
path: Assets/Scenes/Dungeons/03_30x30_5_monster.unity
guid: 944e16592770e88409e2c529a8eb8719
m_configObjects: m_configObjects:
com.unity.adaptiveperformance.simulator.provider_settings: {fileID: 11400000, guid: 637a70289c0f8ea44905373a80508625, type: 2} com.unity.adaptiveperformance.simulator.provider_settings: {fileID: 11400000, guid: 637a70289c0f8ea44905373a80508625, type: 2}
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}