diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 3069df4..94cf901 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -1903,6 +1903,7 @@ MonoBehaviour: shankYouText: {fileID: 644799324} gameOverText: {fileID: 973833019} restartText: {fileID: 1894191159} + patronCounter: 0 --- !u!4 &1164596950 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/GameController.cs b/Assets/Scripts/GameController.cs index e16b1a7..f30814d 100644 --- a/Assets/Scripts/GameController.cs +++ b/Assets/Scripts/GameController.cs @@ -19,7 +19,7 @@ public class GameController : MonoBehaviour { public GUIText restartText; private int score = 0; - private int patronCounter = 0; + public int patronCounter = 0; private bool restart; private int maxSwigs; @@ -40,6 +40,8 @@ public class GameController : MonoBehaviour { if (Input.GetKeyDown(KeyCode.R)) Application.LoadLevel(Application.loadedLevel); } + +// Debug.Log (currentNumberOfDemons + "/" + patronCounter); } IEnumerator SpawnWaves () diff --git a/Assets/Scripts/Patron.cs b/Assets/Scripts/Patron.cs index 1d63d85..384f25e 100644 --- a/Assets/Scripts/Patron.cs +++ b/Assets/Scripts/Patron.cs @@ -18,7 +18,7 @@ public class Patron : MonoBehaviour { else Debug.Log("Cannot find GameController script."); - if (Random.value > 0.6 && gameController.currentNumberOfDemons < (gameController.maxPatrons / 4)) { + if (Random.value >= 0.75 || gameController.currentNumberOfDemons < (gameController.patronCounter / 4)) { isDemon = true; gameController.currentNumberOfDemons++; } diff --git a/Assets/Scripts/WalkAI.cs b/Assets/Scripts/WalkAI.cs index 5b0241f..0695033 100644 --- a/Assets/Scripts/WalkAI.cs +++ b/Assets/Scripts/WalkAI.cs @@ -14,6 +14,11 @@ public class WalkAI : MonoBehaviour { GameObject poi1 = allPois[Random.Range (0, allPois.Length)]; GameObject poi2 = allPois[Random.Range (0, allPois.Length)]; + while (poi2 == poi1) { + poi2 = allPois[Random.Range (0, allPois.Length)]; + } + + Debug.Log (poi1.name + "," + poi2.name); destinations = new GameObject[2] { poi1, diff --git a/Assets/Sprites/Materials/brickwal-not-animatedl0.mat b/Assets/Sprites/Materials/brickwal-not-animatedl0.mat index 089d98c..3b9a9ab 100644 --- a/Assets/Sprites/Materials/brickwal-not-animatedl0.mat +++ b/Assets/Sprites/Materials/brickwal-not-animatedl0.mat @@ -19,7 +19,7 @@ Material: second: m_Texture: {fileID: 2800000, guid: 26c9dff0fed396341b045e42e3a0b500, type: 3} m_Scale: {x: 1, y: .5} - m_Offset: {x: 0, y: 0} + m_Offset: {x: 0, y: .5} data: first: name: _BumpMap diff --git a/Builds/Builds.unity3d b/Builds/Builds.unity3d deleted file mode 100644 index 8817b6d..0000000 Binary files a/Builds/Builds.unity3d and /dev/null differ diff --git a/Builds/Builds.html b/Builds/DemonShanker2.html similarity index 98% rename from Builds/Builds.html rename to Builds/DemonShanker2.html index cd006a8..51889b1 100644 --- a/Builds/Builds.html +++ b/Builds/DemonShanker2.html @@ -56,7 +56,7 @@ break; } }); - u.initPlugin(jQuery("#unityPlayer")[0], "Builds.unity3d"); + u.initPlugin(jQuery("#unityPlayer")[0], "DemonShanker2.unity3d"); }); --> diff --git a/Builds/DemonShanker2.unity3d b/Builds/DemonShanker2.unity3d new file mode 100644 index 0000000..4f0952a Binary files /dev/null and b/Builds/DemonShanker2.unity3d differ