Ejemplo n.º 1
0
        private void AddNewXYFields(int index)
        {
            TableLayoutPanel[] tableColl = new TableLayoutPanel[2] {
                this.InputTableLayout, this.OutputTableLayout
            };
            string type = "Input";

            foreach (TableLayoutPanel table in tableColl)
            {
                Label   label    = new DefaultLabel(type + index, index + ":");
                TextBox xTextBox = new DefaultInput("X" + type + index, this.ImaginaryMessage);
                //xTextBox.Text = xTextBox.Name;
                TextBox yTextBox = new DefaultInput("Y" + type + index, this.ImaginaryMessage);
                //yTextBox.Text = yTextBox.Name;
                table.Controls.Add(label, 0, index - 1);
                if (type.Equals("Input"))
                {
                    listXInput.Add(xTextBox);
                    listYInput.Add(yTextBox);
                    table.Controls.Add(xTextBox, 1, index - 1);
                    table.Controls.Add(yTextBox, 2, index - 1);
                }
                else
                {
                    listXResult.Add(xTextBox);
                    listYResult.Add(yTextBox);
                    table.Controls.Add(xTextBox, 2, index - 1); //поменял 1 и 2 местами
                    table.Controls.Add(yTextBox, 1, index - 1); //
                }
                table.RowStyles.Add(new RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
                table.RowCount++;
                type = "Result";
            }
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            _audioSource        = GetComponent <AudioSource>();
            _animator           = GetComponent <Animator>();
            _nextIdleChangeTime = Time.time + Random.Range(_randomSpan.x, _randomSpan.y);

            _idleHash = Animator.StringToHash("Idle");
            _input    = new DefaultInput();
        }
Ejemplo n.º 3
0
 private void AutoPistol()
 {
     if (CSGOData.Config.AutoPistol)
     {
         if (DefaultInput.GetKeyDown(Keys.LButton) && CSGOData.LocalPlayerWeapon.IsPistol())
         {
             attack(15);
         }
     }
 }
Ejemplo n.º 4
0
        }         // func open

        /// <summary></summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public LuaResult lines(object[] args)
        {
            if (args == null || args.Length == 0)
            {
                return(DefaultInput.lines(null));
            }
            else
            {
                return(Lua.GetEnumIteratorResult(new LuaLinesEnumerator(LuaFileStream.OpenFile((string)args[0], "r", defaultEncoding), true, args, 1)));
            }
        }         // func lines
Ejemplo n.º 5
0
        void Awake()
        {
            _transform = transform;
            _collider  = GetComponents <Collider>();
            _rigidbody = GetComponent <Rigidbody>();

            inputSystem                 = DefaultInput.GetInputSystem(PlayerID); //Get the Correct Input System
            MountInput.InputSystem      = inputSystem;                           //Set the Input System to the MountInput
            DismountInput.InputSystem   = inputSystem;                           //Set the Input System to the MountInput
            CallAnimalInput.InputSystem = inputSystem;                           //Set the Input System to the MountInput
        }
Ejemplo n.º 6
0
    public AnsiConsoleFacade(Profile profile, IExclusivityMode exclusivityMode)
    {
        _renderLock = new object();

        Profile         = profile ?? throw new ArgumentNullException(nameof(profile));
        Input           = new DefaultInput(Profile);
        ExclusivityMode = exclusivityMode ?? throw new ArgumentNullException(nameof(exclusivityMode));
        Pipeline        = new RenderPipeline();

        _ansiBackend   = new AnsiConsoleBackend(this);
        _legacyBackend = new LegacyConsoleBackend(this);
    }
Ejemplo n.º 7
0
 public void bhop()
 {
     if (DefaultInput.GetKeyDown(Keys.Space))
     {
         if ((CSGOData.LocalPlayer.m_iFlags & 1) == 1) //Stands (FL_ONGROUND)
         {
             _memory["client.dll"].Write(Offsets.Jump, 5);
         }
         else
         {
             _memory["client.dll"].Write(Offsets.Jump, 4);
         }
     }
 }
Ejemplo n.º 8
0
 public void ParseInputList()
 {
     try
     {
         InputList = DefaultInput.
                     Trim().
                     Split("\n").
                     ToList();
     }
     catch (Exception ex)
     {
         var exception = ex;
     }
 }
Ejemplo n.º 9
0
 public void ParseInputIntList()
 {
     try
     {
         InputIntList = DefaultInput.
                        Trim().
                        Split("\n").
                        Select(x => Int32.Parse(x)).
                        ToList();
     }
     catch (Exception ex)
     {
         var exception = ex;
     }
 }
Ejemplo n.º 10
0
        private void Awake()
        {
            // Load camera if unset
            if (!camera)
            {
                Debug.LogWarning("No camera set for input, using Camera.main. Please set a camera!");
                camera = Camera.main;
            }

            input = new DefaultInput();

            input.Default.Click.performed += BroadcastClick;
            input.Default.Click.performed += ctx => ClickHeld = true;
            input.Default.Click.canceled  += ctx => ClickHeld = false;
            input.Default.Click.Enable();
        }
Ejemplo n.º 11
0
        void Start()
        {
            inputSystem = DefaultInput.GetInputSystem(PlayerID);        //Set the Correct Input System

            MountInput.InputSystem              =
                DismountInput.InputSystem       =
                    CallAnimalInput.InputSystem = inputSystem;

            IsOnHorse = Mounted = false;                                    //initialize in false
            if (Anim)
            {
                Initial_UpdateMode = Anim.updateMode;                 //Gets the Update Mode of the Animator to restore later when dismounted.
            }
            if (StartMounted)
            {
                AlreadyMounted();                                           //Set All if Started Mounted is Active
            }
        }
Ejemplo n.º 12
0
        private void Awake()
        {
            _upgrades = ProgressionSystem.Instance;

            _sprite   = GetComponent <SpriteRenderer>();
            _rb       = GetComponent <Rigidbody2D>();
            _weapon   = GetComponent <Weapon>();
            _animator = GetComponent <Animator>();

            if (!IsAIControlled)
            {
                PlayerInput = new DefaultInput();
                PlayerInput.Enable();
                PlayerInput.Player.Movement.performed += MovementPerformed;
                PlayerInput.Player.Movement.cancelled += MovementPerformed;
                PlayerInput.Player.Shoot.performed    += ShootPerformed;
            }
        }
Ejemplo n.º 13
0
        public Day4()
        {
            var newInput = DefaultInput.Split("-");

            Min = Int32.Parse(newInput[0]);
            Max = Int32.Parse(newInput[1]);

            for (int i = Min; i < Max; i++)
            {
                var iString = i.ToString();

                if (CheckValidPassword(iString))
                {
                    validPasswords.Add(iString);
                }
            }

            Console.WriteLine(validPasswords.Count);
        }
Ejemplo n.º 14
0
    public int OnConnect()
    {
        int newConnectionID = 1;
        List <MediaStreamTrack> newTracks = new List <MediaStreamTrack>();

        //create camera prefab for new connection
        var newPlayer = Instantiate(playerPrefab, UnityEngine.Vector3.zero, UnityEngine.Quaternion.identity);

        //route the controller for the camera
        var newInput         = new DefaultInput();
        var cameraController = newPlayer.GetComponent <SimpleCameraController>();

        cameraController.SetInput(newInput);
        remoteInputs.Add(newConnectionID, newInput);

        //create track from camera and listener

        //add tracks to newTracks

        connections.Add(newConnectionID, newTracks);
        return(newConnectionID);
    }
Ejemplo n.º 15
0
 public void ResetInput()
 {
     Input = DefaultInput.Split(",").Select(x => Int32.Parse(x)).ToList();
     currentInstruction = 0;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Parser">Parser to use</param>
 public ObjectBase(IParser Parser)
 {
     Input = new DefaultInput();
     this.Parser = Parser;
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ObjectBase()
 {
     Input = new DefaultInput();
     Parser = new DefaultParser();
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ObjectBase()
 {
     Input  = new DefaultInput();
     Parser = new DefaultParser();
 }
Ejemplo n.º 19
0
 public PlayerActionActions(DefaultInput wrapper)
 {
     m_Wrapper = wrapper;
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Parser">Parser to use</param>
 public ObjectBase(IParser Parser)
 {
     Input       = new DefaultInput();
     this.Parser = Parser;
 }
Ejemplo n.º 21
0
 /// <summary></summary>
 /// <param name="args"></param>
 /// <returns></returns>
 public LuaResult read(object[] args)
 => DefaultInput.read(args) ?? LuaResult.Empty;
Ejemplo n.º 22
0
 private void InitInput()
 {
     _controller = new NesController(this);
     Input       = new DefaultInput();
 }