Commit 3cede061 authored by tmorga18's avatar tmorga18

added the map maker

parent 08af3fb3
fileFormatVersion: 2
guid: 10858855aa03c49269ffdd941293f1eb
folderAsset: yes
timeCreated: 1480642207
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
13,15
0,0,False,1,W_Dungeon_Wall_ColorChange
1,0,False,1,W_Dungeon_Wall_ColorChange
2,0,False,1,W_Dungeon_Wall_ColorChange
3,0,False,1,W_Dungeon_Wall_ColorChange
4,0,False,1,W_Dungeon_Wall_ColorChange
5,0,False,1,W_Dungeon_Wall_ColorChange
6,0,False,1,W_Dungeon_Wall_ColorChange
7,0,False,1,W_Dungeon_Wall_ColorChange
8,0,False,1,W_Dungeon_Wall_ColorChange
9,0,False,1,W_Dungeon_Wall_ColorChange
10,0,False,1,W_Dungeon_Wall_ColorChange
11,0,False,1,W_Dungeon_Wall_ColorChange
12,0,False,1,W_Dungeon_Wall_ColorChange
13,0,False,1,W_Dungeon_Wall_ColorChange
14,0,False,1,W_Dungeon_Wall_ColorChange
0,1,False,1,W_Dungeon_Wall_ColorChange
1,1,True,1,W2_Dun_Trans_Left
2,1,True,1,W2_Dun_Trans_Right
3,1,True,1,W2_Dun_Trans_Left
4,1,True,1,W2_Dun_Trans_Right
5,1,True,1,W2_Dun_Trans_Left
6,1,True,1,W2_Dun_Trans_Right
7,1,True,1,W2_Dun_Trans_Left
8,1,True,1,W2_Dun_Trans_Right
9,1,True,1,W2_Dun_Trans_Left
10,1,True,1,W2_Dun_Trans_Right
11,1,True,1,W2_Dun_Trans_Left
12,1,True,1,W2_Dun_Trans_Right
13,1,True,1,W2_Dun_Trans_Left
14,1,False,1,W_Dungeon_Wall_ColorChange
0,2,False,1,W_Dungeon_Wall_ColorChange
1,2,True,1,W2_Dun_Trans_Right
2,2,True,1,W2_Dun_Floor
3,2,True,1,W2_Dun_Trans_Right
4,2,True,1,W2_Dun_Floor
5,2,True,1,W2_Dun_Trans_Right
6,2,True,1,W2_Dun_Floor
7,2,True,1,W2_Dun_Trans_Right
8,2,True,1,W2_Dun_Floor
9,2,True,1,W2_Dun_Trans_Right
10,2,True,1,W2_Dun_Floor
11,2,True,1,W2_Dun_Trans_Right
12,2,True,1,W2_Dun_Floor
13,2,True,1,W2_Dun_Trans_Right
14,2,False,1,W_Dungeon_Wall_ColorChange
0,3,False,1,W_Dungeon_Wall_ColorChange
1,3,True,1,W_Dungeon_Less_Vib
2,3,True,1,W2_Dun_Trans_Right
3,3,True,1,W_Dungeon_Less_Vib
4,3,True,1,W2_Dun_Trans_Right
5,3,True,1,W_Dungeon_Less_Vib
6,3,True,1,W2_Dun_Trans_Right
7,3,True,1,W_Dungeon_Less_Vib
8,3,True,1,W2_Dun_Trans_Right
9,3,True,1,W_Dungeon_Less_Vib
10,3,True,1,W2_Dun_Trans_Right
11,3,True,1,W_Dungeon_Less_Vib
12,3,True,1,W2_Dun_Trans_Right
13,3,True,1,W_Dungeon_Less_Vib
14,3,False,1,W_Dungeon_Wall_ColorChange
0,4,False,1,W_Dungeon_Wall_ColorChange
1,4,True,1,W2_Dun_Trans_Right
2,4,True,1,W2_Dun_Trans_Left
3,4,True,1,W2_Dun_Trans_Right
4,4,True,1,W2_Dun_Trans_Left
5,4,True,1,W2_Dun_Trans_Right
6,4,True,1,W2_Dun_Trans_Left
7,4,True,1,W2_Dun_Trans_Right
8,4,True,1,W2_Dun_Trans_Left
9,4,True,1,W2_Dun_Trans_Right
10,4,True,1,W2_Dun_Trans_Left
11,4,True,1,W2_Dun_Trans_Right
12,4,True,1,W2_Dun_Trans_Left
13,4,True,1,W2_Dun_Trans_Right
14,4,False,1,W_Dungeon_Wall_ColorChange
0,5,False,1,WaterDoorLeft
1,5,True,1,W2_Dun_Floor
2,5,True,1,W2_Dun_Trans_Right
3,5,True,1,W2_Dun_Floor
4,5,True,1,W2_Dun_Trans_Right
5,5,True,1,W2_Dun_Floor
6,5,True,1,W2_Dun_Trans_Right
7,5,True,1,W2_Dun_Floor
8,5,True,1,W2_Dun_Trans_Right
9,5,True,1,W2_Dun_Floor
10,5,True,1,W2_Dun_Trans_Right
11,5,True,1,W2_Dun_Floor
12,5,True,1,W2_Dun_Trans_Right
13,5,True,1,W2_Dun_Floor
14,5,False,1,WaterDoorRight
0,6,False,1,WaterDoorRight
1,6,True,1,W2_Dun_Trans_Right
2,6,True,1,W_Dungeon_Less_Vib
3,6,True,1,W2_Dun_Trans_Right
4,6,True,1,W2_Dun_Trans_Right
5,6,True,1,W2_Dun_Trans_Right
6,6,True,1,W2_Dun_Trans_Right
7,6,True,1,W2_Dun_Trans_Right
8,6,True,1,W2_Dun_Trans_Right
9,6,True,1,W2_Dun_Trans_Right
10,6,True,1,W2_Dun_Trans_Right
11,6,True,1,W2_Dun_Trans_Right
12,6,True,1,W2_Dun_Trans_Right
13,6,True,1,W2_Dun_Trans_Right
14,6,False,1,WaterDoorLeft
0,7,False,1,W_Dungeon_Wall_ColorChange
1,7,True,1,W2_Dun_Floor
2,7,True,1,W2_Dun_Trans_Right
3,7,True,1,W2_Dun_Floor
4,7,True,1,W2_Dun_Trans_Right
5,7,True,1,W2_Dun_Floor
6,7,True,1,W2_Dun_Trans_Right
7,7,True,1,W2_Dun_Floor
8,7,True,1,W2_Dun_Trans_Right
9,7,True,1,W2_Dun_Floor
10,7,True,1,W2_Dun_Trans_Right
11,7,True,1,W2_Dun_Floor
12,7,True,1,W2_Dun_Trans_Right
13,7,True,1,W2_Dun_Floor
14,7,False,1,W_Dungeon_Wall_ColorChange
0,8,False,1,W_Dungeon_Wall_ColorChange
1,8,True,1,W2_Dun_Trans_Right
2,8,True,1,W2_Dun_Trans_Left
3,8,True,1,W2_Dun_Trans_Right
4,8,True,1,W2_Dun_Trans_Left
5,8,True,1,W2_Dun_Trans_Right
6,8,True,1,W2_Dun_Trans_Left
7,8,True,1,W2_Dun_Trans_Right
8,8,True,1,W2_Dun_Trans_Left
9,8,True,1,W2_Dun_Trans_Right
10,8,True,1,W2_Dun_Trans_Left
11,8,True,1,W2_Dun_Trans_Right
12,8,True,1,W2_Dun_Trans_Left
13,8,True,1,W2_Dun_Trans_Right
14,8,False,1,W_Dungeon_Wall_ColorChange
0,9,False,1,W_Dungeon_Wall_ColorChange
1,9,True,1,W_Dungeon_Less_Vib
2,9,True,1,W2_Dun_Trans_Right
3,9,True,1,W_Dungeon_Less_Vib
4,9,True,1,W2_Dun_Trans_Right
5,9,True,1,W_Dungeon_Less_Vib
6,9,True,1,W2_Dun_Trans_Right
7,9,True,1,W_Dungeon_Less_Vib
8,9,True,1,W2_Dun_Trans_Right
9,9,True,1,W_Dungeon_Less_Vib
10,9,True,1,W2_Dun_Trans_Right
11,9,True,1,W_Dungeon_Less_Vib
12,9,True,1,W2_Dun_Trans_Right
13,9,True,1,W_Dungeon_Less_Vib
14,9,False,1,W_Dungeon_Wall_ColorChange
0,10,False,1,W_Dungeon_Wall_ColorChange
1,10,True,1,W2_Dun_Trans_Right
2,10,True,1,W2_Dun_Floor
3,10,True,1,W2_Dun_Trans_Right
4,10,True,1,W2_Dun_Floor
5,10,True,1,W2_Dun_Trans_Right
6,10,True,1,W2_Dun_Floor
7,10,True,1,W2_Dun_Trans_Right
8,10,True,1,W2_Dun_Floor
9,10,True,1,W2_Dun_Trans_Right
10,10,True,1,W2_Dun_Floor
11,10,True,1,W2_Dun_Trans_Right
12,10,True,1,W2_Dun_Floor
13,10,True,1,W2_Dun_Trans_Right
14,10,False,1,W_Dungeon_Wall_ColorChange
0,11,False,1,W_Dungeon_Wall_ColorChange
1,11,True,1,W2_Dun_Trans_Left
2,11,True,1,W2_Dun_Trans_Right
3,11,True,1,W2_Dun_Trans_Left
4,11,True,1,W2_Dun_Trans_Right
5,11,True,1,W2_Dun_Trans_Left
6,11,True,1,W2_Dun_Trans_Right
7,11,True,1,W2_Dun_Trans_Left
8,11,True,1,W2_Dun_Trans_Right
9,11,True,1,W2_Dun_Trans_Left
10,11,True,1,W2_Dun_Trans_Right
11,11,True,1,W2_Dun_Trans_Left
12,11,True,1,W2_Dun_Trans_Right
13,11,True,1,W2_Dun_Trans_Left
14,11,False,1,W_Dungeon_Wall_ColorChange
0,12,False,1,W_Dungeon_Wall_ColorChange
1,12,False,1,W_Dungeon_Wall_ColorChange
2,12,False,1,W_Dungeon_Wall_ColorChange
3,12,False,1,W_Dungeon_Wall_ColorChange
4,12,False,1,W_Dungeon_Wall_ColorChange
5,12,False,1,W_Dungeon_Wall_ColorChange
6,12,False,1,W_Dungeon_Wall_ColorChange
7,12,False,1,WaterDoorLeft
8,12,False,1,WaterDoorRight
9,12,False,1,W_Dungeon_Wall_ColorChange
10,12,False,1,W_Dungeon_Wall_ColorChange
11,12,False,1,W_Dungeon_Wall_ColorChange
12,12,False,1,W_Dungeon_Wall_ColorChange
13,12,False,1,W_Dungeon_Wall_ColorChange
14,12,False,1,W_Dungeon_Wall_ColorChange
fileFormatVersion: 2
guid: c1920780e6d31419080bdeeb9c4e961f
timeCreated: 1480642124
licenseType: Free
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 44ae1437a25c94cd29753405464a0b03
timeCreated: 1480641432
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9e90483578dcf4455a65cf1377a9af9c
timeCreated: 1480641390
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4f72d3b353e644cf5aee4b2d07a2c36e
timeCreated: 1480641406
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e027118c1bb53406ba6aae4bb8e27814
timeCreated: 1480641491
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4f7077c274bfa4bf7b580027671d1b0f
timeCreated: 1480641346
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a3ed57936c2e54d79bd7b02efc51f48f
timeCreated: 1480641508
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f43c4164f274d4d64905506dad6a5f3f
timeCreated: 1480641523
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -17,6 +17,7 @@ public class Actions : MonoBehaviour {
public int fireballSpeed = 5;
public bool unlockedWaterShield = false;
public bool waterShieldUsable = true;
private float waterShieldTimer = 0.0f;
public float waterShieldCooldown = 5.0f;
......@@ -72,17 +73,19 @@ public class Actions : MonoBehaviour {
}
if(Input.GetButtonDown("Fire3")) {
if(unlockedWaterShield == true) {
// Increment the counter
abilitiesCounter++;
// Increment the counter
abilitiesCounter++;
// If the counter goes out of range of the array's size, reset it to 0
if(abilitiesCounter > abilities.Length - 1) {
abilitiesCounter = 0;
}
// If the counter goes out of range of the array's size, reset it to 0
if(abilitiesCounter > abilities.Length - 1) {
abilitiesCounter = 0;
}
// Call the ChooseAbility() function
CycleAbility();
// Call the ChooseAbility() function
CycleAbility();
}
}
// Checks to see if the water shield is off cooldown and changes the image opacity accordingly
......
......@@ -8,7 +8,7 @@ public class MapLoader : MonoBehaviour {
void Start () {
string text = System.IO.File.ReadAllText ("Assets\\Resources\\Maps\\" + fileName + ".txt");
string text = System.IO.File.ReadAllText ("Assets/Resources/Maps/" + fileName + ".txt");
string[] delim = { "\r\n" };
......@@ -19,7 +19,7 @@ public class MapLoader : MonoBehaviour {
int x = int.Parse (coords[0].ToString ());
int y = int.Parse (coords[1].ToString ());
Tile[,] map = new Tile[y, x];
//Tile[,] map = new Tile[y, x];
float startx;
float starty;
......@@ -31,19 +31,25 @@ public class MapLoader : MonoBehaviour {
x = int.Parse (args [0]);
y = int.Parse (args [1]);
map [x, y].walkable = bool.Parse (args [2]);
map [x, y].weight = float.Parse (args [3]);
//map [x, y].walkable = bool.Parse (args [2]);
//map [x, y].weight = float.Parse (args [3]);
map [x, y] = ((GameObject) Instantiate(Resources.Load<GameObject> ("Prefabs/" + args[4]))).GetComponent<Tile> ();
//map [x, y] = ((GameObject)
string path = "Prefabs/" + args[4];
GameObject prefab = Resources.Load<GameObject> (path);
Debug.Log(path);
Debug.Log(prefab);
GameObject go = Instantiate(prefab);//.GetComponent<Tile> ();
go.transform.position = new Vector3(x, y, 0);
startx = (float)x - (float)map.GetLength(0) / 2f;
starty = (float)y - (float)map.GetLength(1) / 2f;
//startx = (float)x - (float)map.GetLength(0) / 2f;
//starty = (float)y - (float)map.GetLength(1) / 2f;
map [x, y].transform.position = new Vector3 (startx, starty, 0);
//map [x, y].transform.position = new Vector3 (startx, starty, 0);
}
Map.map = map;
//Map.map = map;
}
Tile[,] GenerateTiles (int rows, int cols) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment