Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (player)
        {
            Turn(Input.GetAxis("P1Horizontal"));
            Thrust(Input.GetAxis("P1Vertical"));

            if (Input.GetAxis("P1" + platform.fireAxis) > 0f)
            {
                bm.Fire(spawn);
            }
        }
        else
        {
            Turn(Input.GetAxis("P2Horizontal"));
            Thrust(Input.GetAxis("P2Vertical"));

            if (Input.GetAxis("P2" + platform.fireAxis) > 0f)
            {
                bm.Fire(spawn);
            }
        }
    }