Merge remote-tracking branch 'origin/master'

This commit is contained in:
KrolMel 2023-01-06 21:56:56 +01:00
commit 6f557f1b96
4 changed files with 25 additions and 5 deletions

View File

@ -208,6 +208,7 @@
<Compile Include="Assets\Scripts\REFACTORING\Application\Dialogue\Panel\IPanel.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Dialogue\Panel\IPanel.cs" />
<Compile Include="Assets\Scripts\SaveSystem.cs" /> <Compile Include="Assets\Scripts\SaveSystem.cs" />
<Compile Include="Assets\Scripts\AnimatedDoorBehaviour.cs" /> <Compile Include="Assets\Scripts\AnimatedDoorBehaviour.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Enemy\EnemyDrop.cs" />
<Compile Include="Assets\Scripts\Door\TriggerDoor.cs" /> <Compile Include="Assets\Scripts\Door\TriggerDoor.cs" />
<Compile Include="Assets\Scripts\ProceduralGeneration\GraphNode.cs" /> <Compile Include="Assets\Scripts\ProceduralGeneration\GraphNode.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\AccountBalance\PanelCashController.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\AccountBalance\PanelCashController.cs" />

View File

@ -30,7 +30,7 @@ public class NewGame : MonoBehaviour
int isQuest = 1; int isQuest = 1;
PlayerPrefs.SetInt("lumberjack", isQuest); PlayerPrefs.SetInt("lumberjack", isQuest);
/* /*
int isKilled = 0; int isKilled = 0;
PlayerPrefs.SetInt("bat0", isKilled); PlayerPrefs.SetInt("bat0", isKilled);
@ -43,7 +43,7 @@ public class NewGame : MonoBehaviour
float health = 10.0f; float health = 10.0f;
PlayerPrefs.SetFloat("maxHealth", 10); PlayerPrefs.SetFloat("maxHealth", 10);
PlayerPrefs.SetFloat("health", 10); PlayerPrefs.SetFloat("health", 10);
PlayerPrefs.SetInt("HasEverPlayed",1);
//PlayerPrefs.SetInt("continued", 0); //PlayerPrefs.SetInt("continued", 0);
PlayerPrefs.SetInt("rock", 0); // Is it used anywhere? I have not found it PlayerPrefs.SetInt("rock", 0); // Is it used anywhere? I have not found it

View File

@ -535,7 +535,7 @@ MonoBehaviour:
nameOfPlayer: nameOfPlayer:
saveName: saveName:
inputText: {fileID: 637316601} inputText: {fileID: 637316601}
loadedName: {fileID: 0} loadedName:
--- !u!4 &525115091 --- !u!4 &525115091
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2731,7 +2731,7 @@ MonoBehaviour:
m_LineType: 0 m_LineType: 0
m_HideMobileInput: 0 m_HideMobileInput: 0
m_CharacterValidation: 0 m_CharacterValidation: 0
m_CharacterLimit: 0 m_CharacterLimit: 15
m_OnEndEdit: m_OnEndEdit:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []

View File

@ -15,6 +15,7 @@ public class TileMapGenerator : MonoBehaviour
public Tilemap ground, walls; public Tilemap ground, walls;
public Tile ground1, wall1, corner_left_up, corner_left_down, corner_right_down, corner_right_up, left, right, up, down; public Tile ground1, wall1, corner_left_up, corner_left_down, corner_right_down, corner_right_up, left, right, up, down;
public Graph graph; public Graph graph;
public List<Vector3> availablePos;
private void Start() private void Start()
{ {
@ -83,6 +84,7 @@ public class TileMapGenerator : MonoBehaviour
{ {
ground.SetTile(new Vector3Int(pos.x,pos.y,0), ground1); ground.SetTile(new Vector3Int(pos.x,pos.y,0), ground1);
startPosOfPlayer = new Vector3Int(pos.x, pos.y, 0); startPosOfPlayer = new Vector3Int(pos.x, pos.y, 0);
availablePos.Add(startPosOfPlayer);
} }
else if (id == 2) else if (id == 2)
{ {
@ -110,11 +112,28 @@ public class TileMapGenerator : MonoBehaviour
GameObject Player = GameObject.FindWithTag("Player"); GameObject Player = GameObject.FindWithTag("Player");
Player.transform.position = startPosOfPlayer; Player.transform.position = startPosOfPlayer;
randomCoordsForStanding();
return true; return true;
} }
public Vector3 randomCoordsForStanding()
{
Tile test = new Tile();
while (true)
{
int bound = availablePos.Count;
int randomVal;
randomVal = Random.Range(0, bound);
Debug.Log(availablePos[randomVal]);
return availablePos[randomVal];
}
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {