Large diffs are not rendered by default.

@@ -14,7 +14,7 @@ public class BuildMenu : MonoBehaviour {

GameObject cont;
Controller c;

// Use this for initialization
void Start () {
SpeakerPrice = 10;
@@ -38,12 +38,14 @@ public class BuildMenu : MonoBehaviour {
GameObject BM;
GameObject OM;
GameObject BUM;
GameObject OUM;
if(BM = GameObject.FindGameObjectWithTag ("MenuBarRange")) Destroy (BM);
if(OM = GameObject.FindGameObjectWithTag ("MenuSpeakerRange")) Destroy (OM);
if (BUM = GameObject.FindGameObjectWithTag ("BlueUpgradeMenu")) Destroy (BUM);
if (OUM = GameObject.FindGameObjectWithTag ("OrangeUpgradeMenu")) Destroy (OUM);
c.isMenu = false;
}

void DestroyTower(GameObject tower){
Destroy (tower);
}
@@ -63,12 +65,13 @@ public class BuildMenu : MonoBehaviour {

if (c.isMenu == true) {
if ((this.gameObject.tag == "MenuSpeakerRange") && (isBuilt == false) && (c.RockDollars >= c.SpeakerPrice)) {
Instantiate (speaker, new Vector3 (x + 0.3f, y, 1), transform.rotation);
GameObject ThisBar = (GameObject)Instantiate (speaker, new Vector3 (x + 0.3f, y, 1), transform.rotation);
SourceTile.GetComponent<Tile> ().built = true;
FindCircleAndDestroy ();
FindMenuAndDestroy ();

SourceTile.GetComponent<Tile> ().tag = "Speaker";
SourceTile.GetComponent<Tile> ().towerOnTile = ThisBar;

c.BuySpeaker ();
} else if (this.gameObject.tag == "MenuBarRange" && (isBuilt == false) && (c.RockDollars >= c.BarPrice)) {
@@ -84,13 +87,23 @@ public class BuildMenu : MonoBehaviour {
//built = true;
} else if(this.gameObject.tag == "BlueUpgradeMenu"){
DestroyTower(SourceTile.GetComponent<Tile>().towerOnTile);

FindMenuAndDestroy();
FindCircleAndDestroy();

GameObject ThisBar = (GameObject)Instantiate(barUpgrade, new Vector3(x-0.3f,y, 1), transform.rotation);

GameObject ThisBar = (GameObject)Instantiate(barUpgrade, new Vector3(x-0.35f,y-0.15f, 1), transform.rotation);
SourceTile.GetComponent<Tile>().tag = "Upgrade";
SourceTile.GetComponent<Tile>().towerOnTile = ThisBar;
} else if (tag == "OrangeUpgradeMenu"){
DestroyTower (SourceTile.GetComponent<Tile>().towerOnTile);

FindMenuAndDestroy();
FindCircleAndDestroy();

GameObject ThisBar = (GameObject)Instantiate(speakerUpgrade, new Vector3(x+0.35f, y-0.15f, 1), transform.rotation);
SourceTile.GetComponent<Tile>().tag = "Upgrade";
SourceTile.GetComponent<Tile>().towerOnTile = ThisBar;

}


@@ -24,15 +24,15 @@ public class StartButton : MonoBehaviour {
//public GameObject Nolvl;

Controller c;
NumberLvl levelDisplay;
NumberOfLvl levelDisplay;

// Use this for initialization
void Start () {
GameObject cont = GameObject.Find ("Controller");
c = cont.GetComponent<Controller> ();

GameObject content = GameObject.Find ("NumberLvl");
levelDisplay = content.GetComponent<NumberLvl> ();
levelDisplay = content.GetComponent<NumberOfLvl> ();



@@ -2,23 +2,23 @@
using System.Collections;

public class Tile : MonoBehaviour {

public GameObject orange;
public GameObject orangeUpgrade;
public GameObject blue;
public GameObject blueUpgrade;
public GameObject Circle;
public GameObject towerOnTile;
public bool built;

public Sprite highlight;
public Sprite normal;
// Use this for initialization
Controller c;
void Start () {
GameObject cont = GameObject.Find ("Controller");
c = cont.GetComponent<Controller> ();

}

// Update is called once per frame
@@ -27,7 +27,7 @@ public class Tile : MonoBehaviour {
/*void OnMouseUp () {
}*/

void DestroyCircleIfExists(){
if(GameObject.FindGameObjectWithTag("MenuChild")){
Destroy (GameObject.FindGameObjectWithTag("MenuChild"));
@@ -40,18 +40,22 @@ public class Tile : MonoBehaviour {
}
void UpgradeTower(float x, float y){
if (gameObject.tag == "BarShootStraight") {
GameObject BBM = (GameObject)Instantiate(blueUpgrade, new Vector3(x + 0.35f, y, -1), transform.rotation);
GameObject BBM = (GameObject)Instantiate (blueUpgrade, new Vector3 (x + 0.35f, y, -1), transform.rotation);
c.isMenu = true;
BBM.GetComponent<BuildMenu> ().SourceTile = gameObject;
} else if (tag == "Speaker") {
GameObject BBM = (GameObject)Instantiate (orangeUpgrade, new Vector3 (x - 0.35f, y, -1), transform.rotation);
c.isMenu = true;
BBM.GetComponent<BuildMenu> ().SourceTile = gameObject;//GetComponent<BuildMenu>().SourceTile;
BBM.GetComponent<BuildMenu> ().SourceTile = gameObject;
}

}

void OnMouseDown() {

float x = this.transform.position.x;
float y = this.transform.position.y;

if (c.GameLost == false) {
if(this.built == true) {
DestroyCircleIfExists();
@@ -62,7 +66,7 @@ public class Tile : MonoBehaviour {
UpgradeTower(x, y);
}
} else if (c.isMenu == false) {

GameObject OBM = (GameObject)Instantiate (orange, new Vector3 (x - 0.3f, y, -1), transform.rotation);
GameObject BBM = (GameObject)Instantiate (blue, new Vector3 (x + 0.35f, y, -1), transform.rotation);
c.isMenu = true;
@@ -88,7 +92,7 @@ public class Tile : MonoBehaviour {
}
}
}

void OnMouseExit() {
if (c.GameLost == false) {
if (this.gameObject.tag == "Buildable") {
@@ -0,0 +1,70 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!78 &1
TagManager:
serializedVersion: 2
tags:
- Hurtable
- Walkable
- Buildable
- goWest
- Note
- Destroy
- BarAoE
- Beer
- Bar
- BarShootStraight
- Speaker
- MenuSpeakerRange
- MenuBarRange
- MenuChild
- NumberLvl
- Stage
- RestartButton
- StartButton
- Upgrade
- BeerAoE
- NumberOfLevel
layers:
- Default
- TransparentFX
- Ignore Raycast
-
- Water
- UI
-
-
- Floor
- Stage
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
m_SortingLayers:
- name: Default
uniqueID: 0
locked: 0
- name: Tiles
uniqueID: 2039958209
locked: 0
- name: Speakers
uniqueID: 1439385611
locked: 0

This file was deleted.

@@ -10,28 +10,24 @@ TagManager:
- goWest
- Note
- Destroy
- BarAoE
- Beer
- Bar
- BarAoE
- BarShootStraight
- Beer
- BeerAoE
- Speaker
- MenuSpeakerRange
- MenuBarRange
- MenuChild
- NumberLvl
- NumberOfLevel
- NumberOfLvl
- Stage
- RestartButton
- StartButton
<<<<<<< HEAD
- Upgrade
- BlueUpgradeMenu
- OrangeUpgradeMenu
- Upgrade
- BeerAoE
=======
- Upgrade
- BeerAoE
- NumberOfLevel
>>>>>>> 289037b0f8594951ba35ced9ef1177d252647ba2
layers:
- Default
- TransparentFX
@@ -41,8 +37,8 @@ TagManager:
- UI
-
-
- Floor
- Stage
-
-
-
-
-
@@ -69,9 +65,3 @@ TagManager:
- name: Default
uniqueID: 0
locked: 0
- name: Tiles
uniqueID: 2039958209
locked: 0
- name: Speakers
uniqueID: 1439385611
locked: 0