Keybinding saving improvement

This commit is contained in:
Jakub Sztuba 2023-01-07 12:02:47 +01:00
parent ec1368d90a
commit a6c2841226
3 changed files with 26 additions and 4 deletions

View File

@ -133,6 +133,7 @@
<Compile Include="Assets\NewGame.cs" /> <Compile Include="Assets\NewGame.cs" />
<Compile Include="Assets\Scripts\SceneManager\SaveDynamicObjects.cs" /> <Compile Include="Assets\Scripts\SceneManager\SaveDynamicObjects.cs" />
<Compile Include="Assets\Scripts\Knockback.cs" /> <Compile Include="Assets\Scripts\Knockback.cs" />
<Compile Include="Assets\ContinueButton.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Panel\Chest\SaveChestManager.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Panel\Chest\SaveChestManager.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Panel\SceneBaseDataManager.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Panel\SceneBaseDataManager.cs" />
<Compile Include="Assets\Scripts\DialogueNpcTest.cs" /> <Compile Include="Assets\Scripts\DialogueNpcTest.cs" />
@ -270,6 +271,7 @@
<Compile Include="Assets\Scripts\Pathfinding\Pathfinding.cs" /> <Compile Include="Assets\Scripts\Pathfinding\Pathfinding.cs" />
<Compile Include="Assets\Scripts\Item\PickableController.cs" /> <Compile Include="Assets\Scripts\Item\PickableController.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Chest\SceneChestBuilder.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Chest\SceneChestBuilder.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Story\WizardHouse\WizardFirstQuestManager.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Buildable\SceneObjectBuilder.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Shared\Manager\Buildable\SceneObjectBuilder.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\Mission\Save\SaveMissionManager.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Mission\Save\SaveMissionManager.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Models\Mission\Condition\CollectMissionConditionData.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Models\Mission\Condition\CollectMissionConditionData.cs" />
@ -323,8 +325,6 @@
<Compile Include="Assets\Scripts\REFACTORING\Application\Dialogue\MissionDialogue.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\Dialogue\MissionDialogue.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Application\UI\Panel\TaskPanelController.cs" /> <Compile Include="Assets\Scripts\REFACTORING\Application\UI\Panel\TaskPanelController.cs" />
<Compile Include="Assets\Scripts\Player.cs" /> <Compile Include="Assets\Scripts\Player.cs" />
<Compile Include="Assets\ContinueButton.cs" />
<Compile Include="Assets\Scripts\REFACTORING\Story\WizardHouse\WizardFirstQuestManager.cs" />
<None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" /> <None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" />
<None Include="Assets\HardLight2D\ReadMe - FAQ.txt" /> <None Include="Assets\HardLight2D\ReadMe - FAQ.txt" />
<None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" /> <None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" />

View File

@ -60,7 +60,29 @@ public class NewGame : MonoBehaviour
PlayerPrefs.SetInt(SkillsPointsManger.PLAYER_SKILS_INTELIGENCE_POINTS, 0); // IntelligencePoints PlayerPrefs.SetInt(SkillsPointsManger.PLAYER_SKILS_INTELIGENCE_POINTS, 0); // IntelligencePoints
// -------------------------------------------------------------------- // --------------------------------------------------------------------
//DEFAULT CONTROLS
if (!PlayerPrefs.HasKey("Interact"))
{
PlayerPrefs.SetString("Interact","E");
}
if (!PlayerPrefs.HasKey("Attack"))
{
PlayerPrefs.SetString("Attack","Space");
}
if (!PlayerPrefs.HasKey("Skills"))
{
PlayerPrefs.SetString("Skills","U");
}
if (!PlayerPrefs.HasKey("Inventory"))
{
PlayerPrefs.SetString("Inventory","I");
}
if (!PlayerPrefs.HasKey("Settings"))
{
PlayerPrefs.SetString("Settings","Escape");
}
// --------------------------------------------------------------------
//LETTER -------------------------------------------------------------- //LETTER --------------------------------------------------------------
PlayerPrefs.SetInt("PrologueLetter.WhereDisplayed", 0); PlayerPrefs.SetInt("PrologueLetter.WhereDisplayed", 0);
PlayerPrefs.SetInt("ControlLetter.WhereDisplayed", 0); PlayerPrefs.SetInt("ControlLetter.WhereDisplayed", 0);

View File

@ -37,7 +37,7 @@ public class KeyBindScript : MonoBehaviour
keys.Add("Settings",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Settings","Escape"))); keys.Add("Settings",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Settings","Escape")));
keys.Add("Inventory",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Inventory","I"))); keys.Add("Inventory",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Inventory","I")));
keys.Add("Skills",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Skills","U"))); keys.Add("Skills",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Skills","U")));
keys.Add("Attack",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Attack","S6pace"))); keys.Add("Attack",(KeyCode)System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("Attack","Space")));
//Sets the text on the buttons //Sets the text on the buttons
//interaction.text = keys["Interact"].ToString(); //interaction.text = keys["Interact"].ToString();