Skip to content

Commit

Permalink
Small Fixes
Browse files Browse the repository at this point in the history
- Gui Texture Updates
- Inventory Desplay Updates
- new bugs
  • Loading branch information
dpeter99 committed Dec 23, 2015
1 parent 99bc3d5 commit 9ebfcb0
Show file tree
Hide file tree
Showing 32 changed files with 97 additions and 58 deletions.
20 changes: 20 additions & 0 deletions Assets/BuildingPressEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using UnityEngine;
using UnityEngine.Events;
using System.Collections;

public class BuildingPressEvent : MonoBehaviour {

public UnityEvent events;

public

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}
}
12 changes: 12 additions & 0 deletions Assets/BuildingPressEvent.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/Chest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public class Chest : BuildingWGUI, IInventory, IBuildable, IRegystratabe, IHasGu
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}

public void OpenInventory()
Expand Down
2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/Furnace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ void Update()
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}

public void OpenInventory()
Expand Down
2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/MainBuilding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ enum States
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
//this.Graphicks.transform.position = Vector3.zero;
}

public void OpenInventory()
Expand Down
2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/Miner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class Miner : BuildingWGUI, IInventory, IHasGui, IRegystratabe, IBuildabl
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}

public void OpenInventory()
Expand Down
2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/PlanedBuilding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public class PlanedBuilding : BuildingWGUI, ISaveble, IRegystratabe
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}

void Start()
Expand Down
2 changes: 0 additions & 2 deletions Assets/CivMars/Buildings/Press.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ void Update()
public override void Awake()
{
base.Awake();
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}

public void OpenInventory()
Expand Down
8 changes: 2 additions & 6 deletions Assets/CivMarsEngine/Building.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ public class Building : Tiled, ISaveble

//public List<Item> buildingMaterials;

public GameObject Graphicks;
public GameObject graphics;
public bool guion;

public override void Awake()
{
base.Awake();
}

public void PositionUpdate()
{
Graphicks.SetActive(false);
this.Graphicks.transform.position = Vector3.zero;
}




Expand Down
18 changes: 14 additions & 4 deletions Assets/CivMarsEngine/BuildingWGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
using System.Linq;
using System.Text;
using CivMarsEngine;
using UnityEngine;
using UnityEngine.EventSystems;

namespace CivMarsEngine
{
public class BuildingWGUI : Building, IHasGui
{

public GameObject SideMenu;

public void PositionUpdate()
{
SideMenu.SetActive(false);
this.SideMenu.transform.position = Vector3.zero;
}

#region IhasGui
public void TogelGui()
{
Expand All @@ -30,25 +39,26 @@ public void TogelGui()
public virtual void Open()
{
guion = true;
Graphicks.SetActive(true);
SideMenu.SetActive(true);
}

public virtual void Close()
{
guion = false;
Graphicks.SetActive(false);
SideMenu.SetActive(false);
}

public int ClosingLevel()
{
return 1;
}

/*
public void OnPointerClick(PointerEventData eventData)
{
if (!eventData.rawPointerPress.transform.IsChildOf(Graphicks.transform))
TogelGui();
TogelGui();
}
*/
#endregion

}
Expand Down
23 changes: 18 additions & 5 deletions Assets/CivMarsEngine/GUI/GUIHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,38 @@

public class GUIHandler : MonoBehaviour
{
GameController GameCon;

public AccesPanel AccesPanel;

public InventoryDesplay defaultInventory;
public GasDesplay defaultGas;
public CraftingDesplay defaultCrafting;

/*
public Slider miningSlider;
public GameObject miningPlanel;


// Use this for initialization
void Start()
{
GameCon = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameController>();
}

// Update is called once per frame
void Update()
{
if (GameCon.playerclass.miningTime > 0)
{

miningPlanel.SetActive(true);
miningSlider.maxValue = GameCon.playerclass.fullMiningTime;
miningSlider.value = GameCon.playerclass.miningTime;
}
else
{
miningPlanel.SetActive(false);
}
}
*/

}
7 changes: 4 additions & 3 deletions Assets/CivMarsEngine/GUI/UITextures/GUI.Header.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Assets/CivMarsEngine/GUI/UITextures/GUI.Inverted2.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Assets/CivMarsEngine/GUI/UITextures/GUI.base.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/CivMarsEngine/GUI/UITextures/Ring.full.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Assets/CivMarsEngine/GUI/UITextures/Ring.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ebfcb0

Please sign in to comment.