Skip to content
Permalink
Browse files

Started UI

  • Loading branch information
smz11006 committed Dec 15, 2015
1 parent 614415c commit 13bc366381331a31823de8aa90ea2cca1ca034bf
@@ -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 () {


} }
} }

Some generated files are not rendered by default. Learn more.

Binary file not shown.

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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);
@@ -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 () {

}
}

Some generated files are not rendered by default. Learn more.

@@ -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");

}
}
}

Some generated files are not rendered by default. Learn more.

@@ -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);
} }


} }
@@ -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 () {

}
}

Some generated files are not rendered by default. Learn more.

Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +276 Bytes (110%) Roguelike2d/Library/expandedItems
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 13bc366

Please sign in to comment.
You can’t perform that action at this time.