Created some starting rooms and started working on the room, gamemanager, turnmanager, roommanager classes.
This commit is contained in:
parent
9d0ada54e0
commit
cb7aff20dd
101 changed files with 63867 additions and 0 deletions
36
PuzzleGameProject/Assets/Scripts/Room.cs
Normal file
36
PuzzleGameProject/Assets/Scripts/Room.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue