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

This class handles Feel's Snake demo's food objects, that the snake has to eat to score points More...

Inheritance diagram for MoreMountains.Feel.SnakeFood:

Public Attributes

float OffDelay = 1f
 a duration (in seconds) during which the food is inactive before moving it to another position More...
 
GameObject Model
 the food's visual representation More...
 
MMFeedbacks EatFeedback
 a feedback to play when food gets eaten More...
 
MMFeedbacks AppearFeedback
 a feedback to play when food appears More...
 

Protected Member Functions

void OnTriggerEnter2D (Collider2D other)
 When this food gets eaten, we play its eat feedback, and start moving it somewhere else in the scene More...
 
virtual IEnumerator MoveFood ()
 Moves the food to another spot More...
 

Protected Attributes

Snake _snake
 

Properties

SnakeFoodSpawner Spawner [get, set]
 the food spawner More...
 

Detailed Description

This class handles Feel's Snake demo's food objects, that the snake has to eat to score points

Member Function Documentation

◆ MoveFood()

virtual IEnumerator MoreMountains.Feel.SnakeFood.MoveFood ( )
protectedvirtual

Moves the food to another spot

Returns

◆ OnTriggerEnter2D()

void MoreMountains.Feel.SnakeFood.OnTriggerEnter2D ( Collider2D  other)
protected

When this food gets eaten, we play its eat feedback, and start moving it somewhere else in the scene

Parameters
other

Member Data Documentation

◆ _snake

Snake MoreMountains.Feel.SnakeFood._snake
protected

◆ AppearFeedback

MMFeedbacks MoreMountains.Feel.SnakeFood.AppearFeedback

a feedback to play when food appears

◆ EatFeedback

MMFeedbacks MoreMountains.Feel.SnakeFood.EatFeedback

a feedback to play when food gets eaten

◆ Model

GameObject MoreMountains.Feel.SnakeFood.Model

the food's visual representation

◆ OffDelay

float MoreMountains.Feel.SnakeFood.OffDelay = 1f

a duration (in seconds) during which the food is inactive before moving it to another position

Property Documentation

◆ Spawner

SnakeFoodSpawner MoreMountains.Feel.SnakeFood.Spawner
getset

the food spawner


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