You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
using BigFloatNumerics;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "TrainDgProp", menuName = "ScriptableObject/GameMod/TrainDgProp")]
|
|
public class TrainDgProp : GameModProperty
|
|
{
|
|
[Serializable]
|
|
public struct EnemyCreator
|
|
{
|
|
[Serializable]
|
|
struct StatProperty
|
|
{
|
|
public float baseV;
|
|
public float multiplierPerLevel;
|
|
public float adderPerLevel;
|
|
}
|
|
|
|
public CharacterProperty property;
|
|
public uint countPerWave;
|
|
|
|
[SerializeField] StatProperty hpStat;
|
|
[SerializeField] StatProperty atkStat;
|
|
|
|
public BigFloat GetHp(uint level)
|
|
{
|
|
return Formula.Calculate(hpStat.baseV, hpStat.multiplierPerLevel, hpStat.adderPerLevel, level);
|
|
}
|
|
|
|
public BigFloat GetAtk(uint level)
|
|
{
|
|
return Formula.Calculate(atkStat.baseV, atkStat.multiplierPerLevel, atkStat.adderPerLevel, level);
|
|
}
|
|
}
|
|
|
|
public static string CodeName => "TrainDg";
|
|
public override string codeName => CodeName;
|
|
public string bgmPath;
|
|
public string backGroundPath;
|
|
|
|
public uint openStage = 1;
|
|
|
|
public uint waveCount = 1;
|
|
|
|
public EnemyCreator[] normalEnemyCreator;
|
|
|
|
public float limitTime = 1;
|
|
|
|
public override GameModData CreateData(GameModPlayProperty playProperty)
|
|
{
|
|
Debug.Assert(playProperty is TrainDgPlayProp, "Invalid play property type.");
|
|
return new TrainDgData(this, playProperty as TrainDgPlayProp);
|
|
}
|
|
}
|