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.
		
		
		
		
		
			
		
			
	
	
		
			57 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C#
		
	
		
		
			
		
	
	
			57 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C#
		
	
| 
											2 years ago
										 | using System.Collections.Generic; | ||
|  | using UnityEngine; | ||
|  | 
 | ||
|  | namespace Game | ||
|  | { | ||
|  |     public static class GameSetting | ||
|  |     { | ||
|  |         public static Dictionary<EFunctionKey, KeyCode> KeyMap; | ||
|  |         public static bool IsDebugDraw = true; | ||
|  |         public static bool IsMasterControllable = true; | ||
|  |         public static bool IsShowExtraHeadBar = false; | ||
|  |         public static void Load() | ||
|  |         { | ||
|  |             KeyMap = new Dictionary<EFunctionKey, KeyCode>(){ | ||
|  |                 {EFunctionKey.LightAttack,KeyCode.J}, | ||
|  |                 {EFunctionKey.HeavyAttack,KeyCode.K}, | ||
|  |                 {EFunctionKey.Lock,KeyCode.L}, | ||
|  |                 {EFunctionKey.Interact,KeyCode.U}, | ||
|  |                 {EFunctionKey.Flash,KeyCode.LeftShift}, | ||
|  |                 {EFunctionKey.Down,KeyCode.S}, | ||
|  |                 {EFunctionKey.Up,KeyCode.W}, | ||
|  |                 {EFunctionKey.Left,KeyCode.A}, | ||
|  |                 {EFunctionKey.Right,KeyCode.D}, | ||
|  |                 {EFunctionKey.RightDown,KeyCode.DownArrow}, | ||
|  |                 {EFunctionKey.RightUp,KeyCode.UpArrow}, | ||
|  |                 {EFunctionKey.RightLeft,KeyCode.LeftArrow}, | ||
|  |                 {EFunctionKey.RightRight,KeyCode.RightArrow}, | ||
|  |                 {EFunctionKey.Jump,KeyCode.Space}, | ||
|  |                 {EFunctionKey.Menu,KeyCode.Escape}, | ||
|  |                 {EFunctionKey.Enter,KeyCode.Return}, | ||
|  |                 {EFunctionKey.Map,KeyCode.M}, | ||
|  |                 {EFunctionKey.Bag,KeyCode.B}, | ||
|  |                 {EFunctionKey.Refresh,KeyCode.R}, | ||
|  |                 {EFunctionKey.Weapon0,KeyCode.Alpha1}, | ||
|  |                 {EFunctionKey.Weapon1,KeyCode.Alpha2}, | ||
|  |                 {EFunctionKey.Weapon2,KeyCode.Alpha3}, | ||
|  |                 {EFunctionKey.Weapon3,KeyCode.Alpha4}, | ||
|  |                 {EFunctionKey.WeaponPre,KeyCode.Q}, | ||
|  |                 {EFunctionKey.WeaponNext,KeyCode.E}, | ||
|  |                 {EFunctionKey.Test1,KeyCode.P}, | ||
|  |             }; | ||
|  |         } | ||
|  | 
 | ||
|  |     } | ||
|  |     public abstract partial class Util | ||
|  |     { | ||
|  |         public static void SetControl(bool isControllable) | ||
|  |         { | ||
|  |             GameSetting.IsMasterControllable = isControllable; | ||
|  |         } | ||
|  |         public static bool IsControl() | ||
|  |         { | ||
|  |             return GameSetting.IsMasterControllable; | ||
|  |         } | ||
|  | 
 | ||
|  |     } | ||
|  | } |