AOS Fog of War
Loading...
Searching...
No Matches
FischlWorks_FogWar.csFogWar.LevelData Class Reference

Public Member Functions

void AddColumn (LevelColumn levelColumn)
 

Public Attributes

int levelDimensionX = 0
 
int levelDimensionY = 0
 
float scanSpacingPerUnit = 0
 
float unitScale = 0
 

Properties

LevelColumn this[int index] [get, set]
 

Detailed Description

A class for storing the base level data.

This class is later serialized into Json format.
Empty spaces are stored as 0, while the obstacles are stored as 1.
If a level is loaded instead of being scanned, the level dimension properties of csFogWar will be replaced by the level data.

Member Function Documentation

◆ AddColumn()

void FischlWorks_FogWar.csFogWar.LevelData.AddColumn ( LevelColumn  levelColumn)
inline
44 {
45 levelRow.Add(levelColumn);
46 }

Member Data Documentation

◆ levelDimensionX

int FischlWorks_FogWar.csFogWar.LevelData.levelDimensionX = 0

◆ levelDimensionY

◆ scanSpacingPerUnit

float FischlWorks_FogWar.csFogWar.LevelData.scanSpacingPerUnit = 0

◆ unitScale

float FischlWorks_FogWar.csFogWar.LevelData.unitScale = 0

Property Documentation

◆ this[int index]

LevelColumn FischlWorks_FogWar.csFogWar.LevelData.this[int index]
getset
49 {
50 get {
51 if (index >= 0 && index < levelRow.Count)
52 {
53 return levelRow[index];
54 }
55 else
56 {
57 Debug.LogErrorFormat("index given in x axis is out of range");
58
59 return null;
60 }
61 }
62 set {
63 if (index >= 0 && index < levelRow.Count)
64 {
65 levelRow[index] = value;
66 }
67 else
68 {
69 Debug.LogErrorFormat("index given in x axis is out of range");
70
71 return;
72 }
73 }
74 }

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