public void InitAnimMaxSize <TDir>(int Length, TDir eDirection) { _eDirection = (Enum)Enum.ToObject(eDirection.GetType(), eDirection); for (int n = 0; n < Length; ++n) { EnumArray <AnimationInfo> enumArray = new EnumArray <AnimationInfo>(); enumArray.Allocate(eDirection); _animationInfos.Add(enumArray); } }
void Awake() { _keyInput = new EnumArray <EnumArray <KeyCode> >(); _keyInput.Allocate(InputAction.MAX); for (int i = 0; i < (int)InputAction.MAX; ++i) { _keyInput[i] = new EnumArray <KeyCode>(); _keyInput[i].Allocate(InputDirection.MAX); } RegisterInputKey(InputAction.PLAYER_ATTACK, InputDirection.ALL, KeyCode.Mouse0); RegisterInputKey(InputAction.PLAYER_BLOCK, InputDirection.ALL, KeyCode.Space); }