21 lines
		
	
	
		
			589 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			589 B
		
	
	
	
		
			C#
		
	
	
	
| 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;
 | |
| 
 | |
|         string tUnitID = Utils.GetUnitID(pUnit.BType, pUnit.Level, false);
 | |
|         DataUnit tData = TableUnit.Instance.GetData(tUnitID);
 | |
| 
 | |
|         float tRatio = PlayerData.Instance.CurrentLevel <= 3 ? 0.8f : 1;
 | |
|         
 | |
|         pUnit.Init(tData, tRatio);
 | |
| 
 | |
|         AddSoldier(pUnit);
 | |
|     }
 | |
| } |