Corgi Engine  v8.8
MoreMountains.CorgiEngine.Grip Class Reference

Add this component to an object with a 2D collider and it'll be grippable by any Character equipped with a CharacterGrip More...

Inheritance diagram for MoreMountains.CorgiEngine.Grip:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Attributes

Vector3 GripOffset = Vector3.zero
 the offset to apply to the gripped character's position when gripping More...
 
bool TweenToGripPosition = false
 if this is true, the position of the gripping character will be interpolated towards the grip's position when gripping starts More...
 
MMTweenType TweenType = new MMTweenType(MMTween.MMTweenCurve.EaseInQuartic)
 the tween definition to use when interpolating the character's position More...
 
float TweenDuration = 0.5f
 the duration (in seconds) over which to tween the character into gripping position when grip starts More...
 

Protected Member Functions

virtual void Start ()
 On Start we grab our MMPathMovement component More...
 
virtual void OnTriggerEnter2D (Collider2D collider)
 When an object collides with the grip, we check to see if it's a compatible character, and if yes, we change its state to Gripping More...
 

Protected Attributes

MMPathMovement _mmPathMovement
 

Detailed Description

Add this component to an object with a 2D collider and it'll be grippable by any Character equipped with a CharacterGrip

Member Function Documentation

◆ OnTriggerEnter2D()

virtual void MoreMountains.CorgiEngine.Grip.OnTriggerEnter2D ( Collider2D  collider)
protectedvirtual

When an object collides with the grip, we check to see if it's a compatible character, and if yes, we change its state to Gripping

Parameters
colliderCollider.

◆ Start()

virtual void MoreMountains.CorgiEngine.Grip.Start ( )
protectedvirtual

On Start we grab our MMPathMovement component

Member Data Documentation

◆ _mmPathMovement

MMPathMovement MoreMountains.CorgiEngine.Grip._mmPathMovement
protected

◆ GripOffset

Vector3 MoreMountains.CorgiEngine.Grip.GripOffset = Vector3.zero

the offset to apply to the gripped character's position when gripping

◆ TweenDuration

float MoreMountains.CorgiEngine.Grip.TweenDuration = 0.5f

the duration (in seconds) over which to tween the character into gripping position when grip starts

◆ TweenToGripPosition

bool MoreMountains.CorgiEngine.Grip.TweenToGripPosition = false

if this is true, the position of the gripping character will be interpolated towards the grip's position when gripping starts

◆ TweenType

MMTweenType MoreMountains.CorgiEngine.Grip.TweenType = new MMTweenType(MMTween.MMTweenCurve.EaseInQuartic)

the tween definition to use when interpolating the character's position


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