You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
		
		
			
		
	
	
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
| 
											2 years ago
										 | using Bolt; | ||
|  | 
 | ||
|  | namespace Game | ||
|  | { | ||
|  |     [UnitTitle("创建Buff")] | ||
|  |     [UnitSubtitle("NodeAddBuff")] | ||
|  |     [UnitCategory("Game-Buff")] | ||
|  |     public class NodeAddBuff : NodeDefault | ||
|  |     { | ||
|  |         public ValueInput entity; | ||
|  |         public ValueInput owner; | ||
|  |         public ValueInput buffId; | ||
|  |         public ValueInput timeS; | ||
|  |         public ValueInput isCover; | ||
|  |         protected override void Def() | ||
|  |         { | ||
|  |             entity = ValueInput<int>("entity"); | ||
|  |             owner = ValueInput<int>("owner"); | ||
|  |             buffId = ValueInput<string>("buffId"); | ||
|  |             timeS = ValueInput<float>("timeS"); | ||
|  |             isCover = ValueInput<bool>("isCover"); | ||
|  |         } | ||
|  |         protected override void Run(Flow flow) | ||
|  |         { | ||
|  |             var e = flow.GetValue<int>(entity); | ||
|  |             var o = flow.GetValue<int>(owner); | ||
|  |             var b = flow.GetValue<string>(buffId); | ||
|  |             var t = flow.GetValue<float>(timeS); | ||
|  |             var c = flow.GetValue<bool>(isCover); | ||
|  |             Util.AddBuff(e, o, b, t); | ||
|  |         } | ||
|  |     } | ||
|  |     [UnitTitle("硬直计数")] | ||
|  |     [UnitSubtitle("NodeEntityStun")] | ||
|  |     [UnitCategory("Game-Buff")] | ||
|  |     public class NodeEntityStun : NodeDefault | ||
|  |     { | ||
|  |         public ValueInput entity; | ||
|  |         public ValueInput count; | ||
|  |         protected override void Def() | ||
|  |         { | ||
|  |             entity = ValueInput<int>("entity"); | ||
|  |             count = ValueInput<int>("count"); | ||
|  |         } | ||
|  |         protected override void Run(Flow flow) | ||
|  |         { | ||
|  |             var e = flow.GetValue<int>(entity); | ||
|  |             var c = flow.GetValue<int>(count); | ||
|  |             Util.AddStunCount(e, c); | ||
|  |         } | ||
|  |     } | ||
|  | } |