Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Started UI
  • Loading branch information
smz11006 committed Dec 15, 2015
1 parent 614415c commit 13bc366
Show file tree
Hide file tree
Showing 22 changed files with 160 additions and 6 deletions.
8 changes: 5 additions & 3 deletions HelloWorld/Assets/HelloWorld.cs
Expand Up @@ -13,9 +13,11 @@ public class HelloWorld : MonoBehaviour {
Debug.Log("Hello World"); Debug.Log("Hello World");
text.text = "Hello World"; text.text = "Hello World";
} }


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


} }
} }
9 changes: 9 additions & 0 deletions Roguelike2d/Assets/Font.meta

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

Binary file added Roguelike2d/Assets/Font/Science Fair.otf
Binary file not shown.
19 changes: 19 additions & 0 deletions Roguelike2d/Assets/Font/Science Fair.otf.meta

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

Binary file modified Roguelike2d/Assets/Prefabs/Environment/Battery.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Environment/Exit.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Prefabs/Player/Player.prefab
Binary file not shown.
Binary file modified Roguelike2d/Assets/Scenes/ProcGenTest.unity
Binary file not shown.
4 changes: 2 additions & 2 deletions Roguelike2d/Assets/Script/NextLevel.cs
Expand Up @@ -4,9 +4,9 @@ using System.Collections;
public class NextLevel : MonoBehaviour { public class NextLevel : MonoBehaviour {
public GameObject player; public GameObject player;


void OnCollisionEnter(Collision col) void OnCollisionEnter2D(Collision2D col)
{ {
if (col.gameObject.tag == "Exit") if (col.gameObject.tag == "Player")
{ {
Debug.Log("HitExit"); Debug.Log("HitExit");
Application.LoadLevel(0); Application.LoadLevel(0);
Expand Down
38 changes: 38 additions & 0 deletions Roguelike2d/Assets/Script/Persistence.cs
@@ -0,0 +1,38 @@
using UnityEngine;
using System.Collections;

public class Persistence : MonoBehaviour {

public int health = 100;
public int score = 0;
public int cores = 0;
public int power = 0;


//Awake
void Awake()
{
//DontDestroyOnLoad(health);
//DontDestroyOnLoad(score);
//DontDestroyOnLoad(power);
DontDestroyOnLoad(gameObject);
}
//Collisoin Detection
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "EscapeCharge")
{
Debug.Log("Charge Counted");
power = power + 1;
}
}
// Use this for initialization
void Start () {

}

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

}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/Persistence.cs.meta

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

32 changes: 32 additions & 0 deletions Roguelike2d/Assets/Script/Pickups.cs
@@ -0,0 +1,32 @@
using UnityEngine;
using System.Collections;

public class Pickups : MonoBehaviour {

public int charge = 0;
public GameObject exit;

void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "EscapeCharge")
{
Destroy(col.gameObject);
Debug.Log("Charge Pickup");
charge = charge + 1;
}
}

void Update()
{
//Batteries activating exit
if (charge == 4)
{
GameObject spawn = Instantiate(exit, new Vector2(7, 7), Quaternion.Euler(0, 0, 0)) as GameObject;
charge = 6;

// exit.SetActive(true);
Debug.Log("ExitOpened");

}
}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/Pickups.cs.meta

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

2 changes: 1 addition & 1 deletion Roguelike2d/Assets/Script/ProdGen/BoardManager.cs
Expand Up @@ -149,7 +149,7 @@ public class BoardManager : MonoBehaviour {
//Instanciate arndom number of enmies based on min/max, at random positions //Instanciate arndom number of enmies based on min/max, at random positions
LayoutObjectAtRandom(enemyTiles, enemyCount, enemyCount); LayoutObjectAtRandom(enemyTiles, enemyCount, enemyCount);
//Instanciate the xtilre til in the upper right hand corner of our game board //Instanciate the xtilre til in the upper right hand corner of our game board
Instantiate(exit, new Vector3(columns - 1, rows - 1, 0f), Quaternion.identity); // Instantiate(exit, new Vector3(columns - 1, rows - 1, 0f), Quaternion.identity);
} }


} }
Expand Down
18 changes: 18 additions & 0 deletions Roguelike2d/Assets/Script/TextCore.cs
@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;


public class TextCore : MonoBehaviour {
public Text text;

// Use this for initialization
void Start () {

}

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

}
}
12 changes: 12 additions & 0 deletions Roguelike2d/Assets/Script/TextCore.cs.meta

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

Binary file modified Roguelike2d/Library/CurrentLayout.dwlt
Binary file not shown.
Binary file modified Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
Binary file modified Roguelike2d/Library/assetDatabase3
Binary file not shown.
Binary file modified Roguelike2d/Library/expandedItems
Binary file not shown.
Binary file modified Roguelike2d/Library/metadata/00/00000000000000004000000000000000
Binary file not shown.
Binary file modified Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91
Binary file not shown.

0 comments on commit 13bc366

Please sign in to comment.