示例#1
0
        public static PadUsedType GetOtherSide(PadUsedType side)
        {
            switch (side)
            {
            case PadUsedType.DUAL_LEFT:
                return(PadUsedType.DUAL_RIGHT);

            case PadUsedType.DUAL_RIGHT:
                return(PadUsedType.DUAL_LEFT);

            default: return(PadUsedType.SINGLE);
            }
        }
示例#2
0
    private void CreatePlayer(int padIndex, PadUsedType type)
    {
        _activeIndex.Add(padIndex);

        var playerInput = new PlayerInput(padIndex, type);

        _playersByPadIndex.Add(PlayerInputUtils.NameByIndexAndPadUsedType(padIndex, type), playerInput);
        OnNewPlayer.SafeInvoke(playerInput);

        if (_mainPlayerInput == null)
        {
            _mainPlayerInput = playerInput;
        }
    }
示例#3
0
 public static string NameByIndexAndPadUsedType(int index, PadUsedType padUsedType)
 {
     return(index + "_" + padUsedType);
 }
示例#4
0
 private void ChangePadUsedTypeForPlayerInput(PlayerInput pInput, PadUsedType to)
 {
     _playersByPadIndex.Remove(pInput.Name);
     pInput.PadUsedType = to;
     _playersByPadIndex.Add(pInput.Name, pInput);
 }
示例#5
0
 public PlayerInput(int inputIndex, PadUsedType type)
 {
     _inputIndex  = inputIndex;
     _padUsedType = type;
 }