Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.DynamicColliderResizer Class Reference

Changes collider sizes based on animation state. Use this component if you want to change the shape of the characters colliders for specific aniamtion states/movements. More...

Inheritance diagram for PlatformerPro.DynamicColliderResizer:
PlatformerPro.PlatformerProMonoBehaviour

Public Attributes

List< ResizeMapmorphs
 The different collider morphs to apply. More...
 

Protected Member Functions

virtual void Init ()
 Init this instance. More...
 
virtual void PostInit ()
 Additional Init performed during start. More...
 
virtual void ApplyMorph (ColliderResizeInfo morph)
 Apply the given morph More...
 
virtual void ApplyUnityColliderMorph (UnityColliderResizeInfo morph)
 Applies a morph to a unity collider. More...
 
virtual void RestoreToDefaults ()
 Reset colliders back to defaults. More...
 

Protected Attributes

Dictionary< AnimationState, List< ColliderResizeInfo > > stateToMorphMap
 Maps individual animation states to a morph. More...
 
Dictionary< AnimationState, List< UnityColliderResizeInfo > > stateToUnityColliderMap
 Maps individual animation states to Unity collider size changes. More...
 
Vector2[] defaultExtents
 Extents of the default colliders. More...
 
float[] defaultLengths
 Lengths of the default colliders. More...
 
Dictionary< Collider2D, UnityColliderDetailsdefaultUnityColliders
 Maps colliders to their original settings. More...
 
Character character
 Character reference More...
 

Properties

override string Header [get]
 Gets the header. More...
 
- Properties inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual string Header [get]
 Gets the header string used to describe the component. More...
 
virtual string DocLink [get]
 Gets a link to documentation site. More...
 
virtual string VideoLink [get]
 Gets a link to a youtube video. More...
 
virtual string Deprecated [get]
 If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More...
 

Additional Inherited Members

- Public Member Functions inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual void Validate (PlatformerProMonoBehaviour myTarget)
 Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More...
 

Detailed Description

Changes collider sizes based on animation state. Use this component if you want to change the shape of the characters colliders for specific aniamtion states/movements.

Member Function Documentation

◆ ApplyMorph()

virtual void PlatformerPro.DynamicColliderResizer.ApplyMorph ( ColliderResizeInfo  morph)
protectedvirtual

Apply the given morph

Parameters
morphMorph.

◆ ApplyUnityColliderMorph()

virtual void PlatformerPro.DynamicColliderResizer.ApplyUnityColliderMorph ( UnityColliderResizeInfo  morph)
protectedvirtual

Applies a morph to a unity collider.

Parameters
morphMorph.

◆ Init()

virtual void PlatformerPro.DynamicColliderResizer.Init ( )
protectedvirtual

Init this instance.

◆ PostInit()

virtual void PlatformerPro.DynamicColliderResizer.PostInit ( )
protectedvirtual

Additional Init performed during start.

◆ RestoreToDefaults()

virtual void PlatformerPro.DynamicColliderResizer.RestoreToDefaults ( )
protectedvirtual

Reset colliders back to defaults.

Member Data Documentation

◆ character

Character PlatformerPro.DynamicColliderResizer.character
protected

Character reference

The character.

◆ defaultExtents

Vector2 [] PlatformerPro.DynamicColliderResizer.defaultExtents
protected

Extents of the default colliders.

◆ defaultLengths

float [] PlatformerPro.DynamicColliderResizer.defaultLengths
protected

Lengths of the default colliders.

◆ defaultUnityColliders

Dictionary<Collider2D, UnityColliderDetails> PlatformerPro.DynamicColliderResizer.defaultUnityColliders
protected

Maps colliders to their original settings.

◆ morphs

List<ResizeMap> PlatformerPro.DynamicColliderResizer.morphs

The different collider morphs to apply.

◆ stateToMorphMap

Dictionary<AnimationState, List<ColliderResizeInfo> > PlatformerPro.DynamicColliderResizer.stateToMorphMap
protected

Maps individual animation states to a morph.

◆ stateToUnityColliderMap

Dictionary<AnimationState, List<UnityColliderResizeInfo> > PlatformerPro.DynamicColliderResizer.stateToUnityColliderMap
protected

Maps individual animation states to Unity collider size changes.

Property Documentation

◆ Header

override string PlatformerPro.DynamicColliderResizer.Header
get

Gets the header.

The header.


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