diff --git a/HelloWorld/Assets/HelloWorld.cs b/HelloWorld/Assets/HelloWorld.cs index 2aacc1b7..d151ba2b 100644 --- a/HelloWorld/Assets/HelloWorld.cs +++ b/HelloWorld/Assets/HelloWorld.cs @@ -13,9 +13,11 @@ public class HelloWorld : MonoBehaviour { Debug.Log("Hello World"); text.text = "Hello World"; } - - // Update is called once per frame - void Update () { + + + + // Update is called once per frame + void Update () { } } diff --git a/Roguelike2d/Assets/Font.meta b/Roguelike2d/Assets/Font.meta new file mode 100644 index 00000000..7507e510 --- /dev/null +++ b/Roguelike2d/Assets/Font.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 595a2ed401b9c324dbb83e1433964a3d +folderAsset: yes +timeCreated: 1450144519 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roguelike2d/Assets/Font/Science Fair.otf b/Roguelike2d/Assets/Font/Science Fair.otf new file mode 100644 index 00000000..9039e5e4 Binary files /dev/null and b/Roguelike2d/Assets/Font/Science Fair.otf differ diff --git a/Roguelike2d/Assets/Font/Science Fair.otf.meta b/Roguelike2d/Assets/Font/Science Fair.otf.meta new file mode 100644 index 00000000..d6bcc168 --- /dev/null +++ b/Roguelike2d/Assets/Font/Science Fair.otf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: b3383cae821eae141b1f94bfbcee1c2c +timeCreated: 1450144523 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roguelike2d/Assets/Prefabs/Environment/Battery.prefab b/Roguelike2d/Assets/Prefabs/Environment/Battery.prefab index 4240b5ca..5f865481 100644 Binary files a/Roguelike2d/Assets/Prefabs/Environment/Battery.prefab and b/Roguelike2d/Assets/Prefabs/Environment/Battery.prefab differ diff --git a/Roguelike2d/Assets/Prefabs/Environment/Exit.prefab b/Roguelike2d/Assets/Prefabs/Environment/Exit.prefab index 5b8ae5fd..f959e386 100644 Binary files a/Roguelike2d/Assets/Prefabs/Environment/Exit.prefab and b/Roguelike2d/Assets/Prefabs/Environment/Exit.prefab differ diff --git a/Roguelike2d/Assets/Prefabs/Player/Player.prefab b/Roguelike2d/Assets/Prefabs/Player/Player.prefab index af63fcf7..2221f44d 100644 Binary files a/Roguelike2d/Assets/Prefabs/Player/Player.prefab and b/Roguelike2d/Assets/Prefabs/Player/Player.prefab differ diff --git a/Roguelike2d/Assets/Scenes/ProcGenTest.unity b/Roguelike2d/Assets/Scenes/ProcGenTest.unity index fb85170b..3752c959 100644 Binary files a/Roguelike2d/Assets/Scenes/ProcGenTest.unity and b/Roguelike2d/Assets/Scenes/ProcGenTest.unity differ diff --git a/Roguelike2d/Assets/Script/NextLevel.cs b/Roguelike2d/Assets/Script/NextLevel.cs index 5074bddf..83b2b1b3 100644 --- a/Roguelike2d/Assets/Script/NextLevel.cs +++ b/Roguelike2d/Assets/Script/NextLevel.cs @@ -4,9 +4,9 @@ using System.Collections; public class NextLevel : MonoBehaviour { public GameObject player; - void OnCollisionEnter(Collision col) + void OnCollisionEnter2D(Collision2D col) { - if (col.gameObject.tag == "Exit") + if (col.gameObject.tag == "Player") { Debug.Log("HitExit"); Application.LoadLevel(0); diff --git a/Roguelike2d/Assets/Script/Persistence.cs b/Roguelike2d/Assets/Script/Persistence.cs new file mode 100644 index 00000000..08758b39 --- /dev/null +++ b/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 () { + + } +} diff --git a/Roguelike2d/Assets/Script/Persistence.cs.meta b/Roguelike2d/Assets/Script/Persistence.cs.meta new file mode 100644 index 00000000..abf48679 --- /dev/null +++ b/Roguelike2d/Assets/Script/Persistence.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 50ab11816c44ddf4eb63c0f0a61f8f3b +timeCreated: 1450144318 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roguelike2d/Assets/Script/Pickups.cs b/Roguelike2d/Assets/Script/Pickups.cs new file mode 100644 index 00000000..05904ae0 --- /dev/null +++ b/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"); + + } + } +} diff --git a/Roguelike2d/Assets/Script/Pickups.cs.meta b/Roguelike2d/Assets/Script/Pickups.cs.meta new file mode 100644 index 00000000..6948cf91 --- /dev/null +++ b/Roguelike2d/Assets/Script/Pickups.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a1007c15405f49c40a8aacf455aadca0 +timeCreated: 1450142745 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roguelike2d/Assets/Script/ProdGen/BoardManager.cs b/Roguelike2d/Assets/Script/ProdGen/BoardManager.cs index ac4fd012..bb101c69 100644 --- a/Roguelike2d/Assets/Script/ProdGen/BoardManager.cs +++ b/Roguelike2d/Assets/Script/ProdGen/BoardManager.cs @@ -149,7 +149,7 @@ public class BoardManager : MonoBehaviour { //Instanciate arndom number of enmies based on min/max, at random positions LayoutObjectAtRandom(enemyTiles, enemyCount, enemyCount); //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); } } diff --git a/Roguelike2d/Assets/Script/TextCore.cs b/Roguelike2d/Assets/Script/TextCore.cs new file mode 100644 index 00000000..a6310125 --- /dev/null +++ b/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 () { + + } +} diff --git a/Roguelike2d/Assets/Script/TextCore.cs.meta b/Roguelike2d/Assets/Script/TextCore.cs.meta new file mode 100644 index 00000000..9e8f87cf --- /dev/null +++ b/Roguelike2d/Assets/Script/TextCore.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 24a05a062f4b70e4f842caed3bec07b6 +timeCreated: 1450146245 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roguelike2d/Library/CurrentLayout.dwlt b/Roguelike2d/Library/CurrentLayout.dwlt index 5c6cbe73..eac99872 100644 Binary files a/Roguelike2d/Library/CurrentLayout.dwlt and b/Roguelike2d/Library/CurrentLayout.dwlt differ diff --git a/Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb b/Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb index 7c2d5a71..d7bf9b4b 100644 Binary files a/Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb and b/Roguelike2d/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb differ diff --git a/Roguelike2d/Library/assetDatabase3 b/Roguelike2d/Library/assetDatabase3 index 031294f9..447e68d1 100644 Binary files a/Roguelike2d/Library/assetDatabase3 and b/Roguelike2d/Library/assetDatabase3 differ diff --git a/Roguelike2d/Library/expandedItems b/Roguelike2d/Library/expandedItems index 349475be..161cc677 100644 Binary files a/Roguelike2d/Library/expandedItems and b/Roguelike2d/Library/expandedItems differ diff --git a/Roguelike2d/Library/metadata/00/00000000000000004000000000000000 b/Roguelike2d/Library/metadata/00/00000000000000004000000000000000 index 05d803d2..db9ea10b 100644 Binary files a/Roguelike2d/Library/metadata/00/00000000000000004000000000000000 and b/Roguelike2d/Library/metadata/00/00000000000000004000000000000000 differ diff --git a/Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91 b/Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91 index a963bfa7..884531de 100644 Binary files a/Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91 and b/Roguelike2d/Library/metadata/d1/d10aa5ca016ed594dbaf0d44a8063a91 differ