Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Feel.SnakeFoodSpawner Class Reference

A simple class used to spawn snake food in Feel's Snake demo scene. More...

Inheritance diagram for MoreMountains.Feel.SnakeFoodSpawner:

Public Member Functions

virtual Vector3 DetermineSpawnPosition ()
 Determines a valid position at which to spawn food.

Public Attributes

SnakeFood SnakeFoodPrefab
 the food prefab to spawn
int AmountOfFood = 3
 the maximum amount of food in the scene
Vector2 MinRandom = new Vector2(0.1f, 0.1f)
 the minimum coordinates to spawn at (in viewport units)
Vector2 MaxRandom = new Vector2(0.9f, 0.9f)
 the maximum coordinates to spawn at (in viewport units)

Protected Member Functions

virtual void Start ()
 On start, instantiates food.

Protected Attributes

List< SnakeFoodFoods
Camera _mainCamera

Detailed Description

A simple class used to spawn snake food in Feel's Snake demo scene.

Member Function Documentation

◆ DetermineSpawnPosition()

virtual Vector3 MoreMountains.Feel.SnakeFoodSpawner.DetermineSpawnPosition ( )
virtual

Determines a valid position at which to spawn food.

Returns

◆ Start()

virtual void MoreMountains.Feel.SnakeFoodSpawner.Start ( )
protectedvirtual

On start, instantiates food.

Member Data Documentation

◆ _mainCamera

Camera MoreMountains.Feel.SnakeFoodSpawner._mainCamera
protected

◆ AmountOfFood

int MoreMountains.Feel.SnakeFoodSpawner.AmountOfFood = 3

the maximum amount of food in the scene

◆ Foods

List<SnakeFood> MoreMountains.Feel.SnakeFoodSpawner.Foods
protected

◆ MaxRandom

Vector2 MoreMountains.Feel.SnakeFoodSpawner.MaxRandom = new Vector2(0.9f, 0.9f)

the maximum coordinates to spawn at (in viewport units)

◆ MinRandom

Vector2 MoreMountains.Feel.SnakeFoodSpawner.MinRandom = new Vector2(0.1f, 0.1f)

the minimum coordinates to spawn at (in viewport units)

◆ SnakeFoodPrefab

SnakeFood MoreMountains.Feel.SnakeFoodSpawner.SnakeFoodPrefab

the food prefab to spawn


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