24 lines
		
	
	
		
			632 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			632 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;
 | |
| 
 | |
|         WarUnitAttr tAttr = Utils.GetWarUnitAttrFromCard(pUnit.BType, pUnit.Level);
 | |
| 
 | |
|         if (PlayerData.Instance.CurrentLevel <= 3)
 | |
|         {
 | |
|             tAttr.MaxHP = (int)(0.75f * tAttr.MaxHP);
 | |
|             tAttr.Damage = (int)(0.75f * tAttr.Damage);
 | |
|         }
 | |
| 
 | |
|         pUnit.InitAttr(tAttr);
 | |
| 
 | |
|         AddSoldier(pUnit);
 | |
|     }
 | |
| } |