Úvod HTML CSS PHP MySQL JavaScript
input

Input

Klávesnice

    if (Input.GetKeyDown(KeyCode.Escape))
        {
            Application.Quit();
        }
   
    void Update () 
   {
      float xPos = transform.position.x + (Input.GetAxis("Horizontal") * paddleSpeed);
      playerPos =  new Vector3 (Mathf.Clamp (xPos, -13f, 13), -9.5f, 0f);
      transform.position = playerPos;

    }
   

Myš

   if (Input.GetMouseButtonDown(0))
            {
                Application.LoadLevel(1);

            }
   if (Input.GetButtonDown("Fire1"))
            {
                Application.LoadLevel(1);

            }
    
        void Update () 
   {
      float xPos = transform.position.x + (Input.GetAxis("Mouse X") * paddleSpeed);
      playerPos =  new Vector3 (Mathf.Clamp (xPos, -13f, 13), -9.5f, 0f);
      transform.position = playerPos;

    }
    

Touch

    
    if (Input.touches.Length > 0)
            {
                vel = Flap(vel);
            }
   
pravy Ascii tabulka
Barvy
Klávesové zkratky


©2013-2021 Trojklik.8u.cz Autor: Vašek D.