Ejemplo n.º 1
0
    //-------------------------------------------------------------------------------------------------
    private void UpdateInputNet()
    {
        if (!IsPlayer())
        {
            return;
        }

        if (m_netController.ConsumeAllActions())
        {
            Attack();
        }

        if (m_netController.Movement != Vector2.zero)
        {
            Move(m_netController.Movement);
        }
    }
Ejemplo n.º 2
0
    //-------------------------------------------------------------------
    public void UpdateLobby()
    {
        // this state, just wait around until server tells us to move on
        VirtualNetworkController control = HopperNetwork.GetMyController();

        if (control.ConsumeAllActions())
        {
            ToggleReady();
        }

        if (Controller.IsInGame())
        {
            SetState(eClientState.IN_GAME);
        }

        if (Controller.ClientIsReady)
        {
            ActionImage.sprite = ReadyBunny;
        }
        else
        {
            ActionImage.sprite = SleepyBunny;
        }
    }