init new repos

This commit is contained in:
sShemet
2025-10-19 19:04:50 +05:00
commit 3d8e1e80cd
868 changed files with 103076 additions and 0 deletions

43
Assets/Code/GameState.cs Normal file
View File

@@ -0,0 +1,43 @@
using System.Collections.Generic;
using UnityEngine;
public class GameState : MonoBehaviour
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public string PlayerName { get; set; }
public int Health { get; set; }
public int Magic { get; set; }
public int Level { get; set; }
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public bool IsPlayerControlLocked { get; set; }
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
private Dictionary<int, int> _storyVariables = new Dictionary<int, int>();
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public List<int> Skills { get; set; } = new List<int>();
public Dictionary<int, int> Inventory { get; set; } = new Dictionary<int, int>();
public void SetGlobalVariable(int address, int value)
{
_storyVariables[address] = value;
Debug.Log($"Set global variable 0x{address:X8} = {value}");
}
public int GetGlobalVariable(int address)
{
return _storyVariables.TryGetValue(address, out int value) ? value : 0;
}
public void Reset()
{
_storyVariables.Clear();
Skills.Clear();
Inventory.Clear();
Health = 100;
Magic = 50;
Level = 1;
IsPlayerControlLocked = true;
}
}