Пример #1
0
 /// <summary>
 /// Gets the name of the axis
 /// </summary>
 /// <param name="axis">Target axis</param>
 /// <param name="playerIndex">Index of the player</param>
 /// <returns>The name of the axis</returns>
 public static string GetAxisName(Axises axis, int playerIndex)
 {
     return(axis.ToString() + playerIndex);
 }
Пример #2
0
    private void FixedUpdate()
    {
        float v = Input.GetAxisRaw(axis.ToString());

        GetComponent <Rigidbody2D>().velocity = new Vector2(0, v) * speed;
    }