void PlatformSpecificUpdate()
    {
        float h;

        h = Input.GetAxisRaw("Horizontal");

        if (h > 0)
        {
            creature.MoveRight();
        }

        if (h < 0)
        {
            creature.MoveLeft();
        }

        if (Input.GetButtonDown("Jump"))
        {
            creature.Jump();
        }

        if (Input.GetButtonDown("Attack"))
        {
            creature.Attack();
        }

        if (Input.GetButtonDown("Switch"))
        {
            EventKit.Broadcast("switch weapon", Side.Right);
        }
    }
Exemplo n.º 2
0
    void Update()
    {
        float h;

        h = playerControls.GetAxisRaw("Move Horizontal");

        if (h > 0)
        {
            creature.MoveRight();
        }

        if (h < 0)
        {
            creature.MoveLeft();
        }

        if (playerControls.GetButtonDown("Jump"))
        {
            creature.Jump();
        }

        if (playerControls.GetButtonDown("Attack"))
        {
            creature.Attack();
        }

        if (playerControls.GetButtonDown("Next Weapon"))
        {
            Messenger.Broadcast <int>("switch weapon", RIGHT);
        }
    }