Created some starting rooms and started working on the room, gamemanager, turnmanager, roommanager classes.

This commit is contained in:
Max 2025-01-17 16:57:56 +01:00
parent 9d0ada54e0
commit cb7aff20dd
101 changed files with 63867 additions and 0 deletions

View file

@ -0,0 +1,19 @@
using UnityEngine;
public class GameManager : MonoBehaviour
{
public TurnManager turnManager;
public RoomManager roomManager;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
roomManager.InnitializeRooms();
}
// Update is called once per frame
void Update()
{
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 85fe57d438ef1ec4fa8b36b9c17c11a4

View file

@ -0,0 +1,36 @@
using TMPro;
using UnityEngine;
using System.Collections.Generic;
public class Room : MonoBehaviour
{
public int number;
public GameObject numberTextObject;
public List<GameObject> adjacentRooms;
public bool isEntrance;
private bool isExplored = false;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
if (isEntrance)
{
SetPropertiesOfEntrance();
}
TextMeshProUGUI numberText = numberTextObject.GetComponent<TextMeshProUGUI>();
numberText.SetText(number.ToString());
}
// Update is called once per frame
void Update()
{
}
private void SetPropertiesOfEntrance()
{
this.gameObject.GetComponent<SpriteRenderer>().color = Color.green;
this.isEntrance = true;
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 129987f6d2a5e97458682506ddec4576

View file

@ -0,0 +1,29 @@
using UnityEngine;
using System.Collections.Generic;
public class RoomManager : MonoBehaviour
{
public GameObject rooms;
private List<GameObject> _entranceRooms = new List<GameObject>();
public void InnitializeRooms()
{
AddEntranceRoomsToList(rooms);
}
private void AddEntranceRoomsToList(GameObject rooms)
{
foreach (Transform roomTransform in rooms.transform)
{
if (roomTransform.gameObject.GetComponent<Room>().isEntrance)
{
_entranceRooms.Add(roomTransform.gameObject);
}
}
}
public List<GameObject> GetEntranceRooms()
{
return _entranceRooms;
}
}

View file

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

View file

@ -0,0 +1,24 @@
using UnityEngine;
public class TurnManager : MonoBehaviour
{
public RoomManager roomManager;
private int _turn = 0;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void takeTurn()
{
}
}

View file

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6d900f1b1caebac429626fd7fe820582