Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feel.Duck Class Reference

An example class part of the Feel demos This class acts as a character controller for the Duck in the FeelDuck demo scene It looks for input, and jumps when instructed to More...

Inheritance diagram for MoreMountains.Feel.Duck:

Public Member Functions

virtual void Land ()
 This method is called by the duck animator on the frame where it makes contact with the ground. In an actual game context, this may be called when you detect contact with the ground via a physics collision, a downward raycast, etc. More...
 

Public Attributes

float CooldownDuration = 1f
 a duration, in seconds, between two jumps, during which jumps are prevented More...
 
MMFeedbacks JumpFeedback
 a feedback to call when jumping More...
 
MMFeedbacks LandingFeedback
 a feedback to call when landing More...
 
MMFeedbacks DeniedFeedback
 a feedback to call when trying to jump while in cooldown More...
 

Protected Member Functions

virtual void Update ()
 On Update we look for input More...
 
virtual void HandleInput ()
 Detects input More...
 
virtual void Jump ()
 Performs a jump if possible, otherwise plays a denied feedback More...
 

Protected Attributes

float _lastJumpStartedAt = -100f
 

Detailed Description

An example class part of the Feel demos This class acts as a character controller for the Duck in the FeelDuck demo scene It looks for input, and jumps when instructed to

Member Function Documentation

◆ HandleInput()

virtual void MoreMountains.Feel.Duck.HandleInput ( )
protectedvirtual

Detects input

◆ Jump()

virtual void MoreMountains.Feel.Duck.Jump ( )
protectedvirtual

Performs a jump if possible, otherwise plays a denied feedback

◆ Land()

virtual void MoreMountains.Feel.Duck.Land ( )
virtual

This method is called by the duck animator on the frame where it makes contact with the ground. In an actual game context, this may be called when you detect contact with the ground via a physics collision, a downward raycast, etc.

◆ Update()

virtual void MoreMountains.Feel.Duck.Update ( )
protectedvirtual

On Update we look for input

Member Data Documentation

◆ _lastJumpStartedAt

float MoreMountains.Feel.Duck._lastJumpStartedAt = -100f
protected

◆ CooldownDuration

float MoreMountains.Feel.Duck.CooldownDuration = 1f

a duration, in seconds, between two jumps, during which jumps are prevented

◆ DeniedFeedback

MMFeedbacks MoreMountains.Feel.Duck.DeniedFeedback

a feedback to call when trying to jump while in cooldown

◆ JumpFeedback

MMFeedbacks MoreMountains.Feel.Duck.JumpFeedback

a feedback to call when jumping

◆ LandingFeedback

MMFeedbacks MoreMountains.Feel.Duck.LandingFeedback

a feedback to call when landing


The documentation for this class was generated from the following file: