Example #1
0
    private void Update()
    {
        if (Controls.Restart)
        {
            Transitions.FadeRestart(0.3f);
        }

        if (InPhysics)
        {
            RunPhysics();
        }
        else
        {
            if (Controls.Undo)
            {
                undoes.Undo();
            }
            else if (Active)
            {
                if (Controls.Up)
                {
                    TryMovement(Direction.Up);
                }
                else if (Controls.Down)
                {
                    TryMovement(Direction.Down);
                }
                else if (Controls.Left)
                {
                    TryMovement(Direction.Left);
                }
                else if (Controls.Right)
                {
                    TryMovement(Direction.Right);
                }
                else if (Controls.Attach)
                {
                    Attach();
                }
            }
        }
    }