24 lines
		
	
	
		
			630 B
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			630 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.8f * tAttr.MaxHP); | |||
|  |             tAttr.Damage = (int)(0.8f * tAttr.Damage); | |||
|  |         } | |||
|  | 
 | |||
|  |         pUnit.InitAttr(tAttr); | |||
|  | 
 | |||
|  |         AddSoldier(pUnit); | |||
|  |     } | |||
|  | } |