// Update is called once per frame
    void Update()
    {
        if (currentlevelqueue.RoundOver() || !currentlevelqueue.RoundStarted())
        {
            selector.gameObject.SetActive(false);
            return;
        }

        GridLocation center = null;

        UpdateSelectorStatus(out center);
        CheckSelectorTouchesPlayer(center);

        // -- rotate selector 90deg on left click
        if (Input.GetMouseButtonDown(1))
        {
            RotateSelector();
        }
        else if (Input.GetMouseButtonDown(0))
        {
            if (canplaceobject && center != null)
            {
                PlaceFurniture(center);
            }
            else
            {
                AudioManager.PlaySoundEffect(cannotplace);
            }
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (!iq.RoundStarted() || iq.RoundOver())
        {
            animcontroller.SetAnimation("IdleDown");
            currentdirection = PlayerDirection.Idle;
            return;
        }

        switch (movestyle)
        {
        case PlayerMoveStyle.KeyboardOnly:
            ControlWithKeyboard();
            break;
        }
    }