Exemple #1
0
    private void UseClub()
    {
        // PrimaryAction
        if (KeybindingController.GetInputDown(GameControls.PrimaryUse) && playerMove.Movement.magnitude == 0)
        {
            gcController.PrimaryUseStart();
        }
        else if (KeybindingController.GetInput(GameControls.PrimaryUse))
        {
            gcController.PrimaryUseHeld();
        }
        else if (KeybindingController.GetInputUp(GameControls.PrimaryUse))
        {
            gcController.PrimaryUseEnd();
            if (gcController.CurrentMode == GolfClubController.Mode.Golfing)
            {
                playerAnimation.SetClubSwing(gcController.GetActiveClubIndex());
                EventController.FireEvent(new SendClubSwingAnimation(gcController.GetActiveClubIndex()));
            }
        }

        // Secondary Action
        if (KeybindingController.GetInputDown(GameControls.SecondaryUse))
        {
            gcController.SecondaryUseStart();
        }
        else if (KeybindingController.GetInput(GameControls.SecondaryUse))
        {
            gcController.SecondaryUseHeld();
        }
        else if (KeybindingController.GetInputUp(GameControls.SecondaryUse))
        {
            gcController.SecondaryUseEnd();
        }
    }