2022-05-23 13:39:59 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
public class EnemyManager : GroupManager
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void AddSoldier(SoldierUnit pUnit, GroupManager pAgainstGroup)
|
|
|
|
|
|
{
|
|
|
|
|
|
pUnit.Group = GroupType.Enemy;
|
|
|
|
|
|
pUnit.AgainstGroup = pAgainstGroup;
|
|
|
|
|
|
|
2022-09-09 14:35:49 +00:00
|
|
|
|
string tUnitID = Utils.GetUnitID(pUnit.BType, pUnit.Level, false);
|
|
|
|
|
|
DataUnit tData = TableUnit.Instance.GetData(tUnitID);
|
2022-05-23 13:39:59 +00:00
|
|
|
|
|
2022-09-09 14:35:49 +00:00
|
|
|
|
float tRatio = PlayerData.Instance.CurrentLevel <= 3 ? 0.8f : 1;
|
|
|
|
|
|
|
|
|
|
|
|
pUnit.Init(tData, tRatio);
|
2022-05-23 13:39:59 +00:00
|
|
|
|
|
|
|
|
|
|
AddSoldier(pUnit);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|