Skip to content

DS_BaseGrid

Kamran Wali edited this page Jul 5, 2024 · 11 revisions

Inherits: Node

Inherited By ds_grid_rect

Base class for all the stage grid objects.

Description

DS_BaseGrid is the parent/base class for all the stage grid scripts in the tool/plugin Duniya Skapare. This script has been designed in a way that every current or new stage grid shape or algorithm scripts will need to extend from DS_BaseGrid. That way it will be easier to keep the grid types organized and having common parent. This will also help in making sure that the grid scripts can be just dragged and dropped into other scripts that will use the grid script and it will work no matter the different grid script, SOLID principles. Well that is the idea for now.

Properties

Type Name Default Value

Methods

Return Type Name

Property Descriptions

int _grid_x = 3

The maximum length in the x coordinate. Minimum value of _grid_x is 1. Starting x coordinate value is 0.


int _grid_y = 3

The maximum length in the y coordinate. Minimum value of _grid_y is 1. Starting y coordinate value is 0.


int _grid_z = 0

The maximum length in the z coordinate. Minimum value of _grid_z is 0. Starting z coordinate value is 0.

Note: The _grid_z is permanently set to 0 because at the moment _grid_z higher than 0 seems to cause problem in some algorithms. Once issues have been fixed _grid_z will be enabled again for the user to be set.


DS_Tile[] _tiles

An array that contains all the tiles for the grid.


Method Descriptions

int get_grid_size_x ()

This method gets the x-axis size of the grid which is