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

If you plan on having moving platforms push your playable character, you'll want to use a Pusher in addition to it Typically you'll want to parent a pusher to the platform, and bind it to the Pusher's inspector. You can see an example of it in use in the MinimalMovingPlatforms demo scene More...

Inheritance diagram for MoreMountains.CorgiEngine.Pusher:

Public Attributes

MMPathMovement BoundPathMovement
 the moving platform to use as a speed reference More...
 
float DistanceThreshold = 1f
 how far from the collider's bounds the character needs to move to 'detach' from its influence More...
 

Protected Member Functions

virtual void Awake ()
 On Awake we initialize our bounds More...
 
virtual void Update ()
 On Update we detach our controllers if needed More...
 
virtual void DetachController (CorgiController controller)
 Detaches a specific controller from this pusher More...
 
void OnTriggerEnter2D (Collider2D other)
 On trigger enter, we add a colliding controller to our management list if needed More...
 

Protected Attributes

BoxCollider2D _boxCollider2D
 
Bounds _bounds
 
List< CorgiController_controllers
 
CorgiController _wipController
 

Detailed Description

If you plan on having moving platforms push your playable character, you'll want to use a Pusher in addition to it Typically you'll want to parent a pusher to the platform, and bind it to the Pusher's inspector. You can see an example of it in use in the MinimalMovingPlatforms demo scene

Member Function Documentation

◆ Awake()

virtual void MoreMountains.CorgiEngine.Pusher.Awake ( )
protectedvirtual

On Awake we initialize our bounds

◆ DetachController()

virtual void MoreMountains.CorgiEngine.Pusher.DetachController ( CorgiController  controller)
protectedvirtual

Detaches a specific controller from this pusher

Parameters
controller

◆ OnTriggerEnter2D()

void MoreMountains.CorgiEngine.Pusher.OnTriggerEnter2D ( Collider2D  other)
protected

On trigger enter, we add a colliding controller to our management list if needed

Parameters
other

◆ Update()

virtual void MoreMountains.CorgiEngine.Pusher.Update ( )
protectedvirtual

On Update we detach our controllers if needed

Member Data Documentation

◆ _bounds

Bounds MoreMountains.CorgiEngine.Pusher._bounds
protected

◆ _boxCollider2D

BoxCollider2D MoreMountains.CorgiEngine.Pusher._boxCollider2D
protected

◆ _controllers

List<CorgiController> MoreMountains.CorgiEngine.Pusher._controllers
protected

◆ _wipController

CorgiController MoreMountains.CorgiEngine.Pusher._wipController
protected

◆ BoundPathMovement

MMPathMovement MoreMountains.CorgiEngine.Pusher.BoundPathMovement

the moving platform to use as a speed reference

◆ DistanceThreshold

float MoreMountains.CorgiEngine.Pusher.DistanceThreshold = 1f

how far from the collider's bounds the character needs to move to 'detach' from its influence


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