Permalink
This commit does not belong to any branch on this respository, and may belong to a fork outside of the repository.
Showing
with
160 additions
and 6 deletions.
- +5 −3 HelloWorld/Assets/HelloWorld.cs
- +9 −0 Roguelike2d/Assets/Font.meta
- BIN Roguelike2d/Assets/Font/Science Fair.otf
- +19 −0 Roguelike2d/Assets/Font/Science Fair.otf.meta
- BIN Roguelike2d/Assets/Prefabs/Environment/Battery.prefab
- BIN Roguelike2d/Assets/Prefabs/Environment/Exit.prefab
- BIN Roguelike2d/Assets/Prefabs/Player/Player.prefab
- BIN Roguelike2d/Assets/Scenes/ProcGenTest.unity
- +2 −2 Roguelike2d/Assets/Script/NextLevel.cs
- +38 −0 Roguelike2d/Assets/Script/Persistence.cs
- +12 −0 Roguelike2d/Assets/Script/Persistence.cs.meta
- +32 −0 Roguelike2d/Assets/Script/Pickups.cs
- +12 −0 Roguelike2d/Assets/Script/Pickups.cs.meta
- +1 −1 Roguelike2d/Assets/Script/ProdGen/BoardManager.cs
- +18 −0 Roguelike2d/Assets/Script/TextCore.cs
- +12 −0 Roguelike2d/Assets/Script/TextCore.cs.meta
- BIN Roguelike2d/Library/CurrentLayout.dwlt
- BIN Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
- BIN Roguelike2d/Library/assetDatabase3
- BIN Roguelike2d/Library/expandedItems
- BIN Roguelike2d/Library/metadata/00/00000000000000004000000000000000
- BIN Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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 () { | ||
|
||
} | ||
} |
@@ -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"); | ||
|
||
} | ||
} | ||
} |
@@ -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 () { | ||
|
||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.