maint: added livewatch asset
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Ingvar.LiveWatch.TowerDefenceDemo
|
||||
{
|
||||
public class EconomyConfig : ScriptableObject
|
||||
{
|
||||
public Dictionary<MobType, int> MobKillRewards
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_mobRewardsDict != null)
|
||||
return _mobRewardsDict;
|
||||
|
||||
_mobRewardsDict = new Dictionary<MobType, int>();
|
||||
foreach (var mobKillReward in _mobKillRewards)
|
||||
{
|
||||
_mobRewardsDict.Add(mobKillReward.Type, mobKillReward.GoldReward);
|
||||
}
|
||||
|
||||
return _mobRewardsDict;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<TowerType, int> TowerBuildCosts
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_towerCostsDict != null)
|
||||
return _towerCostsDict;
|
||||
|
||||
_towerCostsDict = new Dictionary<TowerType, int>();
|
||||
foreach (var towerBuildCost in _towerCosts)
|
||||
{
|
||||
_towerCostsDict.Add(towerBuildCost.Type, towerBuildCost.GoldCost);
|
||||
}
|
||||
|
||||
return _towerCostsDict;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<TowerType, int> TowerSellPrices
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_towerSellPricesDict != null)
|
||||
return _towerSellPricesDict;
|
||||
|
||||
_towerSellPricesDict = new Dictionary<TowerType, int>();
|
||||
foreach (var towerBuildCost in _towerCosts)
|
||||
{
|
||||
_towerSellPricesDict.Add(towerBuildCost.Type, towerBuildCost.GoldSellPrice);
|
||||
}
|
||||
|
||||
return _towerSellPricesDict;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] private MobRewardSetup[] _mobKillRewards;
|
||||
[SerializeField] private TowerCostSetup[] _towerCosts;
|
||||
|
||||
private Dictionary<MobType, int> _mobRewardsDict;
|
||||
private Dictionary<TowerType, int> _towerCostsDict;
|
||||
private Dictionary<TowerType, int> _towerSellPricesDict;
|
||||
|
||||
[Serializable]
|
||||
private class MobRewardSetup
|
||||
{
|
||||
public MobType Type;
|
||||
public int GoldReward;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
private class TowerCostSetup
|
||||
{
|
||||
public TowerType Type;
|
||||
public int GoldCost;
|
||||
public int GoldSellPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 555126785c4f49a58db7735195a9ca5c
|
||||
timeCreated: 1726052861
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 324001
|
||||
packageName: LiveWatch Lite | Debug with full history of changes
|
||||
packageVersion: 1.0.1
|
||||
assetPath: Assets/LiveWatchLite/TowerDefenceDemo/Scripts/Configs/EconomyConfig.cs
|
||||
uploadId: 770587
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ingvar.LiveWatch.TowerDefenceDemo
|
||||
{
|
||||
public class LevelConfig : ScriptableObject
|
||||
{
|
||||
public int MaxHealth = 20;
|
||||
public int StartGold = 100;
|
||||
public List<MobWave> Waves = new();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MobWave
|
||||
{
|
||||
public List<MobSpawn> Spawns = new();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class MobSpawn
|
||||
{
|
||||
public float Delay;
|
||||
public int MobCount;
|
||||
public MobMain MobPrefab;
|
||||
public float SpawnDelayBetween = 0.1f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5acaf173387b48bba941b9b4d523a82e
|
||||
timeCreated: 1725791173
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 324001
|
||||
packageName: LiveWatch Lite | Debug with full history of changes
|
||||
packageVersion: 1.0.1
|
||||
assetPath: Assets/LiveWatchLite/TowerDefenceDemo/Scripts/Configs/LevelConfig.cs
|
||||
uploadId: 770587
|
||||
Reference in New Issue
Block a user