Corgi Engine
v9.0
|
This component, added on an empty object in your level will handle the generation of a unique and randomized tilemap More...
Public Member Functions | |
override void | Generate () |
Generates a new level More... | |
Public Attributes | |
bool | GenerateOnAwake = false |
Whether or not this level should be generated automatically on start. More... | |
Grid | TargetGrid |
the Grid on which to work More... | |
Tilemap | PlatformsTilemap |
the tilemap containing the walls More... | |
LayerMask | ObstaclesLayermask |
the layermask to avoid More... | |
LevelManager | TargetLevelManager |
the level manager More... | |
Transform | InitialSpawn |
the object at which the player will spawn More... | |
Vector3 | SpawnOffset |
an offset in world space to apply to the spawn point More... | |
Transform | Exit |
the exit of the level More... | |
float | MinDistanceFromSpawnToExit = 2f |
the minimum distance that should separate spawn and exit. More... | |
List< GameObject > | FloatingObjectsToReposition |
a list of objects to reposition in empty space More... | |
Public Attributes inherited from MoreMountains.Tools.MMTilemapGenerator | |
Vector2Int | GridWidth = new Vector2Int(50,50) |
The width of the grid, in cells. More... | |
Vector2Int | GridHeight = new Vector2Int(50,50) |
the height of the grid, in cells More... | |
MMTilemapGeneratorLayerList | Layers |
the list of layers that will be used to generate the tilemap More... | |
int | GlobalSeed = 0 |
a value between 0 and 1 that will be used by all layers as their random seed. If you generate another map using the same seed, it'll look the same More... | |
bool | RandomizeGlobalSeed = true |
whether or not to randomize the global seed every time a new map is generated More... | |
bool | SlowRender = false |
turning this to true will (at runtime only) draw the map progressively. This is really just for fun. More... | |
float | SlowRenderDuration = 1f |
the duration of the slow render, in seconds More... | |
MMTweenType | SlowRenderTweenType = new MMTweenType(MMTween.MMTweenCurve.EaseInOutCubic) |
the tween to use for the slow render More... | |
Protected Member Functions | |
virtual void | Awake () |
On awake we generate our level if needed More... | |
virtual void | ResizeLevelManager () |
Resizes the level manager's bounds to match the new level More... | |
virtual void | PlaceEntryAndExit () |
Moves the spawn and exit to empty places More... | |
virtual void | PlaceFloatingObjects () |
Places a selection of objects at random positions, while avoiding platforms More... | |
Protected Member Functions inherited from MoreMountains.Tools.MMTilemapGenerator | |
virtual void | GenerateLayer (MMTilemapGeneratorLayer layer) |
Generates a layer grid, and renders it More... | |
virtual void | RenderGrid (MMTilemapGeneratorLayer layer) |
Renders the grid with the selected modes to the specified target tilemap More... | |
virtual void | OnValidate () |
Sets default values for all layers More... | |
Static Protected Attributes | |
const int | _maxIterationsCount = 100 |
Additional Inherited Members | |
Public Types inherited from MoreMountains.Tools.MMTilemapGenerator | |
enum | GenerateMethods { GenerateMethods.Full, GenerateMethods.Perlin, GenerateMethods.PerlinGround, GenerateMethods.Random, GenerateMethods.RandomWalk, GenerateMethods.RandomWalkAvoider, GenerateMethods.RandomWalkGround, GenerateMethods.Path, GenerateMethods.Copy } |
the possible methods that can be used to generate a random grid More... | |
Protected Attributes inherited from MoreMountains.Tools.MMTilemapGenerator | |
int[,] | _grid |
int | _width |
int | _height |
This component, added on an empty object in your level will handle the generation of a unique and randomized tilemap
|
protectedvirtual |
On awake we generate our level if needed
|
virtual |
Generates a new level
Reimplemented from MoreMountains.Tools.MMTilemapGenerator.
|
protectedvirtual |
Moves the spawn and exit to empty places
|
protectedvirtual |
Places a selection of objects at random positions, while avoiding platforms
|
protectedvirtual |
Resizes the level manager's bounds to match the new level
|
staticprotected |
Transform MoreMountains.CorgiEngine.TilemapLevelGenerator.Exit |
the exit of the level
List<GameObject> MoreMountains.CorgiEngine.TilemapLevelGenerator.FloatingObjectsToReposition |
a list of objects to reposition in empty space
bool MoreMountains.CorgiEngine.TilemapLevelGenerator.GenerateOnAwake = false |
Whether or not this level should be generated automatically on start.
Transform MoreMountains.CorgiEngine.TilemapLevelGenerator.InitialSpawn |
the object at which the player will spawn
float MoreMountains.CorgiEngine.TilemapLevelGenerator.MinDistanceFromSpawnToExit = 2f |
the minimum distance that should separate spawn and exit.
LayerMask MoreMountains.CorgiEngine.TilemapLevelGenerator.ObstaclesLayermask |
the layermask to avoid
Tilemap MoreMountains.CorgiEngine.TilemapLevelGenerator.PlatformsTilemap |
the tilemap containing the walls
Vector3 MoreMountains.CorgiEngine.TilemapLevelGenerator.SpawnOffset |
an offset in world space to apply to the spawn point
Grid MoreMountains.CorgiEngine.TilemapLevelGenerator.TargetGrid |
the Grid on which to work
LevelManager MoreMountains.CorgiEngine.TilemapLevelGenerator.TargetLevelManager |
the level manager