A class used to handle Feel's Snake demo's snake bodyparts
More...
|
virtual void | Eat (float intensity) |
| Called when the snake eats a new food More...
|
|
virtual void | New () |
| Called when instantiating a new body part More...
|
|
A class used to handle Feel's Snake demo's snake bodyparts
◆ ActivateCollider()
virtual IEnumerator MoreMountains.Feel.SnakeBodyPart.ActivateCollider |
( |
| ) |
|
|
protectedvirtual |
Activates this part's collider
- Returns
◆ Awake()
virtual void MoreMountains.Feel.SnakeBodyPart.Awake |
( |
| ) |
|
|
protectedvirtual |
On awake we store our collider and enable it after a delay
◆ Eat()
virtual void MoreMountains.Feel.SnakeBodyPart.Eat |
( |
float |
intensity | ) |
|
|
virtual |
Called when the snake eats a new food
- Parameters
-
◆ New()
virtual void MoreMountains.Feel.SnakeBodyPart.New |
( |
| ) |
|
|
virtual |
Called when instantiating a new body part
◆ OnTriggerEnter2D()
void MoreMountains.Feel.SnakeBodyPart.OnTriggerEnter2D |
( |
Collider2D |
other | ) |
|
|
protected |
If we connect with the snake's head, we lose a part
- Parameters
-
◆ Update()
void MoreMountains.Feel.SnakeBodyPart.Update |
( |
| ) |
|
|
protected |
On update, we move to the recorded position of our predecessor
◆ _collider2D
BoxCollider2D MoreMountains.Feel.SnakeBodyPart._collider2D |
|
protected |
◆ _snake
Snake MoreMountains.Feel.SnakeBodyPart._snake |
|
protected |
◆ EatFeedback
MMFeedbacks MoreMountains.Feel.SnakeBodyPart.EatFeedback |
a feedback to play when food gets eaten
◆ Index
int MoreMountains.Feel.SnakeBodyPart.Index = 0 |
◆ NewFeedback
MMFeedbacks MoreMountains.Feel.SnakeBodyPart.NewFeedback |
a feedback to play when this part appears
◆ Offset
int MoreMountains.Feel.SnakeBodyPart.Offset = 20 |
◆ TargetRecorder
a position recorder this body part will look at to know where to go to
The documentation for this class was generated from the following file: