Cards and level spawning balance testing, Fixed some error logs

This commit is contained in:
craftwill 2024-06-23 10:15:52 -04:00
parent fce8ea5e3d
commit 069c7eda00
15 changed files with 36 additions and 18 deletions

View File

@ -248,7 +248,7 @@ MonoBehaviour:
_renderLayer: Default
_position: {x: 0, y: 0}
_scale: {x: 1, y: 1}
_waveConfig: {fileID: 11400000, guid: 61b21509b3e4be0438ea87b4e7a73e17, type: 2}
_waveConfig: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2}
_startPopulation: 10
_startFood: 40
_startWood: 0

View File

@ -16,8 +16,16 @@ MonoBehaviour:
- _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3}
_count: 20
_nestedGroupSpawn:
- groupSpawn:
- _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
_count: 2
triggerTime: 0.25
- groupSpawn:
- _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3}
_count: 2
triggerTime: 2
_gameDuration: 3
triggerTime: 0.5
- groupSpawn:
- _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
_count: 2
triggerTime: 0.75
_gameDuration: 1

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 30
_rock: 0
_food: 20
_cooldownInSeconds: 3
_cooldownInSeconds: 5

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 0
_rock: 350
_food: 0
_cooldownInSeconds: 3
_cooldownInSeconds: 30

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 40
_rock: 0
_food: 0
_cooldownInSeconds: 3
_cooldownInSeconds: 1

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 0
_rock: 0
_food: 10
_cooldownInSeconds: 3
_cooldownInSeconds: 1

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 0
_rock: 0
_food: 10
_cooldownInSeconds: 3
_cooldownInSeconds: 4

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 50
_rock: 0
_food: 0
_cooldownInSeconds: 3
_cooldownInSeconds: 1

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 0
_rock: 0
_food: 60
_cooldownInSeconds: 3
_cooldownInSeconds: 10

View File

@ -15,4 +15,4 @@ MonoBehaviour:
_wood: 120
_rock: 0
_food: 0
_cooldownInSeconds: 3
_cooldownInSeconds: 60

View File

@ -20,7 +20,7 @@ public class WaveObserver : Singleton<WaveObserver>
public void Init(WaveConfig config)
{
_levelConfig = Object.Instantiate(config);
_levelConfig = config;
_copyConstantSpawn = new List<int>();
_copyGroupSpawn = new List<List<int>>();
_groupSpawnTimers = new List<float>();

View File

@ -164,6 +164,8 @@ public class LevelManager : Singleton<LevelManager>
ClearLevel();
Debug.Log("Load level: " + _currentLevel.name + " using " + _currentLevel.WaveConfig.name);
_currentLevel = level;
_waveObserver = WaveObserver.Instance;
_waveObserver.Init(_currentLevel.WaveConfig);

View File

@ -23,7 +23,7 @@ public class ClickBehavior : MonoBehaviour
}
}
#if UNITY_EDITOR
/*#if UNITY_EDITOR
if (Input.GetMouseButtonUp(0))
{
const float clickRangeForSpawn = 0.7f;
@ -36,7 +36,7 @@ public class ClickBehavior : MonoBehaviour
closest.TriggerSpawnDebug();
}
}
#endif
#endif*/
}
/// <summary>

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Linq;
public class WorldMapSave
{
@ -20,9 +21,10 @@ public class WorldMapSave
public void WorldInitialition()
{
filePath = Application.persistentDataPath + "/data.dat";
Debug.Log("Filepath world save: " + Application.persistentDataPath + " + \"/data.dat\"");
if (File.Exists(filePath))
{
ReadData();
@ -60,7 +62,7 @@ public class WorldMapSave
}
// If LevelState.SAVED not find
return -1;
return 0;
}
public void UnlockNextLevel()
@ -69,6 +71,13 @@ public class WorldMapSave
ReadData();
//int actuelLevel = PlayerPrefs.GetInt(LevelToLoad,NoLevel);
//Debug.Log(actuelLevel);
if (levelUnlocked.Length <= 0)
{
Debug.LogError("Why is LevelUnlocked list empty?");
return;
}
levelUnlocked[GetSavedLevelIndex() + 1] = LevelState.SAVED;
levelUnlocked[GetSavedLevelIndex()] = LevelState.UNLOCKED;
WriteData();

View File

@ -135,8 +135,7 @@ PlayerSettings:
16:9: 1
Others: 1
bundleVersion: 1.0
preloadedAssets:
- {fileID: 11400000, guid: 2670dfbb5772b0248b8c8ccaa6470d9a, type: 2}
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1