39 lines
		
	
	
		
			827 B
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			39 lines
		
	
	
		
			827 B
		
	
	
	
		
			Plaintext
		
	
	
	
|  | /* | ||
|  | 文件名:InputClass.nut | ||
|  | 路径:Core/InputClass/InputClass.nut | ||
|  | 创建日期:2024-12-21	07:27 | ||
|  | 文件用途:输入类 | ||
|  | */ | ||
|  | 
 | ||
|  | //输入逻辑函数Map | ||
|  | _Game_Input_Func_ <- {}; | ||
|  | 
 | ||
|  | class _Input_ { | ||
|  |     constructor() { | ||
|  |         _Game_Input_Func_.rawset("SystemInput", SystemInput.bindenv(this)); | ||
|  |         // _Game_Logic_Func_.rawset("SystemInput", Proc.bindenv(this)); | ||
|  |         getroottable().Input <- this; | ||
|  |     } | ||
|  | 
 | ||
|  |     //系统对游戏的输入 | ||
|  |     function SystemInput(Code, Type) { | ||
|  | 
 | ||
|  |     } | ||
|  | 
 | ||
|  |     //Proc逻辑 | ||
|  |     function Proc(Dt, GameLister) { | ||
|  | 
 | ||
|  |     } | ||
|  | } | ||
|  | 
 | ||
|  | 
 | ||
|  | //输入逻辑入口 | ||
|  | function _Yosin_Game_Input_Logic_(Code, Type) { | ||
|  |     foreach(Key, Func in _Game_Input_Func_) { | ||
|  |         local Ret = Func(Code, Type); | ||
|  |         //主体对象释放 删除自己 | ||
|  |         if (Ret == -1) { | ||
|  |             _Game_Input_Func_.rawdelete(Key); | ||
|  |         } | ||
|  |     } | ||
|  | } |